/* Smarterbuys Store: base. The reset, type, the page shell (announcement bar, header, search, navigation and
   mega menus, the menu sheet, the phone's tab bar, the action bar, sheets, toasts, the finance strip, the footer)
   and a few utilities.
   Colours, radii, shadows and fonts come from tokens.css only. Components are in components.css.
   Phone first, in four regions: 1 the shared rules and the phone (the default), 2 additions from 700px,
   3 additions from 1200px, 4 what depends on the pointer, on motion and on print.
   In region 1 a phone-only variation (the chrome mode, an open search) is written with :where(), so that it weighs
   no more than the plain selector and one plain rule in region 2 puts the wider layouts back. */

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

/* ---------------------------------------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
:root { color-scheme: only light; }                 /* a forced dark mode must not recolour the shop (the page says so in a meta tag too) */
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; background: var(--page);
  /* a focused or targeted thing is never under the header, a docked bar or the cookie notice */
  scroll-padding-top: calc(var(--stuck-h) + 16px);
  scroll-padding-bottom: calc(max(var(--tab-now), var(--act-now), var(--tray-now)) + var(--consent-h) + 16px);
}
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--page); color: var(--text);
  font: 400 var(--fs-body)/var(--lh-body) var(--font-body);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
main { flex: 1 0 auto; width: 100%; }
h1, h2, h3, h4, h5 { margin: 0; font-family: var(--font-display); font-weight: 700; line-height: var(--lh-tight); letter-spacing: var(--track-display); color: var(--navy); text-wrap: balance; }
h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }
h4 { font-size: 1.0625rem; line-height: var(--lh-snug); letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: var(--navy); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
img, svg, video { max-width: 100%; }
img { height: auto; }
svg.icon { flex: none; display: inline-block; vertical-align: middle; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { -webkit-tap-highlight-color: transparent; }
/* a tap is a tap: no wait for a double tap, on anything that can be pressed */
a, button, summary, label, select, input, [role="button"] { touch-action: manipulation; }
table { border-collapse: collapse; }
s { text-decoration-thickness: 1.5px; }
::selection { background: var(--mint); color: var(--ink); }

/* focus: 3px navy with a 2px gap; mint on the dark bands */
:focus-visible { outline: var(--focus-w) solid var(--focus); outline-offset: var(--focus-gap); }
:focus:not(:focus-visible) { outline: none; }
[tabindex="-1"]:focus { outline: none; }
.on-dark :focus-visible, .announce :focus-visible, .site-footer :focus-visible { outline-color: var(--focus-on-dark); }

/* ---------------------------------------------------------------------------------------------- what is docked now */
/* On <html>, so that its own scroll padding and every descendant can read them (tokens.css holds the defaults, 0).
   Anything fixed to the bottom stands clear of whatever is docked there, with no script. Without :has() they stay
   0: a toast or the notice may then sit on a bar, nothing breaks. */
html:has(body.chrome-browse) { --tab-now: calc(var(--bar-tab) + var(--safe-b)); }
html:has(.actbar:not([hidden]):not(.is-away)) { --act-now: calc(var(--bar-act) + var(--safe-b)); }
html:has(body.chrome-browse .announce) { --announce-h: 36px; }
/* The notice's height before app.js writes the measured one inline on <html>: what it measures on a phone at each
   width (its words take 5, 4, 3 or 2 lines; consent.css), so the gallery and the poster that make room for it are
   drawn at their final size from the first paint and nothing moves when the script arrives (U_speed, 18 Nov).
   test/design_layout_speed.test.js checks these against the measured height. */
html:has([data-consent-banner]:not([hidden])) { --consent-h: 248px; }
@media (min-width: 330px) { html:has([data-consent-banner]:not([hidden])) { --consent-h: 229px; } }
@media (min-width: 376px) { html:has([data-consent-banner]:not([hidden])) { --consent-h: 211px; } }
@media (min-width: 455px) { html:has([data-consent-banner]:not([hidden])) { --consent-h: 193px; } }
@media (min-width: 607px) { html:has([data-consent-banner]:not([hidden])) { --consent-h: 175px; } }
/* A phone's product page on a first visit: product.js shows the action bar as soon as it runs (the notice stands
   over the page's own button), and the notice stands on the bar. The room is taken from the first paint, so the
   notice does not jump up when the script arrives; without script there is no bar (a <noscript> rule in the
   layout's head gives the room back) and from 700px the bar only follows the button (region 2 gives it back). */
html:has(.actbar[data-buybar][hidden]):has([data-consent-banner]:not([hidden])) { --act-now: calc(var(--bar-act) + var(--safe-b)); }
html.header-away { --stuck-h: var(--site-banner-h, 0px); }              /* the phone's header has slid away: nothing is stuck */
/* while a sheet or the phone's search is open the page behind neither scrolls nor refreshes on a pull */
html.sheet-open, html.drawer-open { overflow: hidden; overscroll-behavior-y: contain; }
html.search-open { overflow: hidden; }
html { scrollbar-gutter: stable; }                                          /* a classic scrollbar never moves the page */
html:has(dialog[open]) { overflow: hidden; }                                /* the page behind a viewer or the cookie dialog does not scroll */

/* ---------------------------------------------------------------------------------------------- utilities */
.vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-left: max(var(--gutter), var(--safe-l)); padding-right: max(var(--gutter), var(--safe-r)); }
.wrap--narrow { max-width: calc(820px + 2 * var(--gutter)); }
.section { padding-top: var(--section-gap); }
.section--tight { padding-top: calc(var(--section-gap) * .6); }
.stack > * + * { margin-top: var(--stack, 16px); }
.eyebrow { margin: 0 0 8px; font-size: var(--fs-eyebrow); font-weight: 700; line-height: 1.3; letter-spacing: var(--track-eyebrow); text-transform: uppercase; color: var(--muted); }
.lead { font-size: var(--fs-lead); color: var(--slate); max-width: 62ch; }
.muted { color: var(--muted); }
.num { font-family: var(--font-display); font-weight: 800; letter-spacing: var(--track-display); color: var(--ink); font-variant-numeric: tabular-nums; }

.skip-link { position: absolute; left: 12px; top: -80px; z-index: 100; display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 20px; border-radius: var(--r-pill); background: var(--navy); color: #fff; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: calc(var(--site-banner-h, 0px) + 12px); outline-color: var(--mint); }

.icon-btn { flex: none; display: inline-grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--navy); cursor: pointer; text-decoration: none; -webkit-tap-highlight-color: transparent; transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast); }
.icon-btn:active { transform: scale(.94); background: var(--well); }
.icon-btn--line { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.icon-btn--on-dark { color: #fff; background: rgba(255, 255, 255, .1); }
.icon-btn--on-dark:active { background: rgba(255, 255, 255, .22); }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); font-weight: 700; font-size: .9375rem; color: var(--navy); white-space: nowrap; text-decoration: underline; text-decoration-color: var(--mint); text-decoration-thickness: 2.5px; text-underline-offset: 5px; }
.link-arrow svg { transition: transform var(--t-fast) var(--ease); }

/* long text from the admin (pages, descriptions) */
.prose { max-width: 70ch; color: var(--slate); overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose h3, .prose h4, .prose h5 { margin: 1.6em 0 .5em; color: var(--navy); }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.25em; }
.prose li + li { margin-top: .35em; }
.prose strong, .prose b { color: var(--navy); }

/* ---------------------------------------------------------------------------------------------- announcement */
/* A phone: one 36px line above the header on browse pages (the whole line is the link, the words cut with an
   ellipsis); not drawn on product, basket and checkout pages, where nothing may push the buy button down. */
.announce { position: relative; z-index: calc(var(--z-scrim) + 1); background: var(--ink); color: #fff; font-size: var(--fs-xs); font-weight: 600; line-height: 1.35; }
.announce::after { content: ""; position: absolute; inset: auto 0 0 0; height: 2px; background: linear-gradient(90deg, var(--mint), var(--lime) 55%, var(--coral)); }
:where(.chrome-action) .announce { display: none; }
.announce__link { display: flex; align-items: center; justify-content: flex-start; gap: 8px; height: 36px; margin: 0; padding: 0; color: inherit; text-align: left; text-decoration: none; }
.announce__text { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.announce__flash { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--lime); color: var(--ink); }
.announce__link > svg:last-child { color: var(--mint); }
a.announce__link:active { opacity: .72; }

/* ---------------------------------------------------------------------------------------------- finance strip */
/* Not drawn on a phone: every page that shows a monthly figure carries the APR and the example itself, and
   "How it works" is a tab. (Skin here, layout from 700px.) */
.finance-strip { display: none; background: var(--mint-soft); font-size: var(--fs-sm); line-height: 1.35; }
.finance-strip__link { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--tap); padding: 8px 0; color: var(--navy); font-weight: 600; text-align: center; text-decoration: none; }
.finance-strip__link > svg { color: var(--mint-deep); }
.finance-strip__more { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------------------------------------- header */
/* A phone: one row, 56px. Browse pages: the logo, then the search field. Action pages (product, basket,
   checkout): Back, the logo in the middle, a search icon and the basket. It slides away on the way down the page
   and comes back on the way up (nav.js). Solid white: a see-through header let passing cards show as pale ghosts.
   --site-banner-h is the ribbon of a test copy of the shop (0 everywhere else). */
.site-header { position: sticky; top: var(--site-banner-h, 0px); z-index: var(--z-header); padding-top: var(--safe-t); background: #fff; border-bottom: 1px solid var(--hair); transition: transform var(--t-slow) var(--ease), box-shadow var(--t-med); }
.site-header.is-stuck { box-shadow: 0 6px 24px rgba(16, 11, 52, .07); }
.site-header.is-away { transform: translateY(calc(-100% - var(--site-banner-h, 0px) - 2px)); }
.mega-open .site-header, .search-open .site-header { background: #fff; }
.site-header__row { display: flex; align-items: center; gap: 10px; min-height: var(--bar-top); }
:where(.chrome-action) .site-header__row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); column-gap: 8px; }
.site-header__menu { display: none; }
.site-header__back { display: none; }
:where(.chrome-action) .site-header__back { display: inline-grid; grid-column: 1; grid-row: 1; justify-self: start; margin-left: -10px; }
/* the logo stands on its own white plate: a browser that forces a dark page still shows the navy wordmark */
.site-header__logo { flex: none; display: flex; align-items: center; height: 48px; padding-inline: 4px; border-radius: 10px; background: #fff; }
.site-header__logo img { display: block; width: 102px; height: 34px; }
.site-header__logo--plate { padding-inline: 0; background: transparent; }        /* the plate is in the picture */
.site-header__logo--plate img { width: 110px; height: 41.5px; }
:where(.chrome-action) .site-header__logo { grid-column: 2; grid-row: 1; }
.site-header__find { display: none; }
:where(.chrome-action) .site-header__find { display: inline-grid; grid-column: 3; grid-row: 1; justify-self: end; margin-right: 44px; }
.site-header__cancel { flex: none; min-height: 48px; margin-right: -6px; padding: 0 6px; border: 0; border-radius: 10px; background: transparent; color: var(--navy); font-size: .9375rem; font-weight: 600; cursor: pointer; }
.site-header__cancel:active { opacity: .72; }
.site-header__aid { display: none; }                                       /* Help, the phone number, My account: from 700px */

/* search: the field. On an action page it is not drawn until the search icon is pressed. */
.search { position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; height: 48px; cursor: text; padding: 0 2px 0 10px; background: var(--well); border: 2px solid transparent; border-radius: var(--r-pill); transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast); }
:where(.chrome-action) .search { display: none; }
.search:focus-within { background: #fff; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(59, 247, 202, .45); }
/* the field's own focus ring is drawn on the pill (the input has none of its own, it fills the pill): the site's
   3px navy ring with its 2px gap, as on every other control */
.search:has(.search__input:focus-visible) { outline: var(--focus-w) solid var(--focus); outline-offset: var(--focus-gap); }
.search__icon { flex: none; display: grid; color: var(--slate); }
.search__input { flex: 1 1 auto; width: 100%; min-width: 0; height: 100%; padding: 0 8px; border: 0; outline: 0; background: transparent; font-size: 1rem; color: var(--navy); appearance: none; -webkit-appearance: none; }
.search__input::placeholder { color: var(--muted); opacity: 1; }
.search__input::-webkit-search-decoration { -webkit-appearance: none; }
.search__submit { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--r-pill); background: var(--navy); color: #fff; font-weight: 700; font-size: var(--fs-sm); cursor: pointer; transition: background var(--t-fast); }
.search__submit::after { content: ""; position: absolute; inset: -4px 0; }       /* pressed anywhere in the field's 48px height */
.search__submit:focus-visible { outline-offset: 3px; }
.search__submit:active { background: var(--slate); }
.search__submit-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* search, open, on a phone: the row is the field and "Cancel"; the results take the whole screen under the header
   and end at the keyboard (search.js writes --search-top, the header's bottom edge, and --vvh, the bottom edge of
   what the keyboard leaves). The page behind does not scroll; the docked bars and the cookie notice step aside. */
:where(html.search-open) .site-header { transform: none; transition: none; }
:where(html.search-open) .site-header__row { display: flex; }
:where(html.search-open) :is(.site-header__logo, .site-header__back, .site-header__find, .basket-link) { display: none; }
:where(html.search-open) .search { display: flex; }
.search__panel { position: fixed; z-index: var(--z-panel); left: 0; right: 0; top: var(--search-top, calc(var(--site-banner-h, 0px) + var(--header-h))); height: calc(var(--vvh, 100dvh) - var(--search-top, calc(var(--site-banner-h, 0px) + var(--header-h)))); display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; padding: 4px 0 0; background: #fff; }
.search__heading { flex: none; margin: 0; padding: 14px 16px 8px; font-size: var(--fs-eyebrow); font-weight: 700; letter-spacing: var(--track-eyebrow); text-transform: uppercase; color: var(--muted); }
.search__heading--results { display: none; }
.search__chips { flex: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0 16px 16px; list-style: none; }
.search__chip { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 18px; border-radius: var(--r-pill); background: var(--well); color: var(--navy); font-size: .9375rem; font-weight: 600; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.search__chip--deals { background: var(--lime); color: var(--ink); font-weight: 800; }
.search__chip:active { opacity: .72; }
.search__list { flex: none; display: grid; gap: 0; }
.search__option { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 2px 12px; min-height: 64px; padding: 8px max(16px, var(--safe-r)) 8px max(16px, var(--safe-l)); color: var(--navy); text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.search__option[aria-selected="true"] { background: var(--well); box-shadow: inset 0 0 0 2px var(--navy); }
.search__option:active { opacity: .72; }
.search__thumb { grid-row: 1 / span 2; align-self: start; display: block; width: 48px; height: 48px; border-radius: var(--r-sm); background: var(--well); object-fit: contain; padding: 4px; mix-blend-mode: multiply; }
.search__thumb[src$="placeholder.svg"] { padding: 0; mix-blend-mode: normal; opacity: .8; }
.search__option[aria-selected="true"] .search__thumb { background: #fff; }
.search__info { display: grid; gap: 2px; min-width: 0; }
.search__name { font-weight: 600; font-size: .9375rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.search__cat { display: none; font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search__stock { font-size: var(--fs-xs); font-weight: 600; color: var(--stock-off); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search__figures { grid-column: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; text-align: left; }
.search__price { font: 800 1rem/1.2 var(--font-display); color: var(--ink); }
.search__was { font-size: var(--fs-xs); color: var(--muted); }
.search__monthly { font-size: var(--fs-xs); color: var(--slate); }
.search__all { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: auto; min-height: 52px; margin: 8px max(16px, var(--safe-r)) 12px max(16px, var(--safe-l)); padding: 0 18px; border: 0; border-radius: var(--r-pill); background: var(--navy); color: #fff; font: inherit; font-weight: 700; text-align: left; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.search__all[aria-selected="true"] { background: var(--slate); box-shadow: 0 0 0 3px var(--mint); }
.search__all:active { background: var(--slate); }
/* the credit line: the same size as the monthly figures in the rows, pinned to the foot of the results, always in
   view above the keyboard */
.search__note { flex: none; position: sticky; bottom: 0; margin: auto 0 0; padding: 10px max(16px, var(--safe-r)) max(10px, var(--safe-b)) max(16px, var(--safe-l)); background: #fff; border-top: 1px solid var(--hair); font-size: var(--fs-xs); font-weight: 700; line-height: 1.25; color: var(--navy); }
:where(html.kb-open) .search__note { padding-bottom: 10px; }
.search__empty { flex: none; margin: 0; padding: 18px 16px; color: var(--slate); }
.search__empty strong { color: var(--navy); }
.search-scrim { position: fixed; inset: 0; z-index: var(--z-scrim); background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity var(--t-med); }
.search-open .search-scrim, .mega-open .search-scrim { opacity: 1; pointer-events: auto; }
.mega-open .search-scrim { opacity: .55; }

/* basket: in the header of an action page only (on a browse page it is the fifth tab). A 48px target holding a
   40px navy disc; the count rides its top right corner. */
.basket-link { position: relative; flex: none; display: none; place-items: center; width: 48px; height: 48px; border-radius: var(--r-pill); color: #fff; font-weight: 700; text-decoration: none; -webkit-tap-highlight-color: transparent; transition: background var(--t-fast), transform var(--t-fast); }
:where(.chrome-action) .basket-link { display: inline-grid; grid-column: 3; grid-row: 1; justify-self: end; margin-right: -4px; }
.basket-link::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--navy); transition: background var(--t-fast); }
.basket-link > svg { position: relative; }
.basket-link:active { transform: scale(.97); }
.basket-link__label { display: none; }
.basket-link__count { position: absolute; top: 0; right: 0; display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--r-pill); background: var(--mint); color: var(--ink); font-size: .6875rem; font-weight: 800; line-height: 1; box-shadow: 0 0 0 2px #fff; }
.basket-link.is-bumped .basket-link__count, .tabbar__item.is-bumped .tabbar__count { animation: bump 420ms var(--ease); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* ---------------------------------------------------------------------------------------------- primary navigation */
/* Not drawn on a phone (the Shop tab opens the menu sheet). The skin is here; the row is laid out from 700px. */
.primary-nav { display: none; position: relative; border-top: 1px solid var(--hair); }
.primary-nav__list { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; min-height: 52px; margin: 0 -12px; padding: 0; list-style: none; }
.primary-nav__item { display: flex; align-items: center; }
.primary-nav__link { position: relative; display: inline-flex; align-items: center; min-height: 52px; padding: 0 12px; color: var(--navy); font-size: .9375rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.primary-nav__item--mega .primary-nav__link { padding-right: 2px; }
.primary-nav__link::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--mint); transform: scaleX(0); transform-origin: left; transition: transform var(--t-med) var(--ease); }
.primary-nav__item--mega .primary-nav__link::after { right: -24px; }
.primary-nav__item.is-open .primary-nav__link::after, .primary-nav__link[aria-current]::after { transform: scaleX(1); }
.primary-nav__link[aria-current] { font-weight: 700; }
.primary-nav__toggle { display: inline-grid; place-items: center; width: 30px; height: var(--tap); padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--slate); cursor: pointer; }
.primary-nav__toggle svg { transition: transform var(--t-med) var(--ease); }
.primary-nav__item.is-open .primary-nav__toggle svg { transform: rotate(180deg); }
.primary-nav__item--deals { margin-left: auto; padding-right: 12px; }
.primary-nav__deals { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 18px 0 12px; border-radius: var(--r-pill); background: var(--lime); color: var(--ink); font-size: .9375rem; font-weight: 800; text-decoration: none; transition: box-shadow var(--t-med), transform var(--t-fast); }
.primary-nav__deals::before { content: ""; position: absolute; inset: -4px 0; }
.primary-nav__deals[aria-current] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
/* Many categories: one row. nav.js hides what does not fit and lists it under "More". Until it has run the extra
   rows are clipped (no jump as the page loads); without JavaScript the row wraps (a <noscript> rule in the head),
   and if the script never arrives the rows are let out after a few seconds. */
.primary-nav__list { max-height: 52px; overflow: hidden; }
.primary-nav__list:not(.is-fitted) { animation: nav-unclip 1ms linear 5s forwards; }
.primary-nav__list.is-fitted { max-height: none; overflow: visible; }
@keyframes nav-unclip { to { max-height: 60rem; } }
.primary-nav__more { gap: 6px; border: 0; background: transparent; font-family: inherit; cursor: pointer; }
.primary-nav__item--mega .primary-nav__more { padding-right: 12px; }
.primary-nav__item--mega .primary-nav__more::after { right: 12px; }
.primary-nav__more svg { color: var(--slate); transition: transform var(--t-med) var(--ease); }
.primary-nav__item.is-open .primary-nav__more svg { transform: rotate(180deg); }
.primary-nav__more.has-current { font-weight: 700; }
.primary-nav__more.has-current::after { transform: scaleX(1); }
.primary-nav--empty .primary-nav__link { color: var(--slate); font-weight: 500; }

.mega { position: absolute; z-index: var(--z-panel); top: 100%; left: 0; right: 0; padding: 28px 0 36px; background: #fff; border-top: 1px solid var(--hair); border-radius: 0 0 var(--r-hero) var(--r-hero); box-shadow: 0 34px 60px -12px rgba(16, 11, 52, .22); visibility: hidden; opacity: 0; transform: translateY(-6px); transition: opacity var(--t-fast), transform var(--t-fast) var(--ease), visibility 0s linear var(--t-fast), display var(--t-fast) allow-discrete; }
/* a closed panel is out of the layout (display: none), so its pictures are not fetched on every page; where the
   browser can, it still fades in and out (display moves with the fade) */
.mega { display: none; }
.primary-nav__item.is-open > .mega,
html.no-js .primary-nav__item:hover > .mega,
html.no-js .primary-nav__item:focus-within > .mega { display: block; visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
@starting-style { .primary-nav__item.is-open > .mega { opacity: 0; transform: translateY(-6px); } }
.mega__inner { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); align-items: start; gap: 40px; }
.mega__intro { position: relative; overflow: hidden; display: grid; justify-items: start; gap: 12px; padding: 26px; border-radius: var(--r-card); background: var(--tile); }
.mega__intro::after { content: ""; position: absolute; right: -46px; bottom: -46px; width: 150px; height: 150px; border-radius: 50%; background: var(--mint); opacity: .9; }
.mega__intro > * { position: relative; z-index: 1; }
.mega__title { margin: 0; font: 700 1.625rem/1.1 var(--font-display); letter-spacing: var(--track-display); color: var(--navy); }
.mega__blurb { margin: 0 0 6px; font-size: .9375rem; color: var(--slate); max-width: 26ch; }
.mega__links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 16px; margin: 0; padding: 0; list-style: none; }
.mega__link { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 12px 8px 8px; border-radius: var(--r-well); color: var(--navy); font-weight: 600; text-decoration: none; transition: background var(--t-fast); }
.mega__icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--well); color: var(--ink); transition: background var(--t-fast); }

/* ---------------------------------------------------------------------------------------------- the bottom tab bar */
/* Browse pages on a phone: Home, Shop, Deals, How it works, Basket. Five real links, fixed to the bottom, the one
   fixed point of the shop: it never hides on scroll. It steps aside only while a text field has the keyboard or
   search is open. Placed with the pair Chrome asks for under edge-to-edge, which is also exact on iOS: the bar
   reaches under the inset and its padding lifts the items above it. */
.tabbar { position: fixed; z-index: var(--z-dock); left: 0; right: 0; bottom: calc(var(--safe-b) - var(--safe-b-max)); height: calc(var(--bar-tab) + var(--safe-b-max)); padding: 0 var(--safe-r) var(--safe-b-max) var(--safe-l); display: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: #fff; box-shadow: inset 0 1px 0 var(--hair); transition: transform var(--t-slow) var(--ease); }
:where(.chrome-browse) .tabbar { display: grid; }
:where(html.kb-open, html.search-open) .tabbar { transform: translateY(100%); }
.tabbar__item { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; height: 100%; padding-top: 6px; color: var(--muted); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.tabbar__item:focus-visible { outline-offset: -3px; border-radius: 12px; }
.tabbar__pill { position: relative; flex: none; display: grid; place-items: center; width: 56px; height: 30px; border-radius: 15px; color: var(--navy); transition: background var(--t-fast); }
.tabbar__pill > svg { position: relative; }
.tabbar__label { max-width: 100%; overflow: hidden; margin-top: 2px; font-size: .6875rem; font-weight: 600; line-height: 1.273; white-space: nowrap; text-overflow: clip; }   /* at a 200% text size the labels never run into each other */
.tabbar__item[aria-current] .tabbar__pill { background: var(--mint); color: var(--ink); }
.tabbar__item[aria-current] .tabbar__label { color: var(--navy); font-weight: 700; }
.tabbar__item--deals .tabbar__pill { color: var(--ink); }
.tabbar__item--deals .tabbar__pill::before { content: ""; position: absolute; width: 28px; height: 28px; border-radius: 50%; background: var(--lime); }
.tabbar__item--deals[aria-current] .tabbar__pill { background: var(--lime); }
.tabbar__item:active .tabbar__pill { background: var(--well); }
.tabbar__item:active .tabbar__label { opacity: .72; }
.tabbar__count { position: absolute; top: -3px; right: 4px; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); background: var(--mint); color: var(--ink); font-size: .6875rem; font-weight: 800; line-height: 1; box-shadow: 0 0 0 2px #fff; }
.tabbar__item[aria-current] .tabbar__count { background: var(--ink); color: #fff; }

/* ---------------------------------------------------------------------------------------------- the action bar */
/* Product, basket and checkout pages: ONE bar fixed to the bottom with the cash figure, then the payment and
   "89.9% APR representative" at the SAME size, and the page's one action. The pages write the markup
   (.actbar > .actbar__text + a form or link); it shows unless it has [hidden] or .is-away. */
.actbar { position: fixed; z-index: var(--z-dock); left: 0; right: 0; bottom: calc(var(--safe-b) - var(--safe-b-max)); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: calc(var(--bar-act) + var(--safe-b-max)); padding: 8px max(16px, var(--safe-r)) calc(8px + var(--safe-b-max)) max(16px, var(--safe-l)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(16, 11, 52, .10); transition: transform var(--t-slow) var(--ease), visibility 0s linear 0s; }
.actbar.is-away, :where(html.kb-open, html.search-open) .actbar { transform: translateY(110%); visibility: hidden; transition: transform var(--t-slow) var(--ease), visibility 0s linear var(--t-slow); }
.actbar__thumb, .actbar__name { display: none; }
.actbar__text { display: grid; gap: 1px; min-width: 0; margin: 0; }
.actbar__main { font: 800 1.125rem/1.1667 var(--font-display); letter-spacing: var(--track-display); color: var(--ink); }
.actbar__main > svg { margin: -3px 6px 0 0; color: var(--mint-deep); }
.actbar__monthly, .actbar__apr { font: 700 .8125rem/1.231 var(--font-body); color: var(--navy); }
.actbar__apr { white-space: nowrap; }
.actbar__form { margin: 0; }
.actbar .actbar__go { min-height: 52px; min-width: 148px; padding: 0 16px; font-size: .9375rem; font-weight: 700; }   /* .actbar first: components.css (later) styles .btn */
.actbar__go > svg { display: none; }       /* the words alone: with the icon the button took the APR line's room at 360 */
.actbar__go:focus-visible, .actbar__why:focus-visible { outline-offset: -3px; }
.actbar__why { display: inline-flex; align-items: center; justify-content: flex-end; min-height: 48px; max-width: 58vw; color: var(--navy); font-size: var(--fs-sm); font-weight: 700; text-align: right; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 359.98px) { .actbar__monthly, .actbar__apr { font-size: .75rem; } .actbar { gap: 8px; } .actbar .actbar__go { min-width: 132px; padding: 0 14px; } }
/* a narrow phone, or any phone at a large text size: the words above, the button full width */
@media (max-width: 21em) {
  .actbar { grid-template-columns: minmax(0, 1fr); gap: 5px; padding-top: 6px; padding-bottom: calc(6px + var(--safe-b-max)); }
  .actbar__form, .actbar__go { width: 100%; }
  .actbar__apr { white-space: normal; }
  .actbar__why { justify-content: flex-start; max-width: none; text-align: left; }
}
/* the same stacking decided by the bar's own width in rem, so it also follows a root size set in CSS (a media
   query's em does not): at 130% text the button never covers "89.9% APR representative". app.js writes the
   stacked bar's height into --bar-act, so the notice, toasts and the footer stand clear of it. */
.actbar { container: actbar / inline-size; }
@container actbar (max-width: 19rem) {
  .actbar__text, .actbar__form, .actbar > .actbar__go, .actbar__why { grid-column: 1 / -1; }
  .actbar__form, .actbar .actbar__go { width: 100%; }
  .actbar__apr { white-space: normal; }
  .actbar__why { justify-content: flex-start; max-width: none; text-align: left; }
}

/* ---------------------------------------------------------------------------------------------- sheets */
/* One look for every sheet on a phone: a real <dialog> that rises from the bottom, with a grabber, a title and a
   Close button; it can be pulled down by its head (public/js/ui/sheets.js) and Back closes it. The menu keeps its
   own class (.drawer) and is the same box. .sheet--full is the full-screen one (the picture viewer). */
.sheet, .drawer { position: fixed; inset: auto 0 0 0; width: 100%; max-width: none; height: auto; max-height: 88vh; max-height: 88dvh; margin: 0; padding: 0; border: 0; border-radius: var(--r-sheet) var(--r-sheet) 0 0; background: #fff; color: var(--navy); box-shadow: var(--shadow-pop); transition: transform var(--t-med) var(--ease); }
.sheet { overflow: hidden; }
.sheet[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.sheet::backdrop, .drawer::backdrop { background: var(--scrim); }
.sheet[open], .drawer[open] { animation: sheet-in var(--t-slow) var(--ease); }
.sheet.is-closing, .drawer.is-closing { animation: sheet-out var(--t-med) ease-in forwards; }
.sheet[open]::backdrop, .drawer[open]::backdrop { animation: fade-in var(--t-slow) ease-out; }
.sheet.is-closing::backdrop, .drawer.is-closing::backdrop { animation: fade-out var(--t-med) ease-in forwards; }
.sheet.is-dragging, .drawer.is-dragging { animation: none; transition: none; }
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-out { from { transform: translateY(var(--sheet-from, 0px)); } to { transform: translateY(100%); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
.sheet__head, .drawer__head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 4px 0 20px; background: #fff; touch-action: none; }
.sheet__head::before, .drawer__head::before { content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--line); }
.sheet__title, .drawer__title { margin: 0; font: 700 1.25rem/1.2 var(--font-display); letter-spacing: var(--track-display); color: var(--navy); }
.sheet__close { width: 48px; height: 48px; }
.sheet__body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 20px 20px; }
.sheet__foot { padding: 12px 16px calc(12px + var(--safe-b)); background: #fff; border-top: 1px solid var(--hair); }
.sheet--full { inset: var(--site-banner-h, 0px) 0 0 0; max-height: none; height: calc(100vh - var(--site-banner-h, 0px)); height: calc(100dvh - var(--site-banner-h, 0px)); border-radius: 0; }   /* under a test copy's ribbon */

/* the menu ("Shop"): its own box scrolls under a head that stays */
.drawer { overflow-y: auto; overscroll-behavior: contain; padding-bottom: var(--safe-b); }
.drawer__head { position: sticky; top: 0; z-index: 1; }
.drawer__head img { display: none; width: auto; height: 38px; }
.drawer__nav { display: grid; gap: 2px; padding: 6px 12px 8px; }
.drawer__deals { display: flex; align-items: center; gap: 12px; min-height: 56px; margin-bottom: 8px; padding: 0 18px 0 16px; border-radius: 18px; background: var(--lime); color: var(--ink); font: 800 1.125rem/1 var(--font-display); text-decoration: none; }
.drawer__deals span { flex: 1; }
.drawer__top { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 12px 0 8px; border-radius: 16px; color: var(--navy); font-size: 1.0625rem; font-weight: 600; text-decoration: none; cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent; }
.drawer__top::-webkit-details-marker { display: none; }
.drawer__top > span:not(.drawer__icon) { flex: 1; }
.drawer__icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--well); color: var(--ink); }
.drawer__chevron { color: var(--slate); transition: transform var(--t-med) var(--ease); }
.drawer__group[open] > .drawer__top { background: var(--well); }
.drawer__group[open] > .drawer__top .drawer__icon { background: var(--mint); }
.drawer__group[open] > .drawer__top .drawer__chevron { transform: rotate(180deg); }
.drawer__sub { margin: 4px 0 10px; padding: 0 0 0 64px; list-style: none; }
.drawer__sub a { display: flex; align-items: center; min-height: var(--tap); padding-right: 12px; color: var(--slate); text-decoration: none; }
.drawer__sub li:first-child a, .drawer__sub a[aria-current] { color: var(--navy); font-weight: 700; }
.drawer__links { margin: 6px 12px 20px; padding: 10px 0 0; border-top: 1px solid var(--hair); list-style: none; }
.drawer__links a { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 12px 0 18px; border-radius: 14px; color: var(--slate); font-weight: 500; text-decoration: none; }
.drawer__links svg { color: var(--muted); }
:is(.drawer__deals, .drawer__top, .drawer__sub a, .drawer__links a):active { opacity: .72; }
/* without JavaScript (or without <dialog>) the menu is a plain list at the foot of the page, under the heading
   "Shop": the tab bar's Shop link lands on it, and it ends above whatever is docked */
html.no-js .drawer, html.no-dialog .drawer { display: block; position: static; width: auto; height: auto; max-height: none; overflow: visible; padding-bottom: calc(24px + max(var(--tab-now), var(--act-now))); border-radius: 0; border-top: 1px solid var(--hair); box-shadow: none; }
html.no-js .drawer__head, html.no-dialog .drawer__head { position: static; min-height: 0; padding: 24px 20px 6px; }
html.no-js .drawer__head::before, html.no-dialog .drawer__head::before, html.no-js .drawer__close, html.no-dialog .drawer__close { display: none; }

/* ---------------------------------------------------------------------------------------------- footer */
/* A phone: the logo and the social buttons on one row; "Call" as a full-width button and the email as a row; the
   four link groups as rows that open in place (the script closes them: without it they are simply open); the
   lender's panel with the representative example in full; the legal sentences. It ends above whatever is docked. */
.site-footer { position: relative; overflow: hidden; margin-top: calc(var(--section-gap) + 16px); padding-bottom: max(var(--tab-now), var(--act-now)); background: var(--navy); color: var(--on-dark-soft); font-size: var(--fs-sm); content-visibility: auto; contain-intrinsic-size: auto 1000px; }
html.no-js .site-footer, html.no-dialog .site-footer { padding-bottom: 0; }      /* the menu's list is under it and carries the room */
.site-footer::before { content: ""; position: absolute; z-index: 1; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--mint), var(--lime) 55%, var(--coral)); }
.site-footer::after { content: ""; position: absolute; right: -220px; top: -260px; width: 680px; height: 680px; border-radius: 50%; background: radial-gradient(circle, rgba(59, 247, 202, .2), rgba(59, 247, 202, 0) 68%); pointer-events: none; }
.site-footer > .wrap { position: relative; z-index: 1; padding-top: 28px; padding-bottom: 24px; }
.site-footer a { color: inherit; }
.site-footer__top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.site-footer__brand { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px 12px; padding-bottom: 16px; }
.site-footer__logo { grid-column: 1; grid-row: 1; justify-self: start; display: inline-flex; align-items: center; min-height: 48px; border-radius: 8px; }
.site-footer__logo img { display: block; width: auto; height: 36px; }
.site-footer__tagline { display: none; margin: 14px 0 18px; color: var(--mint); font-weight: 600; font-size: .9375rem; }
.site-footer__contact { grid-column: 1 / -1; grid-row: 2; display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.site-footer__contact a { display: flex; align-items: center; gap: 12px; min-height: 48px; color: #fff; font-size: .9375rem; font-weight: 600; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.site-footer__contact svg { color: var(--mint); }
.site-footer__phone a { justify-content: center; min-height: 52px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .85); font-size: 1rem; font-weight: 700; }
.site-footer__map { display: none; }
.site-footer__contact a:active, .site-footer__col a:active, .site-footer__toggle:active { opacity: .72; }
.site-footer__social { grid-column: 2; grid-row: 1; display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.site-footer__col { border-top: 1px solid var(--dark-line); }
.site-footer__heading { margin: 0; padding: 16px 0 4px; font: 700 1.0625rem/1.2 var(--font-display); letter-spacing: 0; color: #fff; }
.site-footer__heading:has(.site-footer__toggle) { padding: 0; }
.site-footer__toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; }
.site-footer__toggle svg { color: var(--mint); transition: transform var(--t-med) var(--ease); }
.site-footer__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.site-footer__col ul { margin: 0; padding: 0 0 8px; list-style: none; }
.site-footer__col a { display: flex; align-items: center; min-height: 48px; color: var(--on-dark-soft); text-decoration: none; }
.site-footer__col a svg { flex: none; margin-left: 7px; color: var(--mint); opacity: .85; }
.site-footer__top > .site-footer__col:last-child { border-bottom: 1px solid var(--dark-line); }
.site-footer__finance { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 12px; margin-top: 20px; padding: 18px 16px; border: 1px solid var(--dark-line); border-radius: var(--r-card); background: rgba(255, 255, 255, .06); }
.site-footer__lender { display: block; width: auto; height: 32px; }
.site-footer__example { margin: 0; color: #fff; font-size: 1rem; line-height: 1.45; }
.site-footer__legal { display: grid; gap: 8px; margin-top: 20px; color: var(--on-dark-muted); font-size: var(--fs-xs); line-height: 1.5; }
.site-footer__legal p { margin: 0; max-width: 108ch; }
.site-footer__legal .site-footer__copy { max-width: none; }
.site-footer__legal p:nth-child(3) { color: var(--on-dark-soft); font-weight: 500; }
.site-footer__copy { margin-top: 6px !important; padding-top: 14px; border-top: 1px solid var(--dark-line); }

/* ---------------------------------------------------------------------------------------------- toasts */
/* A phone: one at a time, at the bottom, where the thumb is: above the tab bar, above a showing action bar and
   above the cookie notice. 56px: one line, an optional one-line detail, one action. */
.toasts { position: fixed; z-index: var(--z-toast); left: 12px; right: 12px; top: auto; bottom: calc(8px + max(var(--tab-now), var(--act-now) + var(--consent-h))); width: auto; display: grid; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 4px 4px 4px 10px; border-radius: var(--r-pill); background: var(--ink); color: #fff; font-size: .9375rem; font-weight: 700; line-height: 1.25; box-shadow: var(--shadow-pop); animation: toast-in var(--t-slow) var(--ease); }
.toast__icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--mint); color: var(--ink); }
.toast--error .toast__icon { background: var(--coral); }
.toast--error { border-radius: 20px; padding-block: 8px; }
.toast__text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.toast__line { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.toast--error .toast__line { -webkit-line-clamp: 4; font-weight: 600; }
.toast__detail { overflow: hidden; font-size: var(--fs-xs); font-weight: 500; color: var(--on-dark-soft); white-space: nowrap; text-overflow: ellipsis; }
.toast__action { flex: none; display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .12); color: var(--mint); font-weight: 800; text-decoration: none; white-space: nowrap; }
.toast__action:focus-visible, .toast__close:focus-visible { outline-color: var(--mint); }
.toast__action:active, .toast__close:active { background: rgba(255, 255, 255, .24); }
.toast__close { flex: none; display: inline-grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes toast-in-top { from { opacity: 0; transform: translateY(-12px) scale(.98); } to { opacity: 1; transform: none; } }
/* app.js moves the toast (a transform on .toasts) to the nearest place clear of credit wording, the notice and the
   bars; where there is none it is held out of sight, still in the live region, until there is */
.toasts .toast--held { opacity: 0; pointer-events: none; animation: none; }
/* where the full toast finds no clear place: one line, 40px high (the product name and "View basket" step aside) */
.toasts .toast--compact { min-height: 40px; padding: 2px 4px 2px 8px; }
.toasts .toast--compact .toast__icon { width: 28px; height: 28px; }
.toasts .toast--compact:not(.toast--error) .toast__line { -webkit-line-clamp: 1; }
.toasts .toast--compact .toast__detail, .toasts .toast--compact .toast__action { display: none; }
.toasts .toast--compact .toast__close { width: 36px; height: 36px; }

/* ---------------------------------------------------------------------------------------------- a phone on its side */
/* Still under 700px wide (568 to 699 wide, 320 to 400 high): the header scrolls away with the page, the tab bar
   is 48px with the icon beside the label (tokens.css lowers --bar-tab), sheets may use nearly all the height. */
@media (orientation: landscape) and (max-height: 480px) and (max-width: 699.98px) {
  html { --stuck-h: var(--site-banner-h, 0px); }
  .site-header { position: static; }
  .tabbar__item { flex-direction: row; justify-content: center; gap: 6px; padding-top: 0; }
  .tabbar__pill { width: 40px; }
  .tabbar__label { margin-top: 0; }
  .sheet, .drawer { max-height: 96vh; max-height: 96dvh; }
}

/* ===== 2 TABLET AND UP ===== */
/* TABLET_DESKTOP_SPEC WA1 to WA8. One header for tablet and desktop: a 64px row (logo, search, Help, basket) and
   a 48px category row that steps aside on the way down the page (html.nav-tucked, nav.js). No tab bar, no Back,
   no sheets: the phone's chrome ends at 699px. */
@media (min-width: 700px) {
  html { scroll-padding-top: calc(var(--stuck-h) + 16px); scroll-padding-bottom: calc(max(var(--act-now), var(--tray-now)) + var(--consent-h) + 16px); }
  html:has(body.chrome-browse) { --tab-now: 0px; }
  html:has(body.chrome-browse .announce) { --announce-h: 0px; }
  html:has([data-consent-banner]:not([hidden])) { --consent-h: 200px; }   /* the guess until app.js measures (region 1 has the phone's) */
  html:has(.actbar[data-buybar][hidden]):has([data-consent-banner]:not([hidden])) { --act-now: 0px; }   /* the bar only follows the button here */
  html:has(.compare-tray:not([hidden])) { --tray-now: 72px; }       /* the compare tray is drawn from 700px only */
  html.header-away { --stuck-h: calc(var(--site-banner-h, 0px) + var(--header-h)); }
  html.search-open { overflow: visible; }                             /* a dropdown, not a screen: the page behind still scrolls */
  body { padding-bottom: 0; }
  .tabbar, .site-header__menu, .site-header__back, .site-header__find, .site-header__cancel { display: none !important; }
  html.no-js .drawer, html.no-dialog .drawer { display: none; }      /* the category row is the menu here, with or without script */
  .icon-btn { width: 46px; height: 46px; }
  .icon-btn:active { background: transparent; }
  .icon-btn--line:active { background: var(--card); }
  .icon-btn--on-dark:active { background: rgba(255, 255, 255, .1); }

  /* the announcement: its own line above the header on every page */
  .announce { display: block; font-size: var(--fs-sm); }
  .announce__link { justify-content: center; gap: 10px; height: auto; min-height: 44px; padding: 8px 0; text-align: center; }
  .announce__text { flex: 0 1 auto; overflow: visible; white-space: normal; text-overflow: clip; }
  .announce__flash { width: 24px; height: 24px; }

  /* the header row: 64px */
  .site-header { position: sticky; top: var(--site-banner-h, 0px); padding-top: 0; transform: none; }
  .site-header.is-away { transform: none; }
  .site-header__row { position: relative; z-index: 2; display: flex; align-items: center; gap: 16px; min-height: 64px; padding-block: 0; background: #fff; }
  .site-header__logo { display: block; order: 0; height: auto; margin: 0; padding-inline: 0; border-radius: 8px; }
  .site-header__logo img { width: auto; height: 40px; }
  .site-header__logo--plate img { height: 48px; }                     /* the same 40px mark inside its plate */
  .search { display: flex; position: static; flex: 1 1 auto; height: 48px; max-width: 680px; margin-inline: auto; padding: 0 4px 0 18px; }
  .search__input { padding: 0 12px; }
  .search__submit { width: auto; height: 40px; padding: 0 14px 0 18px; justify-content: normal; }   /* the word "Search" shows */
  .search__submit::after { content: none; }
  .search__submit:active { background: var(--navy); }
  .search__submit-text { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
  .site-header__aid { display: flex; align-items: center; gap: 4px; }
  .site-header__help { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--navy); text-decoration: none; }
  .site-header__phone, .site-header__account { display: none; }
  .site-header__aidlabel { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .basket-link { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: auto; min-width: 150px; height: 48px; margin-right: 0; padding: 0 20px 0 16px; background: var(--navy); }   /* room for the count kept: the search field does not move when the first item goes in */
  .basket-link::before { content: none; }
  .basket-link__label { display: inline; }
  .basket-link__count { position: static; min-width: 24px; height: 24px; margin-right: -6px; padding: 0 7px; font-size: var(--fs-xs); box-shadow: none; }

  /* the category row: 48px */
  .primary-nav { display: block; border-top: 1px solid var(--hair); background: #fff; }
  .primary-nav__list { min-height: 48px; max-height: 48px; gap: 0 2px; margin: 0 -8px; }
  .primary-nav__list.is-fitted { max-height: none; }
  .primary-nav__link { min-height: 48px; padding: 0 8px; }
  .primary-nav__link::after { left: 8px; right: 8px; }
  .primary-nav__item--mega .primary-nav__link { padding-right: 2px; }
  .primary-nav__toggle { width: 24px; height: 48px; }   /* 24, not 28: then all six categories and Deals fit one row from 820px (measured: 795px of words for 788) */
  .primary-nav__item--deals { padding-right: 8px; }
  .primary-nav__deals { height: 36px; padding: 0 14px 0 10px; }
  .primary-nav__item--mega .primary-nav__more { padding-right: 8px; }
  .primary-nav__item--mega .primary-nav__more::after { right: 8px; }

  /* the finance strip: only where no page body carries the APR beside its figures */
  .finance-strip { display: block; }
  .finance-strip__link { min-height: 36px; padding: 4px 0; justify-content: center; font-size: var(--fs-sm); }
  .page-listing .finance-strip, .page-product .finance-strip, .page-basket .finance-strip,
  .page-checkout .finance-strip, .page-compare .finance-strip { display: none; }

  /* going down the page: the header moves up by the category row's 49px and its first row moves back down by the
     same, so the row stays put, the category row is behind it, and the page's layout does not change */
  .site-header, .site-header__row { transition: transform var(--t-slow) var(--ease); }
  html.nav-tucked .site-header { transform: translateY(-49px); }
  html.nav-tucked .site-header__row { transform: translateY(49px); }
  html.nav-tucked .primary-nav { visibility: hidden; transition: visibility 0s linear var(--t-slow); }
  html.nav-tucked { --stuck-h: calc(var(--site-banner-h, 0px) + 65px); }

  /* a category's menu: hangs under the row, never taller than the window under the header */
  .mega { max-height: calc(100vh - var(--stuck-h)); max-height: calc(100dvh - var(--stuck-h)); overflow-y: auto; overscroll-behavior: contain; padding: 20px 0 24px; }
  .mega__inner { display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); gap: 24px; align-items: start; }
  .mega__intro { padding: 22px; }
  .mega__title { font-size: 1.375rem; overflow-wrap: anywhere; }
  .mega__intro .btn { height: auto; min-height: 44px; padding-block: 8px; white-space: normal; text-align: left; line-height: 1.25; }   /* "Shop all TVs & Entertainment" wraps inside the intro, never past it */
  .mega__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
  .mega__link { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 6px 12px 6px 6px; border-radius: var(--r-well); }
  .mega__pic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--well); color: var(--ink); overflow: hidden; transition: background var(--t-fast); }
  .mega__pic img { display: block; width: 100%; height: 100%; padding: 3px; object-fit: contain; mix-blend-mode: multiply; }
  .mega__text { display: grid; min-width: 0; }
  .mega__name { font-weight: 600; line-height: 1.3; }
  .mega__count { font-size: var(--fs-xs); font-weight: 500; color: var(--muted); }
  .mega__brands, .mega__deal { display: none; }

  /* search from 700px: a dropdown under the field; the credit line first and fixed, the rows scroll, "See all"
     stays at the foot (the same markup as the phone's, laid out here) */
  .search__panel { position: absolute; inset: calc(100% + 8px) auto auto 50%; z-index: var(--z-panel); width: min(680px, 100%); height: auto; transform: translateX(-50%);
    display: flex; flex-direction: column; max-height: min(680px, calc(var(--vvh, 100dvh) - var(--site-banner-h, 0px) - 84px)); overflow: hidden;
    padding: 8px; background: #fff; border: 1px solid var(--hair); border-radius: var(--r-card); box-shadow: var(--shadow-pop); }
  .search__panel[hidden] { display: none; }
  .search__heading { display: none; }
  .search__note { position: static; order: -1; flex: none; margin: 0 0 6px; padding: 9px 12px; border: 0; border-radius: var(--r-sm); background: var(--mint-soft); color: var(--navy); font-size: var(--fs-xs); font-weight: 600; line-height: 1.4; }
  .search__list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; gap: 2px; }
  .search__option { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; min-height: 68px; padding: 6px 12px 6px 6px; border-radius: var(--r-well); }
  .search__option:active { opacity: 1; }
  .search__thumb { width: 56px; height: 56px; grid-row: auto; align-self: auto; }
  .search__cat { display: block; }
  .search__figures { grid-column: auto; display: grid; align-items: normal; justify-items: end; gap: 1px; text-align: right; white-space: nowrap; }
  .search__price { font-size: 1.0625rem; }
  .search__monthly { font-size: var(--fs-xs); }
  .search__all { position: sticky; bottom: 0; width: 100%; margin: 6px 0 0; padding: 0 16px; border-radius: var(--r-well); }
  .search__all:active { background: var(--navy); }
  .search__empty { padding: 18px 14px; }

  /* the action bar from 700px: product pages (700 to 1199px) and the basket in a window too short to pin its card:
     a bar at the foot of the window; never on the apply-by-phone and "busy" pages (the number is in the page) */
  .actbar { left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 16px; min-height: var(--bar-act); padding: 0 max(var(--gutter), calc((100% - var(--wrap)) / 2)) env(safe-area-inset-bottom, 0px); }
  .actbar__thumb { display: block; flex: none; width: 48px; height: 48px; padding: 3px; border-radius: var(--r-sm); background: var(--well); object-fit: contain; mix-blend-mode: multiply; }
  .actbar__name { display: none; }
  .actbar__text { flex: 1 1 auto; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; gap: 2px 14px; min-width: 0; margin: 0; }
  .actbar__main { font-size: 1.25rem; }
  .actbar__monthly, .actbar__apr { font-size: .875rem; line-height: 1.3; white-space: nowrap; }   /* one size: the APR is 100% of the figure */
  .actbar .actbar__go { flex: none; min-height: 48px; padding: 0 22px; font-size: 1rem; }
  .actbar__go > svg { display: inline-block; }
  .actbar__why { max-width: 40%; }
  .page-checkout .actbar { display: none; }
  html:has(body.page-checkout .actbar:not([hidden]):not(.is-away)) { --act-now: 0px; }     /* (0,4,2): beats the phone's rule; nothing is docked */

  /* any other sheet at this width is a centred dialog (only the picture viewer is ever open here, and it is full) */
  .sheet { inset: 0; width: min(560px, calc(100% - 48px)); max-height: min(88dvh, 820px); margin: auto; border-radius: var(--r-hero); }
  .sheet--full { inset: var(--site-banner-h, 0px) 0 0 0; width: 100%; max-height: none; margin: 0; border-radius: 0; }
  .sheet[open] { animation: fade-in var(--t-med) ease-out; }
  .sheet.is-closing { animation: fade-out var(--t-med) ease-in forwards; }
  .sheet__head { touch-action: auto; }
  .sheet__head::before { content: none; }

  /* the footer (WA8): the brand block as one row across the top, then four columns of links with 44px rows, the
     lender's mark beside the example, the legal sentences */
  .site-footer { padding-bottom: max(var(--act-now), var(--tray-now)); content-visibility: visible; contain-intrinsic-size: none; }
  html.no-js .site-footer, html.no-dialog .site-footer { padding-bottom: max(var(--act-now), var(--tray-now)); }
  .site-footer > .wrap { padding-top: 60px; padding-bottom: 36px; }
  .site-footer__top { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 24px; }
  .site-footer__brand { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 36px; row-gap: 0; padding-bottom: 30px; border-bottom: 1px solid var(--dark-line); }
  .site-footer__logo { grid-column: 1; grid-row: 1; justify-self: auto; }
  .site-footer__logo img { height: 50px; }
  .site-footer__tagline { display: block; grid-column: 1; grid-row: 2; margin: 10px 0 0; }
  .site-footer__contact { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 28px; }
  .site-footer__contact a { display: inline-flex; min-height: 44px; }
  .site-footer__phone a { justify-content: normal; min-height: 44px; border-radius: 0; box-shadow: none; font-size: .9375rem; font-weight: 600; }
  .site-footer__call { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .site-footer__map { display: list-item; list-style: none; }
  .site-footer__contact a:active, .site-footer__col a:active { opacity: 1; }
  .site-footer__social { grid-column: 3; grid-row: 1 / span 2; gap: 10px; margin: 0; }
  .site-footer__col, .site-footer__top > .site-footer__col:last-child { border: 0; }
  .site-footer__heading { margin: 6px 0 10px; padding: 0; }
  .site-footer__col ul { padding: 0; }
  .site-footer__col a { display: inline-flex; min-height: 44px; }
  .site-footer__finance { grid-template-columns: auto minmax(0, 1fr); gap: 20px 32px; margin-top: 44px; padding: 26px 30px; }
  .site-footer__lender { height: 58px; }
  .site-footer__example { line-height: 1.55; }
  .site-footer__legal { margin-top: 28px; line-height: 1.55; }
  .site-footer__copy { margin-top: 10px !important; padding-top: 18px; }

  /* toasts: compact, under the header that is showing */
  .toasts { top: calc(var(--stuck-h) + 8px); right: max(var(--gutter), calc((100% - var(--wrap)) / 2)); bottom: auto; left: auto; width: min(calc(100% - 2 * var(--gutter)), 400px); }
  .toast { padding: 6px 6px 6px 10px; animation-name: toast-in-top; }
  .toast--error { padding-block: 10px; }
  .toast__action { min-height: 44px; }
  .toast__action:active { background: rgba(255, 255, 255, .12); }
}
@media (min-width: 1000px) {
  .mega__links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .actbar__name { display: block; flex: 1 1 0; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; color: var(--navy); }
  .actbar__text { flex: 0 1 auto; flex-wrap: nowrap; }
}
/* a tablet on its side (1000 to 1199px): the category words spread out a little, not one tight group with an
   empty row before Deals */
@media (min-width: 1000px) and (max-width: 1199.98px) and (orientation: landscape) {
  .primary-nav__list { gap: 0 18px; }
}
/* LOW: a phone on its side, 700px or wider: nothing is stuck at the top */
@media (min-width: 700px) and (max-height: 520px) {
  html { --stuck-h: var(--site-banner-h, 0px); }
  .site-header { position: static; }
}

/* ===== 3 DESKTOP ===== */
@media (min-width: 1200px) {
  .site-header__row { gap: 24px; }
  .site-header__aid { gap: 18px; }
  .site-header__help, .site-header__phone, .site-header__account { display: inline-flex; align-items: center; gap: 6px; width: auto; height: 44px; border-radius: 8px; color: var(--slate); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; white-space: nowrap; }
  .site-header__help .site-header__aidlabel { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; clip-path: none; }
  .site-header__phone svg, .site-header__help svg, .site-header__account svg { color: var(--muted); }

  /* the rich menu panel: intro, sub-categories with pictures, top brands, the top deal */
  .mega { padding: 28px 0 32px; }
  .mega__inner { grid-template-columns: minmax(200px, 260px) minmax(0, 1fr) minmax(160px, 200px) minmax(260px, 300px); gap: 32px; }
  .mega--more .mega__inner { grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); }
  .mega__links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mega__link { min-height: 88px; }
  .mega__pic { width: 72px; height: 72px; border-radius: var(--r-well); background: #fff; box-shadow: inset 0 0 0 1px var(--hair); }
  .mega__pic img { padding: 6px; }
  .mega__links > .mega__all { display: none; }       /* the intro's "Shop all" button says it once here (the rows are the sub-categories) */
  .mega__name { font-size: 1rem; }
  .mega__brands, .mega__deal { display: grid; align-content: start; gap: 2px; }
  .mega__heading { margin: 0 0 6px; font-size: var(--fs-eyebrow); font-weight: 700; letter-spacing: var(--track-eyebrow); text-transform: uppercase; color: var(--muted); }
  .mega__brand { display: flex; align-items: center; min-height: 44px; color: var(--navy); font-weight: 600; text-decoration: none; }
  .mega__deal { justify-items: start; gap: 8px; padding: 16px; border: 1px solid var(--hair); border-radius: var(--r-card); color: var(--navy); text-decoration: none; transition: box-shadow var(--t-fast); }
  .mega__dealimg { justify-self: center; width: 120px; height: 120px; object-fit: contain; mix-blend-mode: multiply; }
  .mega__dealname { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; line-height: 1.3; }
  .mega__deal .price { width: 100%; }

  /* the product page's action bar is a band under the header here, clear of the cookie notice at the foot */
  .actbar[data-buybar] { inset: var(--stuck-h) 0 auto 0; z-index: calc(var(--z-header) - 1); min-height: 60px; padding-bottom: 0; border-top: 0; border-bottom: 1px solid var(--line); box-shadow: 0 10px 24px rgba(16, 11, 52, .08); transition: transform var(--t-slow) var(--ease), visibility 0s linear var(--t-slow), top var(--t-slow) var(--ease); }
  .actbar[data-buybar].is-away { transform: translateY(-110%); }
  .actbar[data-buybar] .actbar__thumb { width: 44px; height: 44px; }
  .actbar[data-buybar] .actbar__main { font-size: 1.375rem; }
  .actbar[data-buybar] .actbar__go { min-height: 44px; }
  html:has(.actbar[data-buybar]:not([hidden]):not(.is-away)) { --act-now: 0px; scroll-padding-top: calc(var(--stuck-h) + 76px); }   /* the band is at the top: nothing is docked at the foot */

  /* the footer: the brand block and the four columns in one row */
  .site-footer__top { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 40px 48px; }
  .site-footer__top:has(> :nth-child(5)) { grid-template-columns: minmax(0, 1.45fr) repeat(3, minmax(0, .85fr)) minmax(0, 1.1fr); gap: 40px; }
  .site-footer__brand { grid-column: auto; display: block; padding-bottom: 0; border-bottom: 0; }
  .site-footer__tagline { margin: 14px 0 18px; }
  .site-footer__contact { display: grid; gap: 0; justify-content: start; }
  .site-footer__social { display: flex; margin: 14px 0 0; }
}
@media (min-width: 1440px) { .site-header__account .site-header__aidlabel { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; clip-path: none; } }
@media (min-width: 1600px) { .mega__links { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ===== 4 CAPABILITY AND MODES ===== */
/* a mouse or trackpad: hover effects (a finger never leaves anything "lifted") */
@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration-thickness: 2.5px; }
  .icon-btn:hover { background: var(--well); }
  .icon-btn--on-dark:hover { background: var(--mint); color: var(--ink); }
  .link-arrow:hover { text-decoration-color: var(--navy); }
  .link-arrow:hover svg { transform: translateX(3px); }
  a.announce__link:hover .announce__text { text-decoration: underline; text-underline-offset: 3px; }
  .search:not(:focus-within):hover { border-color: var(--line); }      /* :not(): the focused field keeps its navy border, as it did when this rule came first */
  .search__submit:hover { background: var(--slate); }
  .search__option:hover { background: var(--well); }
  .search__option:hover .search__thumb { background: #fff; }
  .search__all:hover { background: var(--slate); }
  .search__chip:hover { box-shadow: inset 0 0 0 2px var(--navy); }
  .site-header__cancel:hover { text-decoration: underline; }
  .basket-link:hover { background: var(--slate); }
  .basket-link:hover::before { background: var(--slate); }
  .primary-nav__item:hover .primary-nav__link::after { transform: scaleX(1); }
  .primary-nav__deals:hover { transform: translateY(-1px); }
  .primary-nav__deals:not([aria-current]):hover { box-shadow: var(--glow-lime); }      /* the current page keeps its ring, as it did when this rule came first */
  .mega__link:hover { background: var(--well); }
  .mega__link:hover :is(.mega__icon, .mega__pic) { background: var(--mint); }
  .mega__brand { min-height: 36px; }
  .mega__brand:hover { text-decoration: underline; }
  .mega__deal:hover { box-shadow: var(--shadow-lift); }
  .site-header__aid a:hover { color: var(--navy); text-decoration: underline; }
  .finance-strip__link:hover .finance-strip__more { text-decoration-thickness: 2.5px; }
  .tabbar__item:hover .tabbar__label { color: var(--navy); }
  .drawer__top:hover { background: var(--well); }
  .drawer__sub a:hover { color: var(--navy); text-decoration: underline; }
  .drawer__links a:hover { background: var(--well); color: var(--navy); }
  .site-footer__contact a:hover span { text-decoration: underline; }
  .site-footer__col a:hover { color: #fff; text-decoration: underline; }
  .site-footer__toggle:hover { text-decoration: underline; }
  .toast__action:hover { background: var(--mint); color: var(--ink); }
  .toast__close:hover { background: rgba(255, 255, 255, .24); }
}

/* a finger (or any coarse pointer) from 700px: every header control is 44px or more to press. The category arrow
   stays 24px wide to the eye (six categories and Deals fit one row at 820) and takes 10px more each side to press;
   the word beside it opens the same menu, so a press that lands on the edge between them does the same thing. */
@media (min-width: 700px) and (any-pointer: coarse) {
  .primary-nav__toggle { position: relative; z-index: 1; }
  .primary-nav__toggle::before { content: ""; position: absolute; inset: 0 -10px; }
  .primary-nav__deals { height: 44px; }
  .search__submit { height: 44px; }
}

@media (min-width: 700px) and (hover: hover) and (pointer: fine) {
  .search__option { min-height: 60px; }                               /* a mouse: closer rows, six of them fit a 720px window */
}

/* page changes: a short cross-fade of the whole page (ignored where it is not supported) */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 160ms; }
}

/* ---------------------------------------------------------------------------------------------- less motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .announce, .site-header, .finance-strip, .drawer, .toasts, .skip-link, .search-scrim, .tabbar, .actbar, .compare-tray { display: none !important; }
  body { background: #fff; }
  .site-footer { background: #fff; color: #000; padding-bottom: 0; }
}
