/* findcheaper.men — one stylesheet. Tokens first (light, then dark), then layout: header, sidebar, results, cards, live
   search strip, drawer (product detail), popovers, toasts. Class names are the ones the js/ modules render. */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --page: #f4f3ef;
  --surface: #ffffff;
  --surface-2: #f1f0eb;
  --surface-3: #e8e7e1;
  --ink: #161614;
  --ink-2: #4b4a45;
  --muted: #6b6962;
  --line: rgba(22, 22, 20, 0.08);
  --line-2: rgba(22, 22, 20, 0.14);
  --grid: #e6e5df;
  --axis: #c8c6bc;
  --accent: #0f7a4c;
  --accent-2: #0b6440;
  --accent-ink: #ffffff;
  --accent-fill: #0f7a4c;   /* filled buttons and badges (dark: a deeper green than the text one) */
  --accent-fill-2: #0b6440;
  --accent-soft: #e2f3ea;
  --good: #0b7a3e;
  --used: #6a4fd8;
  --used-soft: #eeebfc;
  --warn: #9a5b00;
  --warn-soft: #fcf0d9;
  --bad: #b3261e;
  --bad-soft: #fbe5e3;
  --star: #e8a200;
  --img-bg: #f5f5f2;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  --other: #a9a79f;
  --r-sm: 0.5714rem;
  --r: 0.8571rem;
  --r-lg: 1.1429rem;
  --shadow-1: 0 1px 0.1429rem rgba(22, 22, 20, 0.04), 0 1px 1px rgba(22, 22, 20, 0.03);
  --shadow-2: 0 0.1429rem 0.4286rem rgba(22, 22, 20, 0.05), 0 0.8571rem 2.2857rem -0.5714rem rgba(22, 22, 20, 0.12);
  --shadow-pop: 0 0.2857rem 0.8571rem rgba(22, 22, 20, 0.08), 0 1.7143rem 3.4286rem -0.8571rem rgba(22, 22, 20, 0.22);
  --head-h: 4.5714rem;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  /* Fluid type: every size in this file is in rem, so text, spacing and cards all grow with the screen.
     1rem = 14px on phones and laptops (≤1440px), then grows linearly: ≈16px at 1920, ≈20px at 2560, 26px at 3840.
     In rem (not px), so a person's own browser text size still applies. */
  font-size: clamp(0.875rem, 0.425rem + 0.5vw, 1.625rem);
  /* the text scale: use these, not ad-hoc sizes */
  --text-xs: 0.7857rem;   /* 11px — labels, badges, units */
  --text-sm: 0.8571rem;   /* 12px — meta, timestamps */
  --text-md: 0.9286rem;   /* 13px — secondary text, controls */
  --text-base: 1rem;      /* 14px — body */
  --text-lg: 1.1429rem;   /* 16px — section titles */
  --text-xl: 1.4286rem;   /* 20px — headings, card prices */
  --text-2xl: 1.7143rem;  /* 24px — page titles */
  --text-3xl: 2.4286rem;  /* 34px — the best price */
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
/* laptops and desktops: three quarters of that (it read best at 75% zoom), so more fits on the screen: 12px at 1280,
   ≈12.7px at 1512, ≈14.7px at 1920; phones and tablets keep the size above */
@media (min-width: 1024px) { :root { font-size: clamp(0.75rem, 0.31875rem + 0.5vw, 1.25rem); } }
/* dark, by Material's dark-theme rules (m2.material.io/design/color/dark-theme): a dark grey base (#121212-ish, not
   black) with each layer up a little lighter (page → cards → chips), text off-white (~87% / ~70% / ~60%: less glare
   than pure white), the brand green desaturated for text and links and deepened for filled buttons (white text on it),
   every pair at WCAG AA (4.5:1) or better; product photos (white backgrounds), the brightest areas, on a dimmer box */
/* dark: the system's choice unless the person picked light; or picked dark (data-theme on <html>, js/theme.js) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #121211;
    --surface: #1b1b19;
    --surface-2: #232321;
    --surface-3: #2c2c29;
    --ink: #e6e4df;
    --ink-2: #b5b3ab;
    --muted: #8e8c84;
    --line: rgba(255, 255, 255, 0.09);
    --line-2: rgba(255, 255, 255, 0.16);
    --grid: #2a2a27;
    --axis: #45443f;
    --accent: #5bbd8f;
    --accent-2: #7ccaa4;
    --accent-ink: #ffffff;
    --accent-fill: #1e7d55;
    --accent-fill-2: #196a48;
    --accent-soft: #16271e;
    --good: #5cc48f;
    --used: #a99af0;
    --used-soft: #26213f;
    --warn: #e0a94a;
    --warn-soft: #382a10;
    --bad: #f0877d;
    --bad-soft: #3a1b18;
    --star: #f5b82e;
    --img-bg: #dcdbd6; /* dimmer than a photo's white: the photo blends into it (mix-blend-mode below) */
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
    --s5: #d55181; --s6: #2fa52f; --s7: #9085e9; --s8: #e66767;
    --other: #5f5d57;
    --shadow-1: none;
    --shadow-2: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 1.1429rem 2.8571rem -0.8571rem rgba(0, 0, 0, 0.6);
    --shadow-pop: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 1.7143rem 4rem -0.8571rem rgba(0, 0, 0, 0.7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #121211;
  --surface: #1b1b19;
  --surface-2: #232321;
  --surface-3: #2c2c29;
  --ink: #e6e4df;
  --ink-2: #b5b3ab;
  --muted: #8e8c84;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --grid: #2a2a27;
  --axis: #45443f;
  --accent: #5bbd8f;
  --accent-2: #7ccaa4;
  --accent-ink: #ffffff;
    --accent-fill: #1e7d55;
    --accent-fill-2: #196a48;
  --accent-soft: #16271e;
  --good: #5cc48f;
  --used: #a99af0;
  --used-soft: #26213f;
  --warn: #e0a94a;
  --warn-soft: #382a10;
  --bad: #f0877d;
  --bad-soft: #3a1b18;
  --star: #f5b82e;
  --img-bg: #dcdbd6; /* dimmer than a photo's white: the photo blends into it (mix-blend-mode below) */
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --s5: #d55181; --s6: #2fa52f; --s7: #9085e9; --s8: #e66767;
  --other: #5f5d57;
  --shadow-1: none;
  --shadow-2: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 1.1429rem 2.8571rem -0.8571rem rgba(0, 0, 0, 0.6);
  --shadow-pop: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 1.7143rem 4rem -0.8571rem rgba(0, 0, 0, 0.7);
}

/* ---------- base */
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body { margin: 0; background: var(--page); color: var(--ink); min-height: 100vh; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
/* one solid look for selected text everywhere: its own colour may be transparent (gradient headings) or match the
   highlight (dark text on chips in dark mode), so the colour is set too */
::selection { background: var(--accent-fill); color: var(--accent-ink); -webkit-text-fill-color: var(--accent-ink); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: var(--text-sm); }
.nowrap { white-space: nowrap; }
.err { color: var(--bad); }
.warn { color: var(--warn); }
.ok { color: var(--good); font-weight: 650; }
.fresh { color: var(--s1); font-weight: 600; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: var(--text-sm); background: var(--surface-2); padding: 1px 0.4286rem; border-radius: 0.3571rem; }
h1 { font-size: var(--text-xl); line-height: 1.25; margin: 0 0 0.4286rem; letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: var(--text-lg); margin: 2rem 0 0.7143rem; letter-spacing: -0.01em; font-weight: 650; }
svg.i { width: 1.2857rem; height: 1.2857rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2857rem; }
svg.i.fill { fill: currentColor; }

/* ---------- controls */
input, select, textarea, button { font: inherit; color: inherit; }
input[type=search], input[type=text], input[type=url], input[type=number], input:not([type]), select, textarea {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 0.5714rem 0.7857rem; min-width: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:hover, select:hover, textarea:hover { border-color: var(--axis); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 0.2143rem var(--accent-soft); }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 0.1429rem solid var(--accent); outline-offset: 0.1429rem; }
select {
  appearance: none; padding-inline-end: 2.1429rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386847c' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.5714rem center; background-size: 1.1429rem;
}
textarea { width: 100%; resize: vertical; }
button {
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 0.4286rem;
  border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-sm); padding: 0.5rem 1rem; font-weight: 550; font-size: var(--text-md);
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.05s;
}
button:hover { background: var(--surface-2); }
button:active { transform: translateY(0.5px); }
button.primary { background: var(--accent-fill); color: var(--accent-ink); border-color: transparent; box-shadow: 0 1px 0.1429rem rgba(15, 122, 76, 0.25); }
button.primary:hover { background: var(--accent-fill-2); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.ghost { background: transparent; border-color: transparent; color: var(--ink-2); white-space: nowrap; padding: 0.5rem 0.7143rem; }
button.ghost:hover { background: var(--surface-2); color: var(--ink); }
button.link { border: 0; background: none; padding: 0 0.1429rem; color: var(--accent); font-weight: 600; display: inline; }
button.link:hover { background: none; text-decoration: underline; text-underline-offset: 0.2143rem; }
button.ic {
  width: 2.2857rem; height: 2.2857rem; padding: 0; border-radius: var(--r-sm); background: transparent; border: 1px solid transparent; color: var(--muted);
}
button.ic:hover { background: var(--surface-2); color: var(--ink); }
button.ic.on { color: var(--star); }
button.ic svg.i { width: 1.2143rem; height: 1.2143rem; }
button.spin svg.i, button.spin i { animation: spin 0.9s linear infinite; }
button.spin { cursor: progress; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { display: inline-block; width: 0.7857rem; height: 0.7857rem; border: 0.1429rem solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -1px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 3s !important; transition: none !important; } }
label.inline { display: inline-flex; gap: 0.4286rem; align-items: center; color: var(--ink-2); }
.chips { display: flex; gap: 0.4286rem; flex-wrap: wrap; align-items: center; }
.chip {
  border-radius: 71.3571rem; padding: 0.3571rem 0.8571rem; font-size: var(--text-md); font-weight: 500; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2);
}
.chip:hover { color: var(--ink); border-color: var(--axis); background: var(--surface); }
.chip.on { background: var(--ink); color: var(--page); border-color: transparent; }
.seg { display: inline-flex; padding: 0.2143rem; gap: 0.1429rem; background: var(--surface-2); border-radius: 0.7143rem; }
.seg button { border: 0; border-radius: 0.5rem; padding: 0.2857rem 0.7857rem; font-size: var(--text-md); font-weight: 550; background: transparent; color: var(--ink-2); }
.seg button:hover { color: var(--ink); background: transparent; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 0.2857rem; font-size: var(--text-xs); font-weight: 600; padding: 0.1429rem 0.5714rem; border-radius: 71.3571rem; white-space: nowrap; line-height: 1.35; }
.badge.low { background: var(--accent-soft); color: var(--good); }
.badge.off { background: var(--surface-2); color: var(--ink-2); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.new { background: var(--s1); color: #fff; }
.badge.cond { background: var(--used-soft); color: var(--used); }

/* ---------- header */
.top {
  position: sticky; top: 0; z-index: 20; min-height: 4.5714rem;
  display: flex; align-items: center; gap: 0.7143rem;
  /* the header's edges line up with the page's (.wrap) on wide screens */
  padding: 0 max(1.4286rem, calc((100vw - max(1680px, 70vw)) / 2 + 1.7143rem));
  background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(1.6) blur(1rem); -webkit-backdrop-filter: saturate(1.6) blur(1rem);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 0.6429rem; text-decoration: none; font-weight: 750; font-size: var(--text-lg); letter-spacing: -0.03em; margin-inline-end: 0.7143rem; white-space: nowrap; }
.brand .logo { width: 2.1429rem; height: 2.1429rem; border-radius: 0.6429rem; display: grid; place-items: center; background: linear-gradient(140deg, #19a067, #0b6440); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 0.1429rem 0.4286rem rgba(15, 122, 76, 0.3); }
.brand .logo svg { width: 1.2857rem; height: 1.2857rem; stroke-width: 2.2; }
.brand b { font-weight: 750; line-height: 1.15; }
/* the line under the name (the header and the footer): "You can find cheaper, men!" */
/* the sale week (Api/SaleEvent.cs): a stripe over the header, Home's banner, a tag on its stores' deals */
body.ev .top::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, #ff2e63, #ff8a3d, #ffd23f, #ff2e63); }
.evbanner { display: flex; align-items: center; gap: 1.1429rem; flex-wrap: wrap; margin: 0.5714rem 0 1.1429rem; padding: 0.8571rem 1.2857rem; border-radius: var(--r); text-decoration: none; color: #fff;
  background: radial-gradient(120% 160% at 0% 0%, #ff9a3d 0%, transparent 55%), linear-gradient(110deg, #e1134f 0%, #ff2e63 45%, #ff6a3d 100%); box-shadow: 0 0.5714rem 1.7143rem -0.5714rem rgba(225, 19, 79, 0.55); }
.evbanner:hover { filter: brightness(1.04); }
/* a store's own campaign (Carrefour's 5-10-20), in its own banner's look: flat blue, a red button, its products on the right */
.evbanner.promo { background: #015496; box-shadow: 0 0.5714rem 1.7143rem -0.5714rem rgba(1, 84, 150, 0.6); padding-block: 0.5714rem; }
.evbanner.promo .evname { text-shadow: none; }
.evbanner.promo .evgo { background: #f10011; color: #fff; border-radius: 0.4286rem; padding: 0.6429rem 1.4286rem; text-transform: uppercase; letter-spacing: 0.02em; }
.evpics { display: flex; gap: 0.7143rem; margin-inline-start: auto; }
.evpics > span { position: relative; width: 3.7143rem; height: 3.7143rem; border-radius: 0.5714rem; background: #fff; display: grid; place-items: center; }
.evpics .evpic { width: 86%; height: 86%; object-fit: contain; }
.evpics i { position: absolute; left: -0.3571rem; bottom: -0.3571rem; background: #f84033; color: #fff; font-weight: 800; font-size: 0.7857rem; line-height: 1; font-style: normal; padding: 0.2143rem 0.4286rem; border-radius: 99rem; }
.evbanner + .evbanner { margin-top: -0.5714rem; }
/* the stores' own sales on now (js/home.js: Api/SaleEvent.cs Campaigns), one chip each: logo, store, its sale's name, days left */
.campchips { display: flex; gap: 0.5714rem; overflow-x: auto; scrollbar-width: none; margin: -0.2857rem 0 1.1429rem; padding: 0.1429rem 0; }
.campchips::-webkit-scrollbar { display: none; }
.campchip { flex: none; display: inline-flex; align-items: center; gap: 0.4286rem; padding: 0.4286rem 0.8571rem 0.4286rem 0.5rem; border-radius: 71.3571rem;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: var(--text-sm); white-space: nowrap; }
.campchip:hover { border-color: var(--accent); }
.campchip .slogo, .campchip img, .campchip svg { width: 1.2857rem; height: 1.2857rem; }
.campchip span { color: var(--accent); font-weight: 700; }
.campchip small { color: var(--muted); }
.evname { font-size: 2.5714rem; line-height: 1; font-weight: 850; letter-spacing: -0.04em; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.12); }
.evtxt { display: grid; line-height: 1.25; font-size: var(--text-md); }
.evtxt b { font-size: var(--text-lg); }
.evtxt span { opacity: 0.9; }
.evlogos { display: flex; gap: 0.4286rem; flex-wrap: wrap; flex: 1; }
.evlogos span { width: 2.2857rem; height: 2.2857rem; border-radius: 0.5714rem; background: #fff; display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
.evlogos span.txt { width: auto; padding: 0 0.5714rem; font-size: var(--text-sm); font-weight: 700; color: #232f3e; } /* (a store shown by name: Amazon) */
.evlogos .slogo { width: 1.4286rem; height: 1.4286rem; margin: 0; vertical-align: middle; } /* (no gap before a name here: centred in its square) */
.evgo { font-weight: 700; background: #fff; color: #e1134f; padding: 0.5714rem 1rem; border-radius: 99rem; white-space: nowrap; }
@media (max-width: 640px) { .evbanner { gap: 0.7143rem; padding: 0.7143rem 0.8571rem; } .evname { font-size: 2rem; } .evlogos { order: 3; flex-basis: 100%; } .evgo { margin-inline-start: auto; } .evpics { display: none; }
  .evbanner.promo { flex-wrap: nowrap; gap: 0.5714rem; } .evbanner.promo .evname { font-size: 1.7143rem; } .evbanner.promo .evtxt { font-size: var(--text-sm, 0.8571rem); } .evbanner.promo .evtxt b { font-size: var(--text-md); } .evbanner.promo .evgo { padding: 0.5rem 0.7143rem; font-size: 0.8571rem; } }
#hDeals { scroll-margin-top: calc(var(--head-h) + 0.5714rem); } /* (the sale's banner scrolls here: under the sticky header) */
.evchip { font-weight: 750; color: #e1134f; border-color: rgba(225, 19, 79, 0.35); }
.evchip.on { color: #fff; background: linear-gradient(110deg, #e1134f, #ff6a3d); border-color: transparent; }
.evtag { position: absolute; inset-inline-start: 0.5714rem; bottom: 0.5714rem; padding: 0.1429rem 0.4286rem; border-radius: 0.3571rem; font-size: var(--text-xs); font-weight: 800; color: #fff; background: linear-gradient(110deg, #e1134f, #ff6a3d); }
/* the UAE badge beside the name: the site is for shoppers in the UAE (text only: no flag, Abu Dhabi's ADRA circular
   19/2026 asks commercial sites not to use the UAE flag without approval) */
.brand .uae { display: inline-flex; align-items: center; gap: 0.3571rem; align-self: center; padding: 0.1429rem 0.5rem; border: 1px solid var(--line-2); border-radius: 99rem; font-size: var(--text-xs); font-weight: 650; letter-spacing: 0.02em; color: var(--ink-2); }
.uaeline { font-weight: 600; }
@media (max-width: 640px) { .brand .uae { padding: 0.0714rem 0.3571rem; font-size: 0.6429rem; } } /* phones: smaller (the header's one row) */
/* right-to-left: a label that starts with a number or Latin words keeps its own order ("65 inch TV", not "inch TV 65") */
[dir="rtl"] :is(.chip, .card .t, .card h3, #fTopics a, #fCats a, .sl-choices .chip, .htile .t) { unicode-bidi: plaintext; }
/* a long struck "was" price stays on the price's line (cards in a row keep one height) */
.price-line s { white-space: nowrap; }
/* the AI page's chat list: long titles end in "…", never a sideways scrollbar */
.chat-hist .hlist { overflow-x: hidden; }
.chat-hist .hlist > *, .chat-hist .hrow > * { min-width: 0; }
.brand .slogan { display: block; font-size: 0.7857rem; font-weight: 500; letter-spacing: 0; color: var(--muted); }
@media (max-width: 640px) { .top .brand .slogan { font-size: 0.7143rem; letter-spacing: -0.01em; } } /* (every size: phones a little smaller, */
@media (max-width: 380px) { .top .brand .slogan { font-size: 0.6786rem; letter-spacing: -0.02em; } } /* no wider than the name: the header stays one row) */
.brand span { color: var(--accent); }
.qbox { position: relative; display: flex; align-items: center; flex: 1 1 auto; max-width: 51.4286rem; min-width: 0; }
.qbox > svg.i { position: absolute; inset-inline-start: 0.9286rem; color: var(--muted); pointer-events: none; }
.qbox input {
  width: 100%; height: 3rem; padding: 0 3.1429rem 0 2.8571rem; font-size: var(--text-base); border-radius: 0.8571rem;
  background: var(--surface-2); border-color: transparent;
}
.qbox input:hover { border-color: var(--line-2); }
.qbox input:focus { background: var(--surface); }
.qbox input::placeholder { color: var(--muted); }
.qbox input::-webkit-search-cancel-button { display: none; }
/* Search | Ask AI inside the search box's right end (DuckDuckGo-style) */
.qbox input { padding-inline-end: 15.2857rem; }
.qmode { position: absolute; inset-inline-end: 0.2857rem; display: flex; gap: 0.1429rem; padding: 0.2143rem; border-radius: 0.7143rem; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.qmode button { display: inline-flex; align-items: center; gap: 0.4286rem; height: 2rem; padding: 0 0.7857rem; border: 0; border-radius: 0.5714rem; font-size: var(--text-md); font-weight: 600; white-space: nowrap; background: transparent; }
.qmode button svg.i { width: 1.1429rem; height: 1.1429rem; }
#liveBtn { background: var(--accent-fill); color: var(--accent-ink); }
#liveBtn:hover { background: var(--accent-fill-2); }
#aiBtn { color: var(--used); }
#aiBtn:hover { background: color-mix(in srgb, var(--used) 12%, transparent); }
body:not(.ai) .qbox input { padding-inline-end: 7.4286rem; }
.top .spacer { flex: 1 0 0; }
/* popular searches: open under the search box while it's empty and focused */
.qpop { position: absolute; top: calc(100% + 0.4286rem); inset-inline: 0; z-index: 30; padding: 0.8571rem 1rem 1rem; border-radius: 1rem;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 0.8571rem 2.2857rem rgba(0, 0, 0, 0.12); }
.qpop h6 { margin: 0 0 0.5714rem; font-size: var(--text-xs); font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.qpop .chips { gap: 0.4286rem; }
.qpop .chip { display: inline-flex; align-items: center; gap: 0.4286rem; }
.qpop .chip svg.i { width: 0.9286rem; height: 0.9286rem; color: var(--muted); }
/* your searches: in the panel ("Recent") and the "Your searches" sheet (js/history.js) */
.qrecent { margin-bottom: 0.8571rem; }
.qpop h6 .link, .qrecent h6 .link { float: inline-end; font-size: var(--text-xs); text-transform: none; letter-spacing: 0; font-weight: 600; }
ul.hist { list-style: none; margin: 0; padding: 0; }
ul.hist li { display: flex; align-items: center; gap: 0.5714rem; border-radius: 0.7143rem; }
ul.hist li:hover { background: var(--surface-2, var(--line)); }
ul.hist .hq { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: flex-start; gap: 0.7143rem; padding: 0.5714rem 0.4286rem; border: 0; background: none; color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
ul.hist .hq span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ul.hist .hq svg.i { width: 1rem; height: 1rem; color: var(--muted); flex: none; }
ul.hist .ic { width: 2rem; height: 2rem; color: var(--muted); flex: none; }
ul.hist .ic svg.i { width: 0.9286rem; height: 0.9286rem; }
.histsheet { max-height: 85dvh; overflow: hidden auto; }
.histsheet .close { top: 0.8571rem; inset-inline-end: 0.8571rem; width: 2.5714rem; height: 2.5714rem; } /* inside the scrolling sheet: not clipped */
.histsheet h2 { padding-inline-end: 2.8571rem; }
.histsheet h6 { margin: 1.1429rem 0 0.2857rem; font-size: var(--text-xs); font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.histsheet .clearall { display: block; margin: 1.1429rem auto 0; color: var(--muted); }
.top .sep { width: 1px; height: 1.7143rem; background: var(--line-2); margin: 0 0.2857rem; flex: none; }
.tbtn, details.menu > summary {
  display: inline-flex; align-items: center; gap: 0.5rem; height: 2.7143rem; padding: 0 0.7857rem; border-radius: 0.7143rem; white-space: nowrap;
  font-size: var(--text-md); font-weight: 550; color: var(--ink-2); border: 0; background: transparent; cursor: pointer;
}
.tbtn:hover, details.menu > summary:hover, details.menu[open] > summary { background: var(--surface-2); color: var(--ink); }
#syncBtn.on { color: var(--accent); }
#syncBtn.on svg.i { animation: spin 1.6s linear infinite; }
#aiBtn.on { background: var(--used-soft); }
details.menu { position: relative; }
details.menu > summary { list-style: none; }
details.menu > summary::-webkit-details-marker { display: none; }
.dotlight { width: 0.5714rem; height: 0.5714rem; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0.2143rem var(--accent-soft); flex: none; }
.dotlight.warn { background: var(--warn); box-shadow: 0 0 0 0.2143rem var(--warn-soft); }
.dotlight.bad { background: var(--bad); box-shadow: 0 0 0 0.2143rem var(--bad-soft); }
details.menu .pop {
  position: absolute; inset-inline-end: 0; top: calc(100% + 0.5714rem); z-index: 30; width: min(31.4286rem, calc(100vw - 1.7143rem)); max-height: min(70vh, 45.7143rem); overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-pop);
  padding: 1rem; font-size: var(--text-md); display: grid; gap: 0.7143rem; animation: pop 0.14s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-0.2857rem) scale(0.99); } }
details.menu .pop p { margin: 0; }
details.menu .pop table { font-size: var(--text-sm); }
details.menu .pop td, details.menu .pop th { padding: 0.4286rem 0.4286rem; }
details.menu .pop .q { text-align: start; color: var(--ink); font-weight: 600; font-family: ui-monospace, monospace; font-size: var(--text-sm); overflow-wrap: anywhere; }
.pop-title { font-weight: 650; font-size: var(--text-md); display: flex; align-items: center; gap: 0.5714rem; }

/* search syntax help */
details.help { position: absolute; inset-inline-end: 0.5714rem; top: 50%; transform: translateY(-50%); }
details.help summary {
  list-style: none; cursor: pointer; width: 1.8571rem; height: 1.8571rem; border-radius: 0.5714rem; display: grid; place-items: center;
  font-weight: 650; font-size: var(--text-sm); color: var(--muted); background: transparent;
}
details.help summary:hover, details.help[open] summary { background: var(--surface-3); color: var(--ink); }
details.help summary::-webkit-details-marker { display: none; }
details.help .pop {
  position: absolute; inset-inline-end: -0.5714rem; top: 2.5714rem; z-index: 30; width: min(28.5714rem, calc(100vw - 2.2857rem)); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-pop); padding: 0.8571rem 1rem; text-align: start; font-size: var(--text-md); animation: pop 0.14s ease-out;
}
details.help .pop td { border: 0; padding: 0.2857rem 0.7143rem 0.2857rem 0; }
details.help .pop p { margin: 0.5714rem 0 0; }

/* ---------- page layout */
.wrap { max-width: max(1680px, 70vw); margin: 0 auto; padding: 1.5714rem 1.7143rem 3.4286rem; }
.layout { display: grid; grid-template-columns: 16.8571rem minmax(0, 1fr); gap: 2rem; align-items: start; }
.results { min-width: 0; }
/* #live: the "Searching 12 stores for…" strip over a search's results while they come in (js/app.js drawStrip) */

/* sidebar */
.side { position: sticky; top: calc(var(--head-h) + 1.4286rem); max-height: calc(100vh - var(--head-h) - 2.5714rem); overflow-y: auto; padding: 0.1429rem 0.4286rem 0.8571rem 0.1429rem; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.fgroup { padding: 1rem 0; border-bottom: 1px solid var(--line); display: grid; gap: 1px; align-content: start; grid-auto-rows: max-content; }
.fgroup:first-of-type { padding-top: 0.1429rem; }
.fgroup:last-child { border-bottom: 0; }
.fgroup h3 { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin: 0 0 0.5714rem 0.4286rem; font-weight: 650; }
.fgroup .seg { width: max-content; max-width: 100%; }
.fl, .fc {
  display: flex; align-items: center; gap: 0.5714rem; width: 100%; text-align: start; border: 0; background: none; padding: 0.3571rem 0.5714rem; border-radius: 0.5rem;
  font-weight: 450; font-size: var(--text-md); color: var(--ink-2); cursor: pointer; justify-content: flex-start;
}
.fl:hover, .fc:hover { background: var(--surface-2); color: var(--ink); }
.fl span, .fc span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl i, .fc i { font-style: normal; font-size: var(--text-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.fl.sub { padding-inline-start: 1.4286rem; font-size: var(--text-md); }
.fl.on { background: var(--accent-soft); color: var(--accent-2); font-weight: 600; }
.fl.on i { color: inherit; }
.fc input { margin: 0; width: 1.0714rem; height: 1.0714rem; accent-color: var(--accent); }
.fgroup .link { justify-self: start; margin: 0.4286rem 0.5714rem 0; font-size: var(--text-sm); }
.fgroup p { margin: 0.4286rem 0.4286rem 0; }
form.price { display: flex; gap: 0.4286rem; align-items: center; padding: 0 0.1429rem; }
form.price input { width: 0; flex: 1; padding: 0.4286rem 0.6429rem; }
form.price button.ic { width: 2.1429rem; height: 2.1429rem; border: 1px solid var(--line-2); color: var(--ink-2); }
.side-head { display: none; }
.only-sm { display: none !important; }

/* results bar */
.resbar { display: flex; align-items: center; gap: 0.7143rem; flex-wrap: wrap; margin-bottom: 1rem; }
.resbar .chips { flex: 0 1 auto; }
.resbar .seg { margin-inline-end: 0.2857rem; }
.resbar .grow { flex: 1; }
#count { white-space: nowrap; color: var(--muted); font-size: var(--text-md); }
#count b { color: var(--ink); font-weight: 650; }
#tidyBtn svg.i { color: var(--used); }
#tidyBtn .spinner { color: var(--used); }
#sort { height: 2.4286rem; padding-top: 0; padding-bottom: 0; font-size: var(--text-md); background-color: var(--surface); }
/* Price: a button like the sort menu, its panel under it (min–max, four ranges from the results) */
.pricef { position: relative; }
.pricef > summary { list-style: none; display: inline-flex; align-items: center; gap: 0.4286rem; height: 2.4286rem; padding: 0 0.8571rem; border: 1px solid var(--line-2); border-radius: 0.5714rem; background: var(--surface); font-size: var(--text-md); cursor: pointer; white-space: nowrap; }
.pricef > summary::-webkit-details-marker { display: none; }
.pricef > summary::after { content: ""; width: 0.4286rem; height: 0.4286rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-0.1429rem); margin-inline-start: 0.2857rem; opacity: 0.6; }
.pricef.on > summary { border-color: var(--accent); color: var(--accent-2); background: var(--accent-soft); font-weight: 600; }
.pricef .pop { position: absolute; inset-inline-end: 0; top: calc(100% + 0.4286rem); z-index: 30; width: min(22.8571rem, calc(100vw - 2.2857rem)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-pop); padding: 0.8571rem; display: grid; gap: 0.7143rem; animation: pop 0.14s ease-out; }
.pricef form { display: flex; align-items: center; gap: 0.4286rem; }
.pricef input { flex: 1 1 0; min-width: 0; height: 2.5714rem; }
.pricef .pq { display: flex; flex-wrap: wrap; gap: 0.4286rem; }
.pricef .pq:empty { display: none; }
.pricef .pq .chip.on { border-color: var(--accent); color: var(--accent-2); background: var(--accent-soft); }
#priceClear { width: 2.4286rem; height: 2.4286rem; margin-inline-start: -0.5rem; color: var(--muted); }
@media (max-width: 640px) { .pricef .pop { position: fixed; inset-inline: 1.1429rem; top: auto; width: auto; margin-top: 0.4286rem; } }
.activebar { display: flex; flex-wrap: wrap; gap: 0.4286rem; align-items: center; margin: -0.2857rem 0 1rem; }
.activebar:empty { display: none; }
.tag { border-radius: 71.3571rem; padding: 0.2143rem 0.4286rem 0.2143rem 0.7857rem; font-size: var(--text-sm); background: var(--accent-soft); color: var(--accent-2); border: 0; font-weight: 550; gap: 0.2857rem; }
.tag:hover { background: var(--accent-soft); filter: brightness(0.97); }
.tag svg.i { width: 0.9286rem; height: 0.9286rem; }
.sechead { font-size: var(--text-lg); margin: 0.1429rem 0 0.8571rem; display: flex; gap: 0.5714rem; align-items: center; flex-wrap: wrap; }
#jobres { margin-bottom: 2rem; }
.pager { display: flex; gap: 0.5714rem; align-items: center; justify-content: center; margin-top: 1.2857rem; flex-wrap: wrap; }
.loading { opacity: 0.5; transition: opacity 0.2s; }

/* empty states */
.empty { padding: 4rem 1.1429rem; text-align: center; color: var(--muted); }
.empty.big { font-size: var(--text-base); font-weight: 400; letter-spacing: normal; line-height: 1.5; max-width: 37.1429rem; margin: 0 auto; }
.empty.big p { margin: 0.7143rem 0; }
.empty .hero { width: 4rem; height: 4rem; border-radius: 1.1429rem; margin: 0 auto 1rem; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.empty .hero svg.i { width: 1.8571rem; height: 1.8571rem; }
.empty b { color: var(--ink); }
.empty .examples { display: flex; flex-wrap: wrap; gap: 0.4286rem; justify-content: center; margin-top: 1.1429rem; }

/* ---------- product cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 1.1429rem; }
.card {
  position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-1); min-width: 0; overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
  content-visibility: auto; contain-intrinsic-size: auto 27.1429rem;
}
.card:hover { box-shadow: var(--shadow-2); border-color: var(--line-2); }
.card .media { position: relative; display: block; height: 12rem; margin: 0.5714rem 0.5714rem 0; border-radius: 0.7857rem; background: var(--img-bg); overflow: hidden; }
.card .media img, .card .media .noimg { width: 100%; height: 100%; object-fit: contain; padding: 1rem; display: block; transition: transform 0.35s ease; mix-blend-mode: multiply; }
.card:hover .media img { transform: scale(1.04); }
.noimg { display: grid !important; place-items: center; color: #b5b3ab; }
.noimg svg.i { width: 2.4286rem; height: 2.4286rem; stroke-width: 1.3; }
.card .disc { position: absolute; inset-inline-start: 0.7143rem; top: 0.7143rem; background: var(--accent-fill); color: var(--accent-ink); font-size: var(--text-sm); font-weight: 700; padding: 0.2143rem 0.5714rem; border-radius: 0.5rem; letter-spacing: -0.01em; }
.card .star {
  position: absolute; inset-inline-end: 1rem; top: 1rem; z-index: 1; width: 2.4286rem; height: 2.4286rem; border-radius: 0.7143rem; padding: 0;
  background: rgba(255, 255, 255, 0.92); border: 1px solid rgba(0, 0, 0, 0.06); color: #8a887f; box-shadow: 0 1px 0.2143rem rgba(0, 0, 0, 0.08);
}
.card .star:hover { color: var(--star); background: #fff; }
.card .star.on { color: var(--star); }
.card .body { display: flex; flex-direction: column; gap: 0.5714rem; padding: 0.8571rem 1.1429rem 0.2857rem; flex: 1; min-width: 0; }
.card .t {
  font-weight: 600; font-size: var(--text-base); line-height: 1.35; color: var(--ink); text-decoration: none; letter-spacing: -0.005em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em;
}
.card .t:hover { color: var(--accent); }
/* results grid: each card's rows (title, variants, stars, price, other stores, footer) are rows of the grid itself (subgrid),
   so the same row lines up across the cards side by side, whatever is missing on one of them */
.grid > .card.aligned, .hcards > .card.aligned { display: grid; grid-row: span 7; grid-template-rows: subgrid; row-gap: 0; content-visibility: visible; }
.card.aligned .body { display: contents; }
.card.aligned .body > * { margin-inline: 1.1429rem; min-width: 0; }
.card.aligned .body > .t { margin-top: 0.8571rem; }
.card.aligned .body > .slot:not(:empty) { margin-top: 0.5714rem; }
.card.aligned .pricebox { display: flex; flex-direction: column; gap: 0.5714rem; }
.card.aligned .tail { padding-top: 0.5714rem; display: flex; flex-direction: column; justify-content: flex-end; }
.price-line { display: flex; align-items: baseline; gap: 0.5714rem; flex-wrap: wrap; min-width: 0; }
.big:not(.empty) { font-size: var(--text-xl); font-weight: 750; letter-spacing: -0.03em; line-height: 1.1; }
.big small, .val small { font-size: var(--text-xs); font-weight: 650; color: var(--muted); margin-inline-end: 0.2143rem; letter-spacing: 0.02em; }
.at { color: var(--muted); font-size: var(--text-md); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at a.store { color: var(--ink-2); text-decoration: none; font-weight: 550; }
.at a.store:hover { color: var(--accent); }
.nooffer { color: var(--muted); font-size: var(--text-md); }
.spread { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 0.7143rem; font-size: var(--text-md); padding-top: 0.5714rem; border-top: 1px dashed var(--line-2); }
.spread .row { display: contents; }
.spread .row > span { padding: 0.1429rem 0; }
.spread .s { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.spread .s:has(> [data-asof]) { display: flex; align-items: center; }
.spread .s > .nm { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.spread .s > [data-asof] { flex: none; }
.spread .p { text-align: end; color: var(--ink-2); }
.spread a.store, td a.store { color: inherit; text-decoration: none; }
.spread a.store:hover, td a.store:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 0.1429rem; }
.spread .best .s, .spread .best .p { color: var(--good); font-weight: 650; }
.spread .best .s::before { content: ""; display: inline-block; width: 0.4286rem; height: 0.4286rem; border-radius: 50%; background: currentColor; margin: 0 0 1px; margin-inline-end: 0.4286rem; }
.spread .dim .s, .spread .dim .p { color: var(--muted); }
.spread .more { grid-column: 1 / -1; color: var(--muted); font-size: var(--text-sm); padding-top: 0.1429rem; }
/* second-hand offers: same rows, own colour, never "cheapest" */
.row.used .s, .row.used .s a.store, .row.used .p, tr.used td, tr.used a.store { color: var(--used); }
.card .foot { display: flex; justify-content: space-between; align-items: center; gap: 0.5714rem; color: var(--muted); font-size: var(--text-sm); padding: 0.4286rem 0.5714rem 0.5714rem; padding-inline-start: 1.1429rem; margin-top: auto; }
.card .acts { display: inline-flex; gap: 0; flex: none; }
.card .acts .ic { width: 2.1429rem; height: 2.1429rem; }
/* the card's link to our page (every offer, price history), beside refresh: drawn as its icon buttons */
.card .acts a.ic { display: inline-grid; place-items: center; border-radius: var(--r-sm); color: var(--muted); }
.card .acts a.ic:hover { background: var(--surface-2); color: var(--ink); }
.card .acts a.ic svg.i { width: 1.2143rem; height: 1.2143rem; }
.card .acts button.ic[data-act="fresh"] { opacity: 0.55; } /* prices current: a tap says when it can check again */
@media (hover: hover) {
  .card .acts { opacity: 0; transition: opacity 0.15s; }
  .card:hover .acts, .card:focus-within .acts { opacity: 1; }
  .card .star:not(.on) { opacity: 0; transition: opacity 0.15s; }
  .card:hover .star, .card:focus-within .star { opacity: 1; }
}
.cnote { padding: 0 1.1429rem 0.7143rem; color: var(--ink-2); }
.card.busy { opacity: 0.65; }
.card.busy .foot [data-act="refresh"] { opacity: 1; color: var(--accent); }
/* a refreshed card: the store rows whose price moved light up for a while */
.spread .row.chg-down > span { animation: chg-down 6s ease-out; }
.spread .row.chg-up > span { animation: chg-up 6s ease-out; }
.spread .row.chg-down .p { color: var(--good); }
.spread .row.chg-up .p { color: var(--bad); }
@keyframes chg-down { 0%, 40% { background: var(--accent-soft); } 100% { background: transparent; } }
@keyframes chg-up { 0%, 40% { background: var(--bad-soft); } 100% { background: transparent; } }
.cnote .ok { color: var(--good); }
.cnote .warn { color: var(--bad); }

/* ---------- live search strip */
.strip { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem 1.1429rem; box-shadow: var(--shadow-1); }
.strip-head { display: flex; flex-wrap: wrap; gap: 0.4286rem 0.8571rem; align-items: center; }
.strip-head .grow { flex: 1; }
.strip-head .lead { display: inline-flex; align-items: center; gap: 0.5714rem; font-weight: 650; }
.strip-head .lead svg.i { color: var(--accent); }
.prog { height: 0.2857rem; border-radius: 0.1429rem; background: var(--surface-2); overflow: hidden; margin: 0.8571rem 0; }
.prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #3cc286); border-radius: 0.1429rem; transition: width 0.4s; }
.chips-row { display: flex; flex-wrap: wrap; gap: 0.4286rem; }
.sc {
  display: inline-flex; align-items: center; gap: 0.4286rem; font-size: var(--text-sm); padding: 0.2143rem 0.7143rem; border-radius: 71.3571rem; border: 1px solid var(--line);
  color: var(--ink-2); background: var(--surface); white-space: nowrap;
}
.sc .num { font-weight: 700; color: var(--ink); }
.sc.running { border-color: var(--warn); color: var(--ink); }
.sc.running .spinner { color: var(--warn); width: 0.6429rem; height: 0.6429rem; }
.sc.pending { opacity: 0.55; }
.sc.done { background: var(--accent-soft); border-color: transparent; }
.sc.error { background: var(--bad-soft); border-color: transparent; }

/* ---------- product page (p= in the hash): replaces the results while open; Back returns to them where they were */
.scrim { display: none !important; }
@keyframes fade { from { opacity: 0; } }
/* a product page covers the rest; a store search still going (Back to a product mid-search) goes on behind it */
body.productmode main.layout, body.productmode #chatView, body.productmode #searchView { display: none !important; }
.drawer { max-width: 84.2857rem; padding-top: 0.4286rem; animation: fade 0.18s ease-out; }
.drawer-bar { position: sticky; top: var(--head-h); z-index: 5; display: flex; padding: 0.7143rem 0; margin-bottom: 0.2857rem; background: var(--page); }
.drawer-bar .back { display: inline-flex; align-items: center; gap: 0.2857rem; font: inherit; font-weight: 600; font-size: var(--text-base); padding: 0.4286rem 0.4286rem; padding-inline-end: 0.8571rem;
  border-radius: 71.3571rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.drawer-bar .back:hover { color: var(--ink); }
table.variants { width: 100%; }
table.variants td { vertical-align: middle; }
table.variants .vlink { display: flex; flex-direction: column; gap: 0.2143rem; text-decoration: none; color: inherit; min-width: 0; }
table.variants .vlink:hover .tt { color: var(--accent); }
table.variants .vtags { margin-top: 0; }
table.variants .vtag { font-size: var(--text-sm); font-weight: 600; color: var(--ink); }
table.variants .tt { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
body.noscroll { overflow: hidden; }
.detail-head { display: flex; gap: 1.7143rem; flex-wrap: wrap; margin-bottom: 1.4286rem; }
.detail-head .thumb.lg { width: 14.2857rem; height: 14.2857rem; flex: 0 0 14.2857rem; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); object-fit: contain; padding: 1.1429rem; }
.detail-head div.thumb.lg { display: grid; place-items: center; color: var(--muted); }
.detail-head .info { flex: 1 1 25.7143rem; min-width: 0; }
.detail-head .meta { display: flex; flex-wrap: wrap; gap: 0.2857rem 0.7143rem; align-items: center; color: var(--muted); font-size: var(--text-sm); }
.detail-head .meta a { color: var(--accent); text-decoration: none; }
.detail-head .meta.seen { margin-top: 0.2857rem; }
.detail-head .meta a:hover { text-decoration: underline; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7143rem; margin-top: 1.1429rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 0.7857rem 1rem; min-width: 0; }
.stat.hero { border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.stat .lbl { font-size: var(--text-xs); color: var(--muted); font-weight: 550; }
.stat .val { font-size: var(--text-xl); font-weight: 750; letter-spacing: -0.02em; margin: 0.1429rem 0 1px; }
.stat .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.5714rem; align-items: center; margin-top: 1.1429rem; }
.toolbar button.on { color: var(--star); border-color: color-mix(in srgb, var(--star) 50%, transparent); }
.toolbar .track:not(.on) { background: var(--accent-fill); color: var(--accent-ink); border-color: transparent; }
.toolbar .track:not(.on):hover { background: var(--accent-fill-2); }
.lowest-note { margin: 0.8571rem 0 0; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); padding: 1.1429rem; }
.chart-panel { padding: 1rem 1.1429rem 0.7143rem; }
.chart-bar { display: flex; gap: 0.8571rem; flex-wrap: wrap; justify-content: space-between; align-items: center; margin-bottom: 0.4286rem; }
.legend { display: flex; flex-wrap: wrap; gap: 0.2857rem 1rem; font-size: var(--text-sm); color: var(--ink-2); }
.legend button { border: 0; background: none; padding: 0.1429rem 0; gap: 0.4286rem; font-weight: 500; color: inherit; font-size: var(--text-sm); }
.legend button.off { opacity: 0.35; }
.legend .key { width: 1rem; height: 0.2143rem; border-radius: 0.1429rem; display: inline-block; }
.legend .key.dash { background: none !important; border-top: 0.1429rem dashed currentColor; height: 0; }
.chart-foot { margin: 0.4286rem 0 0; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; }
.chart .ln { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .seed { stroke-dasharray: 3 3; }
.chart .ln.dash { stroke-dasharray: 6 4; stroke-width: 1.6; }
.chart .cross { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
svg.spark { display: block; }
.tip {
  position: fixed; z-index: 50; pointer-events: none; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 0.7143rem; padding: 0.6429rem 0.7857rem; font-size: var(--text-sm); box-shadow: var(--shadow-pop);
  min-width: 11.4286rem; max-width: 20rem;
}
.tip .d { color: var(--muted); margin-bottom: 0.3571rem; }
.tip .r { display: flex; gap: 0.7143rem; align-items: center; justify-content: space-between; padding: 1px 0; }
.tip .r b { font-variant-numeric: tabular-nums; }
.tip .r span { display: inline-flex; gap: 0.4286rem; align-items: center; color: var(--ink-2); }
.tip .key { width: 0.7143rem; height: 0.2143rem; border-radius: 0.1429rem; display: inline-block; }

/* tables (offers, popovers) */
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
table { border-collapse: collapse; width: 100%; font-size: var(--text-md); }
th, td { padding: 0.6429rem 0.7143rem; text-align: start; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-weight: 600; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--surface); position: sticky; top: 0; white-space: nowrap; }
td.r, th.r { text-align: end; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 0.1s; }
tbody tr:hover { background: var(--surface-2); }
tr.dim td { color: var(--muted); }
tr.hl td { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
tr.hl td:first-child { box-shadow: inset 0.2143rem 0 0 var(--accent); }
td .tt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 32.8571rem; min-width: 14.2857rem; }
td .tt a { text-decoration: none; }
td .tt a:hover { color: var(--accent); text-decoration: underline; }
td .mini { width: 2.8571rem; height: 2.8571rem; object-fit: contain; background: #fff; border-radius: 0.5714rem; border: 1px solid var(--line); display: block; padding: 0.1429rem; }
td.acts { white-space: nowrap; text-align: end; padding-top: 0.1429rem; padding-bottom: 0.1429rem; }
td.acts button.ic { width: 2rem; height: 2rem; }
a.out { display: inline-flex; align-items: center; gap: 0.2857rem; text-decoration: none; color: var(--accent); font-weight: 600; white-space: nowrap; }
a.out svg.i { width: 1rem; height: 1rem; }
a.out:hover { text-decoration: underline; text-underline-offset: 0.2143rem; }

/* saved-search switch */
.switch { position: relative; display: inline-block; width: 2.4286rem; height: 1.4286rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; pointer-events: none; border-radius: 71.3571rem; background: var(--axis); transition: background 0.15s; }
.switch i::after { content: ""; position: absolute; inset-inline-start: 0.2143rem; top: 0.2143rem; width: 1rem; height: 1rem; border-radius: 50%; background: #fff; transition: transform 0.15s; box-shadow: 0 1px 0.1429rem rgba(0, 0, 0, 0.2); }
.switch input:checked + i { background: var(--accent-fill); }
.switch input:checked + i::after { transform: translateX(1rem); }
.switch input:focus-visible + i { outline: 0.1429rem solid var(--accent); outline-offset: 1px; }

/* toasts */
.toasts { position: fixed; z-index: 60; left: 50%; bottom: 1.4286rem; transform: translateX(-50%); display: grid; gap: 0.5714rem; width: min(38.5714rem, calc(100vw - 2.2857rem)); }
.toast {
  display: flex; gap: 0.8571rem; align-items: center; background: #1d1d1b; color: #f4f3ef; border-radius: 0.8571rem; padding: 0.7857rem 0.8571rem; padding-inline-start: 1.1429rem;
  box-shadow: 0 0.8571rem 2.5714rem rgba(0, 0, 0, 0.3); font-size: var(--text-md); animation: rise 0.2s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translateY(0.5714rem); } }
.toast > span { flex: 1; min-width: 0; }
.toast a, .toast button.link { color: #7fe0b0; }
.toast code { background: rgba(255, 255, 255, 0.12); color: inherit; }
.toast .x { border: 0; background: none; color: inherit; opacity: 0.6; padding: 0.1429rem 0.4286rem; }
.toast .x:hover { opacity: 1; background: none; }
.toast.bad { background: var(--bad); color: #fff; }
.toast { border: 1px solid rgba(255, 255, 255, 0.14); }
@media (max-width: 640px) { .toasts { bottom: calc(5.4286rem + env(safe-area-inset-bottom, 0px)); } }

/* ---------- responsive */
@media (max-width: 1100px) {
  .top .lbl { display: none; }
  .tbtn, details.menu > summary { padding: 0 0.6429rem; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .only-sm { display: inline-flex !important; }
  .side {
    position: fixed; z-index: 40; inset: 0 auto 0 0; width: min(22.8571rem, 88vw); max-height: none; padding: 1.1429rem 1.1429rem 1.7143rem; top: 0;
    background: var(--surface); border-inline-end: 1px solid var(--line); box-shadow: 0 0 3.4286rem rgba(0, 0, 0, 0.3);
    transform: translateX(-105%); transition: transform 0.22s; visibility: hidden;
  }
  .side.open { transform: none; visibility: visible; }
  .side-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.2857rem; }
  .wrap { padding: 1.2857rem 1.1429rem 2.8571rem; }
  #live { margin: 1rem 1.1429rem 0; }
}
@media (max-width: 640px) {
  .top { flex-wrap: wrap; padding: 0.7143rem 1rem; gap: 0.5714rem; }
  details.help { transform: none; top: 0.2143rem; }
  .brand { margin-inline-end: auto; }
  .top .sep { display: none; }
  #status > summary span { display: none; }
  .brand b { display: none; }
  .brand { margin-inline-end: auto; }
  /* popovers hang from the header's full width, not from their (narrow) button */
  details.menu .pop, details.help .pop { position: fixed; left: 0.8571rem; right: 0.8571rem; width: auto; top: calc(var(--head-h) + 0.4286rem); }
  details.menu .pop { max-height: calc(100vh - var(--head-h) - 1.7143rem); }
  /* offers: stacked rows instead of the wide table */
  .offers-table { display: none; }
  .stat .small { white-space: normal; }
  .qbox { order: 5; flex: 1 1 100%; max-width: none; }
  .qbox input { font-size: var(--text-lg); }
  .resbar .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -1.1429rem; padding: 0 1.1429rem; flex: 1 1 100%; }
  .resbar .chips > * { flex: none; }
  .resbar .grow { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7143rem; }
  .card .media { height: 9.2857rem; margin: 0.4286rem 0.4286rem 0; }
  .card .body { padding: 0.7143rem 0.8571rem 0.1429rem; }
  .card.aligned .body > * { margin-inline: 0.8571rem; }
  .card.aligned .body > .t { margin-top: 0.7143rem; }
  .card .foot { padding: 0.2857rem 0.2857rem 0.4286rem; padding-inline-start: 0.8571rem; }
  .big:not(.empty) { font-size: var(--text-xl); }
  .spread { font-size: var(--text-sm); }
  .detail-head .thumb.lg { width: 8.5714rem; height: 8.5714rem; flex-basis: 8.5714rem; padding: 0.7143rem; }
  h1 { font-size: var(--text-xl); }
  .hide-sm { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* one scrolling chip row, then Filters · sort · count, then Claude's two actions (searches only) */
  .resbar { gap: 0.5714rem; }
  .resbar .chips { order: 0; }
  #filtersBtn { order: 1; }
  .resbar #sort { order: 2; max-width: 10.7143rem; }
  .resbar #count { order: 3; margin-inline-start: auto; font-size: var(--text-sm); }
  #tidyBtn { order: 4; }
  #discussBtn { order: 5; }
  #tidyBtn.noq, #discussBtn.noq { display: none; }
}
@media (max-width: 640px) { .card .media { height: 9.2857rem; } }
@media (max-width: 330px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.spread a.more { text-decoration: none; }
.spread a.more:hover { color: var(--accent); }

.drawer h1 { font-size: var(--text-xl); }

/* ---------- chat page (#page=chat) */
.chatmode main.layout, .chatmode #live { display: none !important; }
#chatView { max-width: 78rem; padding-bottom: 0; }
.chat { display: flex; flex-direction: column; min-height: calc(100vh - var(--head-h) - 1.5714rem); min-height: calc(100dvh - var(--head-h) - 1.5714rem); }
/* the latest question sits at the top of the screen (chat.js pinQuestion), under the sticky bar; its answer has the room
   below it to grow into, so pinning it never needs the page to move later */
.chat-log .msg.user { scroll-margin-top: calc(var(--head-h) + 4.2857rem); }
.chat-log > .msg.bot:last-child { min-height: calc(100dvh - var(--head-h) - 17rem); }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 0.8571rem; padding-bottom: 0.7143rem; }
.chat-title { display: flex; align-items: center; gap: 0.5714rem; flex-wrap: wrap; font-size: var(--text-lg); }
.chat-title svg.i { color: var(--used); }
.chat-log { flex: 1; display: flex; flex-direction: column; gap: 1.5714rem; padding: 0.5714rem 0 1.7143rem; }
.chat-empty { text-align: center; padding: 0 0.5714rem; }
.chat-empty h2 { font-size: var(--text-3xl); font-weight: 600; margin: 0 0 0.4286rem; letter-spacing: -0.03em; line-height: 1.2; }
.chat-empty p { max-width: 37.1429rem; margin: 0 auto; }
.glow { background: linear-gradient(100deg, var(--accent) 10%, var(--used) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* a new chat: greeting, box and suggestions together in the middle of the page */
.chat.fresh .chat-log { flex: 0 0 auto; margin-top: auto; padding-bottom: 1.4286rem; }
.chat.fresh .composer { position: static; background: none; margin: 0 auto; width: min(100%, 52rem); padding-bottom: 0; }
.chat.fresh .chat-title { visibility: hidden; }
.chat-start { margin: 0 auto auto; width: min(100%, 52rem); padding-bottom: 12vh; }
.chat-start:empty { display: none; }
.chat-start .suggest { display: flex; flex-wrap: wrap; gap: 0.5714rem; justify-content: center; margin-top: 1.1429rem; }
.chat-start .suggest .chip { font-size: var(--text-md); padding: 0.5714rem 1rem; text-align: start; gap: 0.5rem; background: color-mix(in srgb, var(--surface) 80%, transparent); }
.chat-start .suggest .chip svg.i { width: 1.0714rem; height: 1.0714rem; color: var(--used); flex: none; }
.chat-start .suggest .chip:hover { border-color: var(--used); }
body.chatmode:has(.chat.fresh) { background:
  radial-gradient(48rem 26rem at 62% 48%, color-mix(in srgb, var(--used) 11%, transparent), transparent 70%),
  radial-gradient(40rem 24rem at 42% 56%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%), var(--page); background-attachment: fixed; }
.msg { display: flex; gap: 0.8571rem; min-width: 0; }
.msg.user { justify-content: flex-end; }
.msg.user .bubble {
  max-width: min(78%, 44.2857rem); background: var(--ink); color: var(--page); padding: 0.7143rem 1.0714rem; border-radius: 1.2857rem 1.2857rem 0.2857rem 1.2857rem;
  white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--text-base);
}
.msg.bot .avatar { flex: none; width: 2.1429rem; height: 2.1429rem; border-radius: 0.7143rem; display: grid; place-items: center; background: var(--used-soft); color: var(--used); margin-top: 0.1429rem; }
.msg.bot .avatar svg.i { width: 1.1429rem; height: 1.1429rem; }
.msg.bot .content { flex: 1; min-width: 0; }
.steps { display: flex; flex-wrap: wrap; gap: 0.4286rem; margin-bottom: 0.7143rem; }
.cstatus { display: flex; align-items: center; gap: 0.5rem; margin: 0.2857rem 0; }
.cstatus .spinner { color: var(--used); }
.msg.bot .md + .tiles { margin-top: 0.7143rem; }
/* the AI page has no footer (body:not(.chatmode) above): the Amazon note and links sit under the chat box */
.chatlegal { flex: 1 0 100%; text-align: center; font-size: var(--text-xs); font-weight: 400; color: var(--muted); margin: 0.4286rem 0 0; }
.chatlegal a, .chatlegal button { color: var(--muted); }
.chatlegal.amz { text-align: start; margin-top: 0.5714rem; }
.step { display: inline-flex; align-items: center; gap: 0.4286rem; font-size: var(--text-sm); color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 71.3571rem; padding: 0.2143rem 0.7143rem; max-width: 100%; }
.step svg.i { width: 0.9286rem; height: 0.9286rem; color: var(--muted); }
.step b { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step.run { border-color: color-mix(in srgb, var(--used) 45%, transparent); color: var(--ink); }
.step.run .spinner { color: var(--used); width: 0.7143rem; height: 0.7143rem; }
.tiles { display: flex; gap: 0.7143rem; overflow-x: auto; padding: 0.1429rem 0.1429rem 0.7143rem; margin-bottom: 0.2857rem; scrollbar-width: thin; scroll-snap-type: x proximity; }
.tile {
  position: relative; flex: 0 0 12rem; display: flex; flex-direction: column; gap: 0.4286rem; padding: 0.5714rem; border-radius: var(--r); background: var(--surface);
  border: 1px solid var(--line); text-decoration: none; color: inherit; scroll-snap-align: start; transition: box-shadow 0.15s, border-color 0.15s;
}
.tile:hover { box-shadow: var(--shadow-2); border-color: var(--line-2); }
.tile .tpic { display: block; height: 7.1429rem; border-radius: 0.5714rem; background: var(--img-bg); overflow: hidden; }
.tile .pic, .tile .noimg { width: 100%; height: 100%; object-fit: contain; padding: 0.5714rem; mix-blend-mode: multiply; display: block; }
.tile .tt { font-size: var(--text-sm); font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.tile .tp { font-size: var(--text-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .tp b { font-size: var(--text-base); letter-spacing: -0.02em; }
.tile .tp small { font-size: var(--text-xs); color: var(--muted); margin-inline-end: 0.1429rem; }
.tile .tw { position: absolute; top: 0.8571rem; inset-inline-end: 0.8571rem; color: var(--star); }
.tile .tw svg.i { width: 1.0714rem; height: 1.0714rem; }
.md { font-size: var(--text-base); line-height: 1.6; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md p { margin: 0 0 0.7143rem; }
.md ul, .md ol { margin: 0 0 0.7143rem; padding-inline-start: 1.5714rem; }
.md li { margin: 0.2143rem 0; }
.md h3, .md h4 { margin: 1.1429rem 0 0.4286rem; font-size: var(--text-lg); letter-spacing: -0.01em; }
.md a { color: var(--accent); text-decoration: none; font-weight: 550; }
.md a:hover { text-decoration: underline; text-underline-offset: 0.2143rem; }
.md a.plink { border-bottom: 1px dashed color-mix(in srgb, var(--accent) 50%, transparent); }
.md a.plink:hover { text-decoration: none; border-bottom-style: solid; }
.md pre { background: var(--surface-2); padding: 0.7143rem 0.8571rem; border-radius: 0.7143rem; overflow-x: auto; font-size: var(--text-sm); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
.md .tablewrap { margin: 0.2857rem 0 0.8571rem; box-shadow: none; }
.md table { font-size: var(--text-md); }
.md th { position: static; }
.caret { display: inline-block; width: 0.5rem; height: 1.0714rem; background: var(--used); border-radius: 0.1429rem; vertical-align: -0.1429rem; margin-inline-start: 0.1429rem; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.composer {
  position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 0.5714rem; margin: 0 -0.5714rem; padding: 0.7143rem 0.5714rem calc(1rem + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--page) 30%);
}
/* the box: one pill with the photo button, the text and send inside */
.composer .cbox { flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 0.2857rem; padding: 0.4286rem; border-radius: 1.7143rem;
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 0.2857rem 1.4286rem rgba(0, 0, 0, 0.07); transition: border-color .15s, box-shadow .15s; }
.composer .cbox:focus-within { border-color: color-mix(in srgb, var(--used) 45%, var(--line-2)); box-shadow: 0 0.2857rem 1.7143rem color-mix(in srgb, var(--used) 16%, transparent); }
.composer textarea {
  flex: 1; min-width: 0; resize: none; min-height: 2.8571rem; max-height: 14.2857rem; padding: 0.6429rem 0.4286rem; font-size: var(--text-lg); line-height: 1.4;
  background: transparent; border: 0; box-shadow: none; outline: none;
}
.composer textarea:focus { box-shadow: none; outline: none; }
.composer .send { width: 2.8571rem; height: 2.8571rem; padding: 0; border-radius: 50%; flex: none; }
.composer .send svg.i { width: 1.4286rem; height: 1.4286rem; stroke-width: 2.2; }
.composer .send.stop { background: var(--ink); color: var(--page); }
@media (max-width: 640px) {
  .msg.bot .avatar { display: none; }
  .msg.user .bubble { max-width: 88%; }
  .chat-empty h2 { font-size: var(--text-2xl); }
  .chat-title .muted { display: none; }
  .tile { flex-basis: 10.5714rem; }
}

/* chat: attached images */
.composer { flex-wrap: wrap; }
.composer .attached { flex: 1 0 100%; display: flex; gap: 0.5714rem; padding: 0 0.1429rem 0.1429rem; }
.composer .att { position: relative; width: 4.5714rem; height: 4.5714rem; border-radius: 0.8571rem; overflow: hidden; background: var(--surface); border: 1px solid var(--line-2); display: grid; place-items: center; }
.composer .att img { width: 100%; height: 100%; object-fit: cover; }
.composer .att button.ic { position: absolute; top: 0.1429rem; inset-inline-end: 0.1429rem; width: 1.5714rem; height: 1.5714rem; border-radius: 0.5rem; background: rgba(0, 0, 0, 0.6); color: #fff; }
.composer .att button.ic svg.i { width: 0.8571rem; height: 0.8571rem; }
.composer .attach { width: 2.8571rem; height: 2.8571rem; border-radius: 50%; background: transparent; border: 0; color: var(--ink-2); flex: none; }
.composer .attach:hover { background: var(--surface-2); }
.composer .attach svg.i { width: 1.3571rem; height: 1.3571rem; }
.composer.drop .cbox { border-color: var(--accent); box-shadow: 0 0 0 0.2143rem var(--accent-soft); }
.msg.user { flex-direction: column; align-items: flex-end; gap: 0.4286rem; }
.msg.user .pics { display: flex; gap: 0.4286rem; flex-wrap: wrap; justify-content: flex-end; }
.msg.user .pics img { width: 8.5714rem; height: 8.5714rem; object-fit: cover; border-radius: 1rem; border: 1px solid var(--line); }

/* per-kg price (supplements) and sortable offer columns */
.card .perkg { font-size: var(--text-sm); color: var(--ink-2); margin-top: -0.2857rem; }
th.sort { cursor: pointer; user-select: none; }
th.sort:hover { color: var(--ink); }
th.sort[data-dir=asc]::after { content: " ▲"; font-size: 0.5714rem; }
th.sort[data-dir=desc]::after { content: " ▼"; font-size: 0.5714rem; }

.dnote { margin-top: 0.2857rem; display: flex; flex-wrap: wrap; gap: 0.2857rem; }
.dnote .badge { white-space: normal; max-width: 100%; }
.dnote svg.i { width: 0.8571rem; height: 0.8571rem; }

/* product families: variant count, tag chips, variant rows on cards */
.vcount { display: inline-block; margin-top: 0.2857rem; font-size: var(--text-sm); font-weight: 600; color: var(--accent); text-decoration: none; }
.vtags { display: flex; flex-wrap: wrap; gap: 0.2857rem; margin-top: 0.2857rem; }
/* customer rating: ★ 4.3 (57k); amber stars, red when poorly rated, faint when few rated */
.stars { display: inline-flex; align-items: baseline; gap: 0.2143rem; font-size: var(--text-sm); font-weight: 600; color: var(--ink); white-space: nowrap; }
.stars i { font-style: normal; color: var(--star); }
.stars small { font-weight: 400; color: var(--muted); font-size: var(--text-xs); }
.stars.low, .stars.low i { color: var(--bad); }
.stars.few { opacity: .6; }
.card .body > .stars, .card .slot > .stars { display: flex; margin-top: 0.2143rem; padding: 0; }
.pd-sub .stars { margin-inline-start: 0.5714rem; font-size: var(--text-md); }
.srow .sn b .stars { margin-inline-start: 0.4286rem; font-size: var(--text-xs); }
.vtag { font-size: var(--text-xs); padding: 1px 0.5rem; border-radius: 71.3571rem; background: var(--chip, rgba(127,127,127,.12)); color: var(--muted); white-space: nowrap; }
.price-line .from { font-size: var(--text-sm); color: var(--muted); margin-inline-end: 0.2857rem; }
.spread .vrow { text-decoration: none; color: inherit; }
.spread .vrow .s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vchips { display: flex; flex-wrap: wrap; gap: 0.4286rem; margin: 0.7143rem 0 0.2857rem; }
.vchips button { font: inherit; font-size: var(--text-md); padding: 0.2857rem 0.7857rem; border-radius: 71.3571rem; border: 1px solid var(--line, rgba(127,127,127,.3)); background: transparent; color: inherit; cursor: pointer; }
.vchips button.on { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }

/* chat history (left column; a slide-in panel on phones) */
.chatwrap { display: grid; grid-template-columns: 17.8571rem minmax(0, 1fr); gap: 1.4286rem; align-items: start; }
.chat-hist { position: sticky; top: calc(var(--head-h) + 1.1429rem); max-height: calc(100vh - var(--head-h) - 2.2857rem); display: flex; flex-direction: column; gap: 0.7143rem; min-width: 0; }
.chat-hist .hnew { justify-content: flex-start; gap: 0.5714rem; font-weight: 600; padding: 0.6429rem 0.8571rem; border-radius: 0.8571rem; background: transparent; border: 1px solid var(--line-2); }
.chat-hist .hnew:hover { background: var(--surface-2); }
@media (min-width: 901px) {
  .chat-hist { background: color-mix(in srgb, var(--surface) 75%, transparent); border: 1px solid var(--line); border-radius: 1.1429rem; padding: 0.7143rem; }
  .chat-hist .hrow:hover, .chat-hist .hrow.on { background: var(--surface-2); }
}
.chat-hist .hlist { overflow-y: auto; scrollbar-width: thin; padding-inline-end: 0.1429rem; }
.chat-hist .hgroup { font-size: var(--text-xs); font-weight: 650; color: var(--muted); margin: 0.8571rem 0.5714rem 0.2857rem; text-transform: uppercase; letter-spacing: .04em; }
.chat-hist .hrow { display: flex; align-items: center; border-radius: 0.7143rem; }
.chat-hist .hrow:hover, .chat-hist .hrow.on { background: var(--surface); }
.chat-hist .hrow.on .hopen { color: var(--ink); font-weight: 600; }
.chat-hist .hopen { display: block; flex: 1; min-width: 0; text-align: start; font: inherit; font-size: var(--text-md); color: var(--ink-2); background: none; border: 0; padding: 0.5714rem 0.7143rem; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-hist .hdel { opacity: 0; width: 2rem; height: 2rem; border: 0; background: none; }
.chat-hist .hrow:hover .hdel, .chat-hist .hrow.on .hdel { opacity: .7; }
.chat-hist .hempty { padding: 0.5714rem 0.7143rem; }
.chat-head .hbtn { display: none; }
@media (min-width: 901px) { .chat-head [data-newchat] { display: none; } }
@media (max-width: 900px) {
  .chatwrap { grid-template-columns: minmax(0, 1fr); }
  .chat-head .hbtn { display: inline-grid; }
  .chat-hist { position: fixed; z-index: 46; top: 0; bottom: 0; inset-inline-start: 0; width: min(21.4286rem, 86vw); max-height: none; padding: calc(1.1429rem + env(safe-area-inset-top, 0px)) 0.8571rem 1.1429rem;
    background: var(--page); box-shadow: 1.7143rem 0 4.5714rem rgba(0, 0, 0, .3); transform: translateX(-105%); transition: transform .2s ease; }
  .chatwrap.histopen .chat-hist { transform: none; }
  .chatwrap:not(.histopen) .chat-hist { box-shadow: none; visibility: hidden; transition: transform .2s ease, visibility 0s .2s; }
  .chat-hist .hdel { opacity: .7; }
}

#status > summary .short { display: none; font-weight: 550; font-size: var(--text-sm); }
@media (max-width: 640px) { #status > summary .short { display: inline; } }

/* offers as stacked rows (phone) */
.offer-list { display: none; gap: 0.5714rem; }
@media (max-width: 640px) { .offer-list { display: grid; } }
table.variants td.r { white-space: nowrap; }
.vchips [data-morechips] { border-style: dashed; }
.offer { padding: 0.7143rem 0.8571rem; border: 1px solid var(--line); border-radius: 0.8571rem; background: var(--surface); display: grid; gap: 0.2857rem; }
.offer.hl { border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.offer.dim { opacity: .6; }
.offer .o1 { display: flex; align-items: baseline; gap: 0.4286rem; }
.offer .o1 .store { text-decoration: none; padding: 0.4286rem 0; }
.offer .op { margin-inline-start: auto; text-align: end; display: grid; justify-items: end; font-size: var(--text-lg); }
.offer .tt { color: var(--ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.offer .tt a { color: inherit; text-decoration: none; }
.offer .o3 { display: flex; align-items: center; gap: 0.5714rem; flex-wrap: wrap; }
.offer .o3 .acts { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 0.1429rem; }
.offer .o3 a.out { padding: 0.7143rem 0.2857rem; }
button.link.showall { margin: 0.7143rem 0 0.2857rem; padding: 0.7143rem 0; font-weight: 600; }
/* product page: "Show all" as the list's last row; the cheapest row's badge; the saving under the big price */
.srows button.showall { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: var(--surface); color: var(--accent); font-weight: 600; padding: 0.8571rem; }
.srows button.showall:hover { background: var(--surface-2); }
.srow .cheapest { margin-inline-start: 0.5rem; padding: 0.0714rem 0.5rem; border-radius: 999px; background: var(--accent-fill); color: var(--accent-ink); font-size: var(--text-xs); font-weight: 700; vertical-align: 0.0714rem; }
.bb-saves { display: flex; align-items: center; gap: 0.3571rem; color: var(--good); font-weight: 600; font-size: var(--text-md); }
.bb-saves svg.i { width: 1rem; height: 1rem; }
h2.usedh { margin-top: 1.4286rem; }
/* the offer opened from a deal: marked in the list */
.srow.hl, .sgsub a.hl { box-shadow: inset 0.2143rem 0 0 var(--accent); background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
[dir="rtl"] .srow.hl, [dir="rtl"] .sgsub a.hl { box-shadow: inset -0.2143rem 0 0 var(--accent); }
.bb-also { font-size: var(--text-md); color: var(--ink-2); }
.bb-also b { color: var(--good); }

/* delivery fees on cards */
.card .feeline { margin-top: -0.2857rem; font-size: var(--text-sm); }
.spread .p small.warn { font-size: var(--text-xs); margin-inline-start: 0.2143rem; font-weight: 600; }
/* unit price (per kg / L / piece) next to an offer's price */
.spread .p small.up { font-size: var(--text-xs); margin-inline-start: 0.2857rem; color: var(--muted); font-weight: 400; }
td .up, .offer .op .up { font-size: var(--text-xs); color: var(--muted); font-weight: 400; white-space: nowrap; }

/* selected variant chip: readable count */
.vchips button.on { color: var(--accent-ink, #04130c); }
.vchips button.on .muted { color: inherit; opacity: .75; }

/* chat tables: scroll instead of breaking words and numbers */
.md table { width: auto; min-width: 100%; }
.md td, .md th { white-space: normal; overflow-wrap: normal; word-break: normal; min-width: 5.5em; max-width: 16em; }

/* touch: 3.1429rem tap targets */
@media (pointer: coarse) {
  .seg button, .vchips button, .tbtn, details.menu > summary, button.ic, .chip, .toolbar button, .drawer-bar button, #sort { min-height: 3.1429rem; }
  .card .star { width: 3.1429rem; height: 3.1429rem; }
  .spread a.more, .at a.store { display: inline-block; padding: 0.5714rem 0; }
  .legend button { min-height: 2.5714rem; padding: 0.4286rem 0.2857rem; }
  details.help summary { width: 2.5714rem; height: 2.5714rem; }
  .chat-hist .hdel { width: 2.8571rem; height: 2.8571rem; }
}
@media (max-width: 640px) {
  table.variants { width: 100%; table-layout: fixed; }
  table.variants td:first-child { width: 3.7143rem; }
  table.variants td.r { width: 7.4286rem; }
  table.variants .tt { min-width: 0; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
table.variants td.r { overflow: hidden; }
table.variants td.r > div { overflow: hidden; text-overflow: ellipsis; }
.spread .vrow .tw { color: var(--warn, #e0a030); }
/* card rows open the store's page */
.spread a.row { color: inherit; text-decoration: none; cursor: pointer; }
.spread a.row:hover > span, .spread a.row:active > span { color: var(--accent); }
@media (pointer: coarse) { .spread .row > span { padding: 0.3571rem 0; } }
.msg.user .about { padding: 0 0.2857rem; }
button.sc { font: inherit; font-size: var(--text-sm); cursor: pointer; }
button.sc.on { background: var(--accent-fill); color: var(--accent-ink); }
button.sc.on .num { color: inherit; }
.chart-young { margin: 0.4286rem 0 0; }
/* filters Claude made for this search */
.fgroup.ai h3 { display: flex; align-items: center; gap: 0.4286rem; }
.fgroup.ai h3 svg.i { width: 0.9286rem; height: 0.9286rem; color: var(--used); }
.aichips { display: flex; flex-wrap: wrap; gap: 0.4286rem; }
.aichips .chip i { font-style: normal; color: var(--muted); font-size: var(--text-xs); margin-inline-start: 0.1429rem; }
.aichips .chip.on i { color: inherit; opacity: .75; }
#tidyBtn .short, #discussBtn .short { display: none; }
@media (max-width: 640px) {
  #tidyBtn .long, #discussBtn .long { display: none; }
  #tidyBtn .short, #discussBtn .short { display: inline; }
}

/* phone product page: thumbnail beside the title; long store titles clamp to 3 lines */
@media (max-width: 640px) {
  .detail-head { display: grid; grid-template-columns: 5.4286rem minmax(0, 1fr); gap: 0 1rem; align-items: start; }
  .detail-head .info { display: contents; }
  .detail-head .thumb.lg { width: 5.4286rem; height: 5.4286rem; padding: 0.4286rem; grid-row: 1 / span 3; }
  .detail-head .info > * { grid-column: 1 / -1; }
  .detail-head .info > h1, .detail-head .info > .meta { grid-column: 2; }
  details.menu .pop .badge { white-space: normal; }
}
.drawer h1 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
td .mini.noimg, .mini.noimg { background: var(--surface-3); border-color: transparent; }
/* slide-in panels dim what's behind them */
.side.open, .chatwrap.histopen .chat-hist { box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45); }
.cutnote { text-align: end; margin: 0.2857rem 0 0; } .hiddennote { margin: 0.2857rem 0 0.7143rem; }
@media (pointer: coarse) {
  #discussBtn, #tidyBtn, #filtersBtn, .fl, .fc, .price input, .drawer-bar .back { min-height: 3.1429rem; }
  button.sc { min-height: 2.5714rem; }
}
.aichips .chip i::before { content: "· "; }

/* ---------- deals page (#page=deals) */
.alertsmode main.layout, .alertsmode #live, .alertsmode #homeView, .alertsmode #dealsView, .basketmode main.layout, .basketmode #live, .basketmode #homeView, .basketmode #dealsView, .dealsmode main.layout, .dealsmode #live, body.productmode #dealsView { display: none !important; }
#dealsBtn.on { background: var(--accent-soft); color: var(--accent); }
.deals-head { display: flex; align-items: center; justify-content: space-between; gap: 0.8571rem; flex-wrap: wrap; margin-bottom: 0.7143rem; }
.deals-head h1 { margin: 0 0 0.2857rem; }
.deals-head p { margin: 0; }
.dstores { display: flex; gap: 0.5714rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 0.2857rem; margin-bottom: 0.8571rem; }
.dstores .chip { flex: none; }
.dstores .chip i { font-style: normal; color: var(--muted); margin-inline-start: 0.1429rem; }
.dstores .chip.on i { color: inherit; opacity: .75; }
.dbar { display: flex; gap: 0.7143rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.dbar #dQ { flex: 1 1 12.8571rem; min-width: 0; height: 2.7143rem; }
.card.deal .price-line s { margin-inline-start: 0.5714rem; font-size: var(--text-md); }
.card.deal .why { margin: 0.4286rem 0 0; color: var(--muted); line-height: 1.4; }
.card.deal .others { list-style: none; margin: 0.5714rem 0 0; padding: 0; display: grid; gap: 0.1429rem; }
.card.deal .others a { display: flex; align-items: center; gap: 0.5714rem; padding: 0.3571rem 0.5714rem; border-radius: 0.5714rem; color: var(--ink-2); text-decoration: none; background: var(--surface-2); }
.card.deal .others a:hover { color: var(--ink); }
.card.deal .others .on { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card.deal .others .diff { font-weight: 600; min-width: 3.2em; text-align: end; }
.card.deal .others .diff.up { color: var(--muted); }
.card.deal .others .diff.down { color: var(--bad); }
.card.deal .others svg { width: 0.8571rem; height: 0.8571rem; opacity: .6; flex: none; }
.card.deal.real { border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
@media (max-width: 640px) {
  #syncBtn { display: none; }
  #dealsBtn .lbl { display: none; }
  .dbar .seg { overflow-x: auto; max-width: 100%; }
}
.dbar .seg button { white-space: nowrap; }
/* phone: store summaries scroll sideways instead of pushing the deals down */
@media (max-width: 640px) {
}

/* ---------- product page v2: name, one buy box, compare stores, folded extras */
.pd { display: grid; gap: 1.1429rem; }
/* the photo is a reference, not the page: a compact square beside the prices */
.pd-top { display: grid; grid-template-columns: clamp(14.2857rem, 26vw, 22.8571rem) minmax(0, 1fr); gap: 2rem; align-items: start; }
.pd-media { position: sticky; top: calc(var(--head-h) + 4.2857rem); aspect-ratio: 1; background: var(--img-bg); border-radius: 1.4286rem; border: 1px solid var(--line); overflow: hidden; }
.pd-media .pd-img { width: 100%; height: 100%; object-fit: contain; padding: 1.2857rem; display: block; mix-blend-mode: multiply; }
.pd-media .noimg { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); }
.pd-media .disc { position: absolute; inset-inline-start: 1rem; top: 1rem; background: var(--accent-fill); color: var(--accent-ink); font-size: var(--text-base); font-weight: 700; padding: 0.2857rem 0.7143rem; border-radius: 0.5714rem; }
.pd-main { display: grid; gap: 1rem; min-width: 0; }
.pd-head h1 { font-size: var(--text-xl); line-height: 1.25; margin: 0 0 0.4286rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pd-sub { font-size: var(--text-md); color: var(--muted); }
.pd-sub a { color: var(--accent); text-decoration: none; }
@media (max-width: 760px) {
  .pd-top { grid-template-columns: 1fr; gap: 1rem; }
  .pd-media { position: relative; top: 0; aspect-ratio: auto; height: 11.4286rem; }
  .pd-media .pd-img { padding: 1.1429rem; }
  .pd-head h1 { font-size: var(--text-xl); }
}
.buybox { background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 1.2857rem; padding: 1.1429rem; display: grid; gap: 0.4286rem; }
.buybox.none { background: var(--surface); border-color: var(--line); }
.bb-label { font-size: var(--text-sm); font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.bb-price { display: flex; align-items: baseline; gap: 0.7143rem; font-size: var(--text-3xl); font-weight: 750; letter-spacing: -0.03em; line-height: 1.1; }
.bb-price small { font-size: var(--text-md); color: var(--muted); margin-inline-end: 0.2857rem; }
.bb-price s { font-size: var(--text-lg); font-weight: 500; }
.bb-where { font-size: var(--text-lg); color: var(--ink-2); }
.bb-verdict { font-size: var(--text-md); font-weight: 600; display: flex; gap: 0.4286rem; align-items: center; }
.bb-verdict svg.i { width: 1.1429rem; height: 1.1429rem; }
.bb-value { display: block; font-size: var(--text-md); color: var(--accent); text-decoration: none; }
.bb-value:hover b { text-decoration: underline; }

a.buy { display: inline-flex; justify-content: center; align-items: center; gap: 0.5714rem; min-height: 3.1429rem; padding: 0 1.4286rem; border-radius: 0.8571rem; font-size: var(--text-lg); font-weight: 650;
  text-decoration: none; background: var(--accent-fill); color: var(--accent-ink); flex: 1 1 auto; max-width: 22.8571rem; }
@media (max-width: 760px) { a.buy { flex-basis: 100%; max-width: none; min-height: 3.4286rem; } }
.bb-acts { display: flex; align-items: center; gap: 0.5714rem; margin-top: 0.5714rem; flex-wrap: wrap; }
.bb-acts .track { min-height: 2.8571rem; }
.bb-acts #actnote { margin-inline-start: auto; }
.usedline { display: block; padding: 0.7143rem 1rem; border-radius: 0.8571rem; background: var(--used-soft); color: var(--used); text-decoration: none; font-size: var(--text-base); }
.usedline svg.i { width: 0.9286rem; height: 0.9286rem; vertical-align: -0.1429rem; }
.pd h2 { margin: 0.2857rem 0 -0.4286rem; font-size: var(--text-lg); }
.srow .vtag { margin-inline-start: 0.4286rem; font-weight: 500; vertical-align: 1px; }
.srows { display: grid; border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; background: var(--surface); }
.srow { display: flex; align-items: center; gap: 0.7143rem; padding: 0.7143rem 1rem; text-decoration: none; color: inherit; border-top: 1px solid var(--line); min-height: 4rem; }
.srow:first-child { border-top: 0; }
.srow.best { background: color-mix(in srgb, var(--accent-soft) 40%, var(--surface)); }
.srow .sn { display: grid; flex: 1; min-width: 0; }
.srow .sn .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow .sp { min-width: 5.5em; font-weight: 700; font-size: var(--text-lg); text-align: end; display: grid; }
.srow .sp small { font-weight: 500; font-size: var(--text-xs); }
.srow.best .sp { color: var(--good); }
.srow > svg.i { width: 1.0714rem; height: 1.0714rem; color: var(--muted); flex: none; }
details.fold { border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); }
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 0.7143rem; padding: 1rem 1.1429rem; min-height: 3.4286rem; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "▾"; margin-inline-start: auto; color: var(--muted); transition: transform .15s; }
details.fold[open] > summary::after { transform: rotate(180deg); }
details.fold > :not(summary) { margin: 0 1.1429rem 1rem; }
details.fold .chart-bar { margin-top: 0; }
.pd-more p { margin: 0 0 0.5714rem; }
.pd .offer-list { display: grid; }
.pd .offers-table { display: none; }
@media (min-width: 900px) { .pd .offers-table { display: block; } .pd .offer-list { display: none; } }
details.fold > summary b { white-space: nowrap; }
@media (max-width: 640px) {
  .pd .vchips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -1.1429rem; padding: 0 1.1429rem; }
  .pd .vchips > * { flex: none; }
  .pd .vchips [hidden] { display: inline-flex !important; } /* one scrolling row: no "+N more" needed */
  .pd .vchips [data-morechips] { display: none !important; }
}

/* ---------- home */
.homemode main.layout, .homemode #live { display: none !important; }
body.productmode #homeView, .chatmode #homeView, .dealsmode #homeView { display: none !important; }
.home-hero { padding: 0.4286rem 0 0.7143rem; }
/* popular searches under the search bar: one row, sideways on a phone */
.hpop { display: flex; gap: 0.4286rem; overflow-x: auto; scrollbar-width: none; padding: 0.1429rem 0 0.7143rem; margin-top: -0.2857rem; }
.hpop::-webkit-scrollbar { display: none; }
.hpop:empty { display: none; }
.hpop .chip { flex: none; display: inline-flex; align-items: center; gap: 0.4286rem; }
.hpop .chip svg.i { width: 0.9286rem; height: 0.9286rem; color: var(--accent); }
/* aisle tiles: the aisle's name over its top deal's photo, each in its own soft colour */
.ctiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.8571rem; }
@media (max-width: 1100px) { .ctiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ctile { position: relative; display: flex; align-items: flex-end; height: 7.4286rem; padding: 0.8571rem 1rem; border-radius: 1rem; overflow: hidden; text-decoration: none;
  background: linear-gradient(135deg, hsl(var(--h) 70% 93%), hsl(calc(var(--h) + 25) 60% 84%)); color: hsl(var(--h) 45% 22%); transition: transform .15s, box-shadow .15s; }
.ctile:hover { transform: translateY(-0.1429rem); box-shadow: 0 0.5714rem 1.4286rem rgba(0, 0, 0, 0.1); }
.ctile .cl { position: relative; z-index: 1; font-weight: 700; font-size: var(--text-lg); letter-spacing: -0.01em; max-width: 55%; line-height: 1.2; }
.ctile .cpic { position: absolute; inset-inline-end: 0.5714rem; top: 50%; transform: translateY(-50%); width: 48%; height: 82%; object-fit: contain; mix-blend-mode: multiply; transition: transform .2s; }
.ctile:hover .cpic { transform: translateY(-50%) scale(1.05); }
.ctile .noimg { display: none; }
:root[data-theme="dark"] .ctile { background: linear-gradient(135deg, hsl(var(--h) 30% 22%), hsl(calc(var(--h) + 25) 30% 16%)); color: hsl(var(--h) 60% 88%); }
:root[data-theme="dark"] .ctile .cpic { mix-blend-mode: normal; border-radius: 0.7143rem; background: #fff; padding: 0.3571rem; width: auto; max-width: 42%; height: 72%; filter: brightness(0.86); } /* (the whole picture, its white card too: dimmed evenly) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ctile { background: linear-gradient(135deg, hsl(var(--h) 30% 22%), hsl(calc(var(--h) + 25) 30% 16%)); color: hsl(var(--h) 60% 88%); }
  :root:not([data-theme="light"]) .ctile .cpic { mix-blend-mode: normal; border-radius: 0.7143rem; background: #fff; padding: 0.3571rem; width: auto; max-width: 42%; height: 72%; filter: brightness(0.86); } /* (the whole picture, its white card too: dimmed evenly) */
}
/* phones: two rows that scroll sideways (the deals stay on the first screen) */
@media (max-width: 640px) {
  .ctiles { grid-template-columns: none; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: 40%; gap: 0.5714rem; overflow-x: auto; scrollbar-width: none; margin: 0 -1.1429rem; padding: 0 1.1429rem; }
  .ctiles::-webkit-scrollbar { display: none; }
  .ctile { height: 4.8571rem; padding: 0.6429rem; } .ctile .cl { font-size: var(--text-md); }
}
/* a row of deals per aisle: scrolls sideways, arrows on wide screens */
.hrowwrap { position: relative; }
.hrow.drow > .card { flex: 0 0 15.5rem; scroll-snap-align: start; content-visibility: visible; }
.hall { font-size: var(--text-sm); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); text-decoration: none; padding: 0.3571rem 0.8571rem; border: 1px solid var(--line-2); border-radius: 0.5714rem; }
.hall:hover { color: var(--ink); border-color: var(--axis); }
/* (button.hnav: the round surface must beat button.ic's transparent background — over a photo the arrow vanished) */
button.hnav { position: absolute; top: 38%; z-index: 2; width: 2.5714rem; height: 2.5714rem; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); }
.hnav.prev { inset-inline-start: -1rem; } .hnav.next { inset-inline-end: -1rem; }
[dir="rtl"] .hnav svg.i { transform: scaleX(-1); }
@media (pointer: coarse), (max-width: 640px) { .hnav { display: none; } .hrow.drow > .card { flex-basis: 44%; } }
/* suggested searches under the search box: one scrolling row on phones */
.hsuggest { display: flex; gap: 0.5714rem; padding: 0.2857rem 0 0.8571rem; overflow-x: auto; scrollbar-width: none; }
.hsuggest::-webkit-scrollbar { display: none; }
.hsuggest:empty { display: none; }
.hsuggest .chip { flex: none; padding: 0.5rem 1rem; font-weight: 500; }
@media (min-width: 700px) { .hsuggest { flex-wrap: wrap; overflow: visible; } }
.home-hero h1 { font-size: var(--text-2xl); margin: 0 0 0.2857rem; letter-spacing: -0.02em; }
.home-hero p { margin: 0; max-width: 44.2857rem; }
.home-sec { margin-top: 1.5714rem; }
.home-sec:empty { display: none; }
.hhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 0.8571rem; margin-bottom: 0.7143rem; }
.hhead h2 { margin: 0; font-size: var(--text-xl); }
.hmore { color: var(--accent); text-decoration: none; font-weight: 600; font-size: var(--text-base); white-space: nowrap; display: inline-flex; gap: 0.2857rem; align-items: center; padding: 0.5714rem 0; }
.hmore svg.i { width: 0.9286rem; height: 0.9286rem; }
.hrow { display: flex; gap: 0.8571rem; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; padding-bottom: 0.4286rem; scroll-padding-inline: 1.1429rem; }
.htile { flex: 0 0 14.2857rem; scroll-snap-align: start; display: grid; align-content: start; gap: 0.2857rem; padding: 0.7143rem; border-radius: 1.1429rem;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit; }
.htile:hover { border-color: var(--line-2); }
.htile .hpic { position: relative; display: block; height: 9.2857rem; border-radius: 0.8571rem; overflow: hidden; background: var(--img-bg, #ecebe7); margin-bottom: 0.2857rem; }
.htile .hpic .pic, .htile .hpic .noimg { width: 100%; height: 100%; object-fit: contain; display: block; padding: 0.7143rem; mix-blend-mode: multiply; }
.htile .hpic .disc { position: absolute; top: 0.4286rem; inset-inline-start: 0.4286rem; }
.htile .ht { font-weight: 600; font-size: var(--text-base); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.htile .hp b { font-size: var(--text-lg); }
.htile .hp s { font-size: var(--text-sm); }
.htile .hr { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.htile.store { flex-basis: 20rem; padding: 1rem; }
.htile.store p { margin: 0.2857rem 0 0; font-size: var(--text-md); line-height: 1.45; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.home-empty { padding: 1.1429rem; border: 1px dashed var(--line-2); border-radius: 1rem; color: var(--muted); }
.home-empty p { margin: 0; }
.skel-row { display: flex; gap: 0.8571rem; overflow: hidden; }
.skel { flex: 0 0 14.2857rem; height: 17.1429rem; border-radius: 1.1429rem; background: var(--surface); animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .5; } }
@media (max-width: 640px) { .htile { flex-basis: 64%; } .htile.store { flex-basis: 82%; } .hrow { margin: 0 -1.1429rem; padding: 0 1.1429rem 0.4286rem; } }
.htile .disc { position: absolute; top: 0.4286rem; inset-inline-start: 0.4286rem; background: var(--accent-fill); color: var(--accent-ink); font-size: var(--text-sm); font-weight: 700; padding: 0.2143rem 0.5714rem; border-radius: 0.5rem; }
.htile .hp small, .card.deal .price-line small, .bb-price small { margin-inline-end: 0.2143rem; }
/* deals: one scrolling row of store chips on phones; summaries in a sideways row everywhere (they were 3,000px tall on desktop) */
.dstores { flex-wrap: nowrap; }
@media (pointer: coarse) { .brand .logo { width: 2.8571rem; height: 2.8571rem; } .card.deal .acts button.ic { width: 3.1429rem; height: 3.1429rem; } }

/* ---------- navigation: bottom tab bar on phones, one header row */
.tabs { display: none; }
@media (max-width: 640px) {
  .tabs { display: flex; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: saturate(1.6) blur(1rem); -webkit-backdrop-filter: saturate(1.6) blur(1rem);
    border-top: 1px solid var(--line); }
  .tabs a { flex: 1; min-height: 4rem; display: grid; place-items: center; align-content: center; gap: 0.1429rem; font-size: var(--text-xs); font-weight: 600;
    color: var(--muted); text-decoration: none; }
  .tabs a svg.i { width: 1.5714rem; height: 1.5714rem; }
  .tabs a.on { color: var(--accent); }
  .newpill { bottom: calc(4.8571rem + env(safe-area-inset-bottom)); }
  .tabs a[data-tab="chat"].on { color: var(--used); }
  body { padding-bottom: calc(4.5714rem + env(safe-area-inset-bottom)); }
  .composer { bottom: calc(4rem + env(safe-area-inset-bottom)); }
  .toasts { bottom: calc(4.8571rem + env(safe-area-inset-bottom)) !important; }
  /* header: logo and buttons, then the search box on its own full-width row (room to see what you type) */
  :root { --head-h: 7.8571rem; }
  .top { flex-wrap: wrap; gap: 0.4286rem; row-gap: 0.4286rem; padding: 0.4286rem 0.8571rem 0.5714rem; }
  .top .brand b { display: inline; }
  .qbox { order: 10; flex: 1 1 100%; min-width: 0; }
  #dealsBtn, #syncBtn, .top .spacer { display: none !important; }
  #status > summary .short { display: none; }
  #status > summary, #saved > summary { padding: 0 0.5714rem; }
  /* phones: the search icon alone, "Ask AI" keeps its words */
  .qbox input, body:not(.ai) .qbox input { padding-inline-end: 10.7143rem; height: 3.2857rem; }
  body:not(.ai) .qbox input { padding-inline-end: 4.2857rem; }
  #liveBtn .lbl { display: none; }
  .qmode button { padding: 0 0.8571rem; height: 2.5714rem; }
  /* small text links in the search strip: finger-sized */
  .strip-head .link.small { padding-block: 0.5714rem; }
  /* product page: Back scrolls away instead of sticking under the header */
  .drawer-bar { position: static; padding: 0.2857rem 0; }
  /* live strip: close button in the corner */
  .strip { position: relative; padding-inline-end: 3.4286rem; }
  .strip-head [data-closelive] { position: absolute; top: 0.5714rem; inset-inline-end: 0.5714rem; }
  /* a finished search: two short lines (what was searched; when · Stores · Search again), not half the screen */
  .strip { padding: 0.7143rem 3rem 0.7143rem 0.8571rem; }
  .strip-head { gap: 0.2857rem 0.7143rem; }
  .strip-head .lead { flex: 1 1 100%; font-size: var(--text-md); }
  .strip-head .grow { display: none; }
  .strip:has(.prog.done) .strip-head > span:has(> [data-liveall]),
  .strip:has(.prog.done) .strip-head > span.muted:not([title]),
  .strip:has(.prog.done) .prog { display: none; }
  .chat-title b { display: none; }
}
a.tbtn { text-decoration: none; }

/* ---------- badges mean one thing each: green = verified saving, grey = the store's claim, red = disproved, outline = not checked */
.card .disc { background: var(--surface-3); color: var(--ink-2); }
.card.deal.real .disc, .htile .disc.real { background: var(--accent-fill); color: var(--accent-ink); }
.htile .disc { background: var(--surface-3); color: var(--ink-2); }
.badge.unverified { background: transparent; border: 1px solid var(--line-2); color: var(--muted); }
.bb-acts .track:not(.on) { border-color: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--accent); }
.card.deal .disc.real { background: var(--accent-fill); color: var(--accent-ink); text-decoration: none; }

/* round 5 */
.chips-row.folded { display: none; }
@media (max-width: 640px) {
  body.chatmode .chat-head { position: sticky; top: var(--head-h); z-index: 5; background: var(--page); padding-block: 0.4286rem; }
  /* the AI page on a phone: no product search row (Home has it), the empty chat fits the screen, a one-line composer */
  body.chatmode .top .qbox { display: none; }
  body.chatmode .chat { min-height: calc(100dvh - var(--head-h) - 4.5714rem - env(safe-area-inset-bottom, 0px)); }
  .chat-empty { padding-top: 1.5vh; }
  .chat-empty .hero { width: 3.1429rem; height: 3.1429rem; margin-bottom: 0.7143rem; border-radius: 1rem; }
  .chat-empty .suggest { margin-top: 1.1429rem; gap: 0.4286rem; }
  .composer { gap: 0.4286rem; padding-top: 0.5714rem; padding-bottom: 0.5714rem; }
  .composer textarea { min-height: 3.1429rem; padding: 0.7143rem 1rem; font-size: 16px; scrollbar-width: none; }
  .composer .send, .composer .attach { width: 3.1429rem; height: 3.1429rem; border-radius: 1rem; }
}
.card .disc { max-width: calc(100% - 1.4286rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.deal { display: flex; flex-direction: column; }
.card.deal .body { flex: 1; display: flex; flex-direction: column; }

/* chat tables on phones: each row becomes a small card, each cell labelled with its column */
@media (max-width: 480px) {
  .md table, .md thead, .md tbody, .md tr, .md td { display: block; width: auto; min-width: 0; max-width: none; }
  .md thead { display: none; }
  .md tr { border: 1px solid var(--line); border-radius: 0.7143rem; padding: 0.4286rem 0.7143rem; margin: 0.5714rem 0; }
  .md td { border: 0; padding: 0.1429rem 0; white-space: normal; }
  .md td::before { content: attr(data-label); display: block; font-size: var(--text-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
  .md td:first-child { font-weight: 650; }
  .md td:first-child::before { display: none; }
}
.card.deal .price-line .was { margin-inline-start: 0.5714rem; }

/* deal cards, short: name, price + struck "was", store + save star, the other stores */
.card.deal .dstore { display: flex; align-items: center; justify-content: space-between; gap: 0.4286rem; margin-top: auto; padding-top: 0.1429rem; } /* the store at the card's foot: the same line across a row */
.card.deal .dstore .muted { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card.deal .dstore button.ic { flex: none; }
.dbar select { height: 2.7143rem; max-width: 46%; }
@media (max-width: 640px) { .dbar { flex-wrap: nowrap; gap: 0.4286rem; } .dbar #dQ { flex: 1 1 auto; } .dbar select { flex: 0 0 auto; max-width: 45%; } }
.card.deal .body, .card.deal .others, .card.deal .others li { min-width: 0; }
.card.deal .others a { overflow: hidden; }
@media (max-width: 640px) { .card.deal .others a { gap: 0.3571rem; padding: 0.2857rem 0.4286rem; } .card.deal .others svg { display: none; } .card.deal .others .diff { min-width: 0; } }

/* accounts: AI switch, bell, avatar, sign-in sheet, alerts list */
body:not(.ai) .ai-only { display: none !important; }
.tbtn.bell { position: relative; }
.tbtn.bell .n { position: absolute; top: 0.1429rem; inset-inline-end: 0.1429rem; min-width: 1.1429rem; height: 1.1429rem; padding: 0 0.2857rem; border-radius: 0.5714rem; background: var(--bad); color: #fff; font-size: var(--text-xs); font-weight: 700; line-height: 1.1429rem; text-align: center; }
.tbtn.bell.on { color: var(--accent); }
#acct > summary { list-style: none; }
#acct .avatar { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent-fill); color: var(--accent-ink); font-weight: 700; font-size: var(--text-md); }
#acct .pop { inset-inline-end: 0; inset-inline-start: auto; min-width: 15.7143rem; display: grid; gap: 0.1429rem; }
#acct .pop p { padding: 0.2857rem 0.5714rem 0.5714rem; border-bottom: 1px solid var(--line); margin-bottom: 0.2857rem; }
#acct .mi { display: flex; width: 100%; justify-content: flex-start; gap: 0.5714rem; align-items: center; padding: 0.6429rem 0.5714rem; border-radius: 0.5714rem; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; text-align: start; cursor: pointer; }
#acct .mi:hover { background: var(--surface-2); }
#acct .mi svg { width: 1.1429rem; height: 1.1429rem; }
dialog.auth { border: 1px solid var(--line-2); border-radius: 1.1429rem; background: var(--surface); color: var(--ink); padding: 1.5714rem; width: min(27.1429rem, calc(100vw - 2.2857rem)); box-shadow: 0 1.4286rem 4.2857rem rgba(0,0,0,.35); }
dialog.auth::backdrop { background: rgba(0,0,0,.45); }
dialog.auth form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.8571rem; position: relative; }
dialog.auth h2 { margin: 0; font-size: var(--text-xl); }
dialog.auth p { margin: 0; }
dialog.auth label { display: grid; gap: 0.3571rem; font-size: var(--text-md); color: var(--ink-2); }
dialog.auth input { height: 3.1429rem; font-size: var(--text-lg); width: 100%; min-width: 0; }
dialog.auth .close { position: absolute; top: -0.5714rem; inset-inline-end: -0.5714rem; }
dialog.auth .wide { width: 100%; height: 3.2857rem; justify-content: center; font-size: var(--text-lg); }
dialog.auth .center { text-align: center; }
dialog.auth .err { color: var(--bad); }
/* sign in / create account: logo and title, Google, "or", fields, one button */
dialog.auth .ahead { display: grid; justify-items: center; text-align: center; gap: 0.4286rem; margin-bottom: 0.2857rem; }
dialog.auth .ahead .logo { width: 3rem; height: 3rem; border-radius: 0.9286rem; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, #19a067, #0b6440); box-shadow: 0 0.2857rem 0.8571rem rgba(15, 122, 76, .3); }
dialog.auth .ahead .logo svg { width: 1.5714rem; height: 1.5714rem; stroke-width: 2.2; }
dialog.auth .ahead h2 { font-size: var(--text-2xl); letter-spacing: -0.02em; margin-top: 0.2857rem; }
dialog.auth .ahead p { font-size: var(--text-md); }
dialog.auth .gbtn { display: flex; align-items: center; justify-content: center; gap: 0.7143rem; height: 3.2857rem; border-radius: 0.8571rem; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 600; font-size: var(--text-md); text-decoration: none; transition: background .15s, border-color .15s; }
dialog.auth .gbtn:hover { background: var(--surface-2); border-color: var(--muted); }
dialog.auth .aor { display: flex; align-items: center; gap: 0.8571rem; color: var(--muted); font-size: var(--text-sm); }
dialog.auth .aor::before, dialog.auth .aor::after { content: ''; flex: 1; height: 1px; background: var(--line); }
dialog.auth .af { display: grid; gap: 0.3571rem; font-size: var(--text-sm); font-weight: 600; color: var(--ink-2); }
dialog.auth .af input { height: 3.1429rem; border-radius: 0.8571rem; border: 1px solid var(--line-2); background: var(--surface-2); padding: 0 1rem; font-size: var(--text-md); font-weight: 400; color: var(--ink); box-shadow: none; transition: border-color .15s, box-shadow .15s, background .15s; }
dialog.auth .af input::placeholder { color: var(--muted); }
dialog.auth .af input:focus { outline: none; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 0.2143rem color-mix(in srgb, var(--accent) 18%, transparent); }
dialog.auth .pw { position: relative; display: block; }
dialog.auth .pw input { padding-inline-end: 3rem; }
dialog.auth .eye { position: absolute; inset-inline-end: 0.3571rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
dialog.auth .eye.on { color: var(--accent); }
dialog.auth .forgot { justify-self: end; margin-top: -0.4286rem; }
dialog.auth .wide { border-radius: 0.8571rem; font-weight: 650; margin-top: 0.2857rem; }
dialog.auth .aswitch { text-align: center; font-size: var(--text-md); color: var(--ink-2); }
dialog.auth .aswitch .link { font-weight: 650; }
@media (max-width: 480px) { dialog.auth { padding: 1.2857rem; } }
#alertsView h1 { margin: 0.4286rem 0 1rem; }
.alist { display: grid; gap: 0.5714rem; max-width: 54.2857rem; }
.arow { display: flex; gap: 0.8571rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0.7143rem; }
.arow.new { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.arow .apic { flex: none; width: 4.5714rem; height: 4.5714rem; border-radius: 0.5714rem; overflow: hidden; background: var(--img-bg); display: grid; place-items: center; }
.arow .apic .pic { width: 100%; height: 100%; object-fit: contain; padding: 0.3571rem; mix-blend-mode: multiply; }
.arow .abody { flex: 1; min-width: 0; display: grid; gap: 0.2143rem; }
.arow .t { color: var(--ink); text-decoration: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arow .pill { font-size: var(--text-sm); font-weight: 700; padding: 0.1429rem 0.5rem; border-radius: 0.4286rem; background: var(--surface-3); color: var(--ink-2); }
.arow .pill.good { background: var(--accent-fill); color: var(--accent-ink); }
.arow .go { flex: none; padding: 0.7143rem; color: var(--ink-2); }
.arow .go svg { width: 1.2857rem; height: 1.2857rem; }
.bb-alert { display: flex; align-items: center; gap: 0.4286rem; flex-wrap: wrap; font-size: var(--text-md); color: var(--ink-2); margin-top: 0.5714rem; }
.bb-alert svg.i { width: 1.0714rem; height: 1.0714rem; }
.bb-alert input { width: 6.8571rem; height: 2.4286rem; }
.bb-alert .primary.small { height: 2.4286rem; padding: 0 0.8571rem; }
.cap { text-transform: capitalize; }

/* basket + my stores */
#basketView h1 { margin: 0.4286rem 0 1rem; }
#basketView h2 { margin: 1.2857rem 0 0.5714rem; font-size: var(--text-lg); }
.bk { max-width: 54.2857rem; }
.bk-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(11.4286rem, 1fr)); gap: 0.7143rem; margin-bottom: 1rem; }
.bk-best { display: grid; gap: 0.1429rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0.8571rem 1rem; }
.bk-best b { font-size: var(--text-xl); }
.bk-items { display: grid; gap: 0.5714rem; }
.bk-item { display: flex; gap: 0.8571rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0.5714rem 0.7143rem; }
.bk-item .apic { flex: none; width: 3.7143rem; height: 3.7143rem; border-radius: 0.5714rem; overflow: hidden; background: var(--img-bg); display: grid; place-items: center; }
.bk-item .apic .pic { width: 100%; height: 100%; object-fit: contain; padding: 0.2857rem; mix-blend-mode: multiply; }
.bk-item .abody { flex: 1; min-width: 0; display: grid; gap: 0.1429rem; }
.bk-item .t { color: var(--ink); text-decoration: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-item .qty { display: flex; align-items: center; gap: 0.2857rem; flex: none; }
.bk-item .qty .num { min-width: 1.5em; text-align: center; font-weight: 600; }
.bk-item .qty button { width: 2.4286rem; height: 2.4286rem; font-size: var(--text-xl); }
dialog.stores .storelist { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.7143rem, 1fr)); gap: 0.4286rem 0.8571rem; max-height: 50vh; overflow: auto; }
dialog.stores label { display: flex; flex-direction: row; align-items: center; gap: 0.5714rem; color: var(--ink); font-size: var(--text-base); }
dialog.stores input[type=checkbox] { height: auto; width: 1.2857rem; height: 1.2857rem; }

/* ---------- everyday basics (Home row + #page=basics): cheapest per kg / L / piece at the grocers */
.basicsmode main.layout, .basicsmode #live, body.productmode #basicsView { display: none !important; }
.htile.basic { flex-basis: 12rem; }
.htile.basic .ht { min-height: 0; -webkit-line-clamp: 1; }
.htile.basic .hpic { height: 8rem; }
.htile.basic .hu, .brow .bu { color: var(--good); font-weight: 650; }
@media (max-width: 640px) { .htile.basic { flex-basis: 42%; } }
.bhead { display: flex; align-items: center; gap: 0.7143rem; margin: 0.4286rem 0 1rem; flex-wrap: wrap; }
h1.bhead, .bhead h1 { margin: 0; font-size: var(--text-2xl); letter-spacing: -0.02em; }
h1.bhead { display: block; margin: 0.4286rem 0 1rem; }
.bhead .back { display: grid; place-items: center; width: 2.5714rem; height: 2.5714rem; border-radius: 0.7143rem; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); }
.bhead .back:hover { color: var(--ink); border-color: var(--line-2); }
.bhead .pill { font-size: var(--text-sm); font-weight: 700; padding: 0.2143rem 0.5714rem; border-radius: 0.5rem; background: var(--surface-3); color: var(--ink-2); }
.bhead .pill.good { background: var(--accent-fill); color: var(--accent-ink); }
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0.8571rem; }
.bgrid .htile { flex: none; }
@media (max-width: 640px) { .bgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7143rem; } }
.bstores { display: flex; gap: 0.5714rem; overflow-x: auto; scrollbar-width: thin; padding-bottom: 0.4286rem; margin-bottom: 0.7143rem; max-width: 54.2857rem; }
.bstore { flex: none; display: grid; gap: 1px; padding: 0.5rem 0.7857rem; border-radius: 0.7143rem; background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink-2); font-size: var(--text-sm); }
.bstore b { color: var(--ink); font-size: var(--text-md); }
.bstore.best { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.bstore.best b { color: var(--good); }
@media (max-width: 640px) { .bstores { margin: 0 -1.1429rem 0.7143rem; padding: 0 1.1429rem 0.4286rem; } }
.brow { text-decoration: none; color: inherit; }
.brow:hover { border-color: var(--line-2); }
.brow .abody > span { min-width: 0; }
.brow .t { display: block; }
.brow .pill { flex: none; font-size: var(--text-sm); font-weight: 700; padding: 0.2143rem 0.5714rem; border-radius: 0.5rem; background: var(--surface-3); color: var(--ink-2); }
.brow .pill.good { background: var(--accent-fill); color: var(--accent-ink); }
.brow .abody small { margin-inline-end: 0.2143rem; }
.brow .bp { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.5714rem; }
.brow .bu { white-space: nowrap; }

/* store icon before a store name (util.js logo()) */
.slogo { width: 1.15em; height: 1.15em; border-radius: 0.2857rem; object-fit: contain; background: #fff; vertical-align: -0.2em; margin-inline-end: 0.4em; flex: none; display: inline-block; }
.srow .slogo, .offers-table .slogo, .offer .slogo, .bk-best .slogo { width: 1.35em; height: 1.35em; border-radius: 0.3571rem; }
.mi.danger { color: var(--bad); }
button.primary.danger { background: var(--bad); border-color: var(--bad); color: #fff; }

/* site footer, compact: a row with the name, one line and the links; the aisles and price checks as wrapped dot-separated
   links; the fine print in one small line (prices are the stores', affiliate links, Amazon) */
.sitefoot { display: none; margin-top: 2.2857rem; padding-block: 1.4286rem 1.7143rem; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--text-sm); line-height: 1.5;
  max-width: none; background: var(--surface-2); padding-inline: max(1.7143rem, calc((100vw - max(1680px, 70vw)) / 2 + 1.7143rem)); }
body:not(.chatmode) .sitefoot { display: block; }
.sitefoot a { color: var(--ink-2); text-decoration: none; }
.sitefoot a:hover { color: var(--accent); }
.ftop { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5714rem 1.4286rem; }
.ftop .brand { font-size: var(--text-md); }
.ftop .brand b { display: inline; } /* (phones hide the name beside the logo in the header, not here) */
.ftag { margin: 0; flex: 1 1 16rem; }
.flinks { display: flex; flex-wrap: wrap; gap: 0.2857rem 1.1429rem; font-weight: 550; }
.frows { display: grid; gap: 0.5714rem; margin-top: 1rem; padding-top: 0.8571rem; border-top: 1px solid var(--line); }
.frows > div { display: flex; align-items: baseline; gap: 0.8571rem; min-width: 0; }
.frows h4 { margin: 0; flex: none; width: 6.4286rem; font-size: var(--text-xs); font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.frows ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.1429rem 0; min-width: 0; }
.frows li:not(:last-child)::after { content: '·'; margin-inline: 0.5rem; color: var(--line-2); }
.ffine { margin-top: 0.8571rem; padding-top: 0.7143rem; border-top: 1px solid var(--line); font-size: var(--text-xs); }
.ffine p { margin: 0 0 0.2857rem; max-width: 140ch; }
.ffine b { color: var(--ink-2); }
@media (max-width: 640px) { .frows > div { flex-direction: column; gap: 0.2857rem; } .frows h4 { width: auto; } .ftag { flex-basis: 100%; order: 3; } }
/* Amazon prices: when they were checked (docs/amazon-compliance.md §3.1) */
.asof { font-size: var(--text-xs); font-weight: 500; color: var(--muted); white-space: nowrap; }
[data-asof] { display: inline-grid; place-items: center; width: 1.1429em; height: 1.1429em; margin-inline-start: 0.3571em;
  border: 1px solid currentColor; border-radius: 50%; font: italic 700 0.8571em/1 Georgia, serif; cursor: help; vertical-align: 0.0714em; font-size: 0.75rem; color: var(--muted); }
[data-asof]:hover, [data-asof]:focus-visible { color: var(--accent); outline: none; }
.at:has(.asof), .bb-where:has(.asof) { white-space: normal; }
.srow .sp .asof, .sgsub .asof { display: block; text-align: end; }
/* card store rows: the stamp on its own line under the row (the rows are grid cells: it mustn't squeeze the name) */
.spread .row > .asof { grid-column: 1 / -1; text-align: end; padding: 0; margin-top: -0.1429rem; }

/* launch polish */
@media (max-width: 640px) {
  .card .price-line .at { flex: 1 0 100%; }
}
/* checking prices now is for signed-in people (it asks the stores) */
body:not(.signed-in) .card [data-act="refresh"] { display: none; }
/* Home: one line saying what this is + the stores' logos */
.home-hero h1 { font-size: var(--text-xl); }
.hlogos { display: flex; flex-wrap: wrap; gap: 0.4286rem; margin-top: 0.5714rem; }
.hlogos .slogo { width: 1.5714rem; height: 1.5714rem; margin: 0; border-radius: 0.4286rem; }
.htile .hst { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.htile .hvs { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .home-hero h1 { font-size: var(--text-xl); } .hlogos .slogo { width: 1.4286rem; height: 1.4286rem; } }
.livehint { display: flex; align-items: center; justify-content: center; gap: 0.7143rem; flex-wrap: wrap; padding: 1.2857rem 0; color: var(--muted); }
.bk-best small { margin-inline-end: 0.2143rem; }
@media (max-width: 640px) { #savedBtn { display: none; } } /* phones have the Saved tab */

/* round 2 design fixes */
.hlogos > span { flex: none; display: inline-flex; }
.hlogos .slogo { max-width: none; }
.hlogos .more { align-self: center; font-size: var(--text-sm); font-weight: 600; color: var(--muted); padding: 0.1429rem 0.5714rem; border-radius: 71.3571rem; background: var(--surface-2); }
.hlogos button.more { flex: none; border: 0; line-height: inherit; }
.hlogos button.more:hover { color: var(--ink); }
.vchips button.on, .vchips button.on * { color: var(--accent-ink); }
.tbtn.on { background: var(--accent-soft); color: var(--accent); }
#acct .mi.danger { color: var(--bad); border-top: 1px solid var(--line); border-radius: 0 0 0.5714rem 0.5714rem; margin-top: 0.2857rem; padding-top: 0.7857rem; }
dialog.stores input[type=checkbox], .fc input[type=checkbox] { accent-color: var(--accent); }
.bk, .alist { margin-inline: auto; }
.signed-out-saved .resbar, .signed-out-saved #side { display: none !important; }
@media (max-width: 640px) {
  .top #bellBtn, .top #cartBtn { display: none !important; } /* in the account menu on phones: the search box keeps its width */
  #acct .avatar.dot { box-shadow: 0 0 0 0.1429rem var(--surface), 0 0 0 0.2857rem var(--bad); }
  .card .spread .row:nth-child(n+4) { display: none; }
}
.at a.store { display: inline; } /* so a long store name ellipsizes instead of jumping out whole */
@media (max-width: 640px) { .card .spread small.up { display: none; } }

/* ---- search progress view (app.js beginSearch): results stay hidden until the stores answered and Claude sorted them */
body.searching main.layout, body.searching #live, body.searching #siteFoot { display: none !important; }
body:not(.searching) main.layout { animation: resultsIn .45s ease-out; }
@keyframes resultsIn { from { opacity: 0; transform: translateY(0.5714rem); } }
#searchView { padding-block: clamp(2rem, 9vh, 6.4286rem) 2.8571rem; }
.sload {
  --g1: var(--accent); --g2: #20b2a6; --g3: #4f8df0;
  max-width: 44.2857rem; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1.2857rem;
}
.sload.ai { --g1: #4f8df0; --g2: var(--used); --g3: #d0559c; }
/* a soft orb: three rings breathing around the search glass */
.sl-orb { position: relative; width: 6rem; height: 6rem; display: grid; place-items: center; color: var(--g1); transition: color .6s; }
.sl-orb svg.i { width: 2.1429rem; height: 2.1429rem; position: relative; z-index: 1; }
.sl-orb i { position: absolute; inset: 0; border-radius: 50%; border: 0.1429rem solid currentColor; opacity: 0; animation: orb 2.4s ease-out infinite; }
.sl-orb i:nth-child(2) { animation-delay: .8s; }
.sl-orb i:nth-child(3) { animation-delay: 1.6s; }
.sl-orb::before { content: ''; position: absolute; inset: 1rem; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--g1) 22%, transparent), transparent 70%); }
.sload.ai .sl-orb { color: var(--g2); }
@keyframes orb { 0% { transform: scale(.55); opacity: .7; } 100% { transform: scale(1.25); opacity: 0; } }
/* found products' pictures around the orb (app.js popPic): they pop up, drift, and are pulled in; burst at the end */
.sl-stage { position: relative; width: 100%; height: 13.5714rem; display: grid; place-items: center; margin-block: -2.8571rem -2.5714rem; }
.sl-pics { position: absolute; inset: 0; pointer-events: none; }
.sl-pic {
  position: absolute; left: 50%; top: 50%; width: 4.1429rem; height: 4.1429rem; margin: -2.0714rem 0 0 -2.0714rem; padding: 0.3571rem; border-radius: 1rem;
  background: #fff; box-shadow: 0 0.4286rem 1.2857rem rgb(0 0 0 / .14), 0 0 0 1px rgb(0 0 0 / .05); opacity: 0; will-change: transform, opacity;
}
.sl-pic img, .sl-pic .noimg { width: 100%; height: 100%; object-fit: contain; display: block; }
.sl-pic img.slogo { position: absolute; inset-inline-end: -0.3571rem; bottom: -0.3571rem; width: 1.4286rem; height: 1.4286rem; margin: 0; padding: 0.1429rem; border-radius: 0.4286rem; background: #fff; box-shadow: 0 0.1429rem 0.4286rem rgb(0 0 0 / .18); }
.sl-orb { z-index: 1; }
.sl-orb.gulp::before { animation: gulp .35s ease-out; }
@keyframes gulp { 40% { transform: scale(1.6); filter: brightness(1.4); } }
.sload.burst .sl-orb { animation: orbBurst .42s ease-out forwards; }
@keyframes orbBurst { 30% { transform: scale(1.35); } 100% { transform: scale(.6); opacity: 0; } }
.sl-head { margin: 0; font-size: clamp(var(--text-xl), 3.6vw, var(--text-2xl)); font-weight: 650; letter-spacing: -0.01em; line-height: 1.3; text-wrap: balance; }
.sl-head b { color: var(--g1); font-weight: 700; transition: color .6s; }
.sl-head svg.i { width: 1.4286rem; height: 1.4286rem; vertical-align: -0.2143rem; color: var(--g2); animation: twinkle 1.6s ease-in-out infinite; }
@keyframes twinkle { 50% { transform: scale(1.25) rotate(20deg); opacity: .7; } }
/* the bar: a gradient that flows, a light sweeping over it, a glowing head */
.sl-bar { position: relative; width: 100%; height: 0.8571rem; border-radius: 71.3571rem; background: var(--line); overflow: hidden; box-shadow: inset 0 1px 0.1429rem rgba(0, 0, 0, .06); }
.sl-bar i {
  position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--g1), var(--g2), var(--g3), var(--g2), var(--g1)); background-size: 300% 100%;
  animation: flow 3.2s linear infinite; box-shadow: 0 0 1rem color-mix(in srgb, var(--g2) 55%, transparent);
}
.sl-bar i::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .55) 50%, transparent 80%); background-size: 200% 100%;
  animation: sweep 1.6s ease-in-out infinite;
}
.sl-bar i::before { content: ''; position: absolute; inset-inline-end: -0.1429rem; top: 50%; width: 1rem; height: 1rem; margin-top: -0.5rem; border-radius: 50%; background: #fff; opacity: .85; filter: blur(0.2857rem); }
@keyframes flow { to { background-position: -300% 0; } }
@keyframes sweep { from { background-position: 150% 0; } to { background-position: -50% 0; } }
/* steps under the bar */
.sl-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(0.7143rem, 4vw, 2.1429rem); justify-content: center; flex-wrap: wrap; font-size: var(--text-md); color: var(--muted); }
.sl-steps li { display: flex; align-items: center; gap: 0.5rem; transition: color .3s; }
.sl-steps .dot { width: 1.5714rem; height: 1.5714rem; border-radius: 50%; display: grid; place-items: center; font-size: var(--text-xs); font-weight: 700; border: 1.5px solid var(--line-2); background: var(--surface); transition: all .3s; }
.sl-steps li.on { color: var(--ink); font-weight: 600; }
.sl-steps li.on .dot { border-color: var(--g1); color: var(--g1); box-shadow: 0 0 0 0.2857rem color-mix(in srgb, var(--g1) 16%, transparent); animation: beat 1.4s ease-in-out infinite; }
.sl-steps li.done { color: var(--ink-2, var(--ink)); }
.sl-steps li.done .dot { background: var(--g1); border-color: var(--g1); color: #fff; }
@keyframes beat { 50% { box-shadow: 0 0 0 0.5rem color-mix(in srgb, var(--g1) 6%, transparent); } }
/* the stores: grey and waiting, a ring while asked, in colour when they answered */
.sl-stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7143rem; max-width: 40rem; min-height: 3.1429rem; }
.sl-store {
  position: relative; width: 3.1429rem; height: 3.1429rem; border-radius: 0.9286rem; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); transition: filter .5s, opacity .5s, transform .35s;
}
.sl-store img.slogo { width: 1.7143rem; height: 1.7143rem; margin: 0; border-radius: 0.3571rem; }
.sl-store b { font-size: var(--text-lg); color: var(--muted); }
.sl-store.pending { filter: grayscale(1); opacity: .38; }
.sl-store.running { filter: grayscale(.4); opacity: .85; }
.sl-store.running::after {
  content: ''; position: absolute; inset: -0.2143rem; border-radius: 1.0714rem; padding: 0.1429rem;
  background: conic-gradient(from var(--ring), var(--g1), var(--g2), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: ring 1.1s linear infinite; /* the light runs round the border; the border itself stays put */
}
@property --ring { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes ring { to { --ring: 360deg; } }
.sl-store.done { animation: land .45s cubic-bezier(.3, 1.6, .5, 1); }
.sl-store.error { filter: grayscale(1); opacity: .22; }
.sl-store .n {
  position: absolute; top: -0.5rem; inset-inline-end: -0.6429rem; min-width: 1.4286rem; height: 1.2857rem; padding: 0 0.3571rem; border-radius: 71.3571rem; font: 700 0.75rem/1.2857rem inherit;
  font-style: normal; background: var(--g1); color: #fff; box-shadow: 0 0 0 0.1429rem var(--page);
}
@keyframes land { 0% { transform: scale(.82); } 100% { transform: scale(1); } }
.sl-meta { margin: 0; color: var(--muted); font-size: var(--text-md); font-variant-numeric: tabular-nums; min-height: 1.4em; }
.sl-meta b { color: var(--ink); }
@media (max-width: 640px) {
  #searchView { padding-block: 2rem 6.4286rem; }
  .sl-store { width: 2.8571rem; height: 2.8571rem; border-radius: 0.8571rem; }
  .sl-store img.slogo { width: 1.5714rem; height: 1.5714rem; }
  .sl-steps { font-size: var(--text-sm); }
}
@media (prefers-reduced-motion: reduce) { .sl-orb i, .sl-bar i::after { animation: none; } }

/* Favorites page: the saved products and Refresh, nothing to filter */
body.favmode .side, body.favmode #filtersBtn, body.favmode #chips, body.favmode #discussBtn, body.favmode #sort, body.favmode #active { display: none !important; }
body.favmode main.layout { grid-template-columns: minmax(0, 1fr); }
.dlogos .chip { display: inline-flex; align-items: center; gap: 0.4286rem; }
.dlogos .chip .slogo, .dlogos .chip img { width: 1.1429rem; height: 1.1429rem; border-radius: 0.2857rem; }
.home-hero:empty { display: none; }
/* Home: favorites as full product cards in one sideways row */
.hcards { display: grid; grid-auto-flow: column; grid-auto-columns: 20rem; grid-template-rows: repeat(7, auto); column-gap: 0.8571rem; row-gap: 0; }
.hcards > .card { scroll-snap-align: start; }
@media (max-width: 640px) { .hcards { grid-auto-columns: 78%; } }
/* product page: only one store known yet */
.bb-only { margin-top: 0.5714rem; font-size: var(--text-md); color: var(--warn, #e0a64b); }
.bb-acts [data-compare] { min-height: 2.8571rem; display: inline-flex; align-items: center; gap: 0.4286rem; }
/* the fix for the amber "only one store checked" note below: a real button in the note's colour, not a grey link */
.bb-acts button.ghost[data-compare] { border: 1px solid color-mix(in srgb, var(--warn, #e0a64b) 70%, transparent); color: var(--ink); background: color-mix(in srgb, var(--warn, #e0a64b) 10%, transparent); }
.bb-acts button.ghost[data-compare]:hover { background: color-mix(in srgb, var(--warn, #e0a64b) 18%, transparent); }
.bb-acts [data-compare].busy svg.i { animation: spin 1s linear infinite; }
/* product page store list: one store per row, its other listings folded under it */
.srows .sg { border-top: 1px solid var(--line); }
.srows .sg:first-child { border-top: 0; }
.srows .sg > .srow { border-top: 0; }
.sg .sgmore { display: inline-flex; align-items: center; gap: 0.2857rem; margin: 0 0 0.7143rem; margin-inline-start: 2.7143rem; padding: 0; font-size: var(--text-sm); text-decoration: none; }
.sg .sgmore:focus:not(:focus-visible) { outline: none; }
/* a store with more options: its row and the "N more" line read as one block */
.sg.hasmore > .srow { padding-bottom: 0.2857rem; min-height: 0; }
.sg .sgmore::after { content: "▾"; font-size: 0.7143rem; }
.sg .sgmore.open::after { content: "▴"; }
/* other options: one grid for all rows (subgrid), so size, colour, the rest and the price each line up in a column */
.sgsub { display: grid; grid-template-columns: max-content max-content minmax(0, 1fr) auto auto; column-gap: 0.8571rem; margin: -0.2857rem 1rem 0.8571rem 2.7143rem; border: 1px solid var(--line); border-radius: 0.7143rem; overflow: hidden; }
.sgsub a { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; min-width: 0; padding: 0.5rem 0.8571rem; text-decoration: none; color: inherit; font-size: var(--text-md); border-top: 1px solid var(--line); }
.sgsub a:first-child { border-top: 0; }
.sgsub a .tt { display: contents; color: var(--ink-2); }
.sgsub a .oc1 { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sgsub a .oc2 { white-space: nowrap; }
.sgsub a .oc3 { min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sgsub a .num { text-align: end; }
.sgsub a .num small { display: block; font-size: var(--text-xs); font-weight: 400; }
.sgsub a .num { font-weight: 650; }
.sgsub a svg.i { width: 0.9286rem; height: 0.9286rem; color: var(--muted); }
.sgsub a:hover { background: color-mix(in srgb, var(--accent-soft) 30%, transparent); }
/* phones: an option's size, colour and what else it is wrap on one line, nothing squeezed out (the columns don't fit) */
@media (max-width: 640px) {
  .sgsub { grid-template-columns: minmax(0, 1fr) auto auto; margin-inline-start: 0.5714rem; }
  .sgsub a .tt { display: flex; flex-wrap: wrap; align-items: center; gap: 0.1429rem 0.5714rem; }
  .sgsub a .oc3 { white-space: normal; overflow: visible; }
  .sgsub a .oc1:empty, .sgsub a .oc2:empty, .sgsub a .oc3:empty { display: none; }
}
/* a deal's store name opens the deal at that store */
.card.deal .dst { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card.deal .dst a { color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 0.2857rem; min-height: 2.2857rem; }
.card.deal .dst a:hover { color: var(--accent); }
.card.deal .dst a svg.i { width: 0.8571rem; height: 0.8571rem; color: var(--muted); }
/* Home: "Your favorites" + Refresh all */
.hhead .hh { display: flex; align-items: center; gap: 0.8571rem; flex-wrap: wrap; }
.hrefresh { display: inline-flex; align-items: center; gap: 0.4286rem; min-height: 2.2857rem; padding: 0 0.7143rem; font-size: var(--text-sm); }
.hrefresh svg.i { width: 1rem; height: 1rem; }
.hrefresh.spin svg.i { animation: spin 1s linear infinite; }
.bb-acts .bb-check { min-height: 2.8571rem; display: inline-flex; align-items: center; gap: 0.4286rem; }
.bb-acts .bb-check:disabled { opacity: 1; color: var(--accent); }
#actnote svg.i { width: 1rem; height: 1rem; vertical-align: -0.1429rem; color: var(--good); }
/* the old catalogue's filters are gone: Favorites and live search are plain result grids */
.side, #filtersBtn, #chips, #active { display: none !important; }
main.layout { grid-template-columns: minmax(0, 1fr); }
body.urlmode .resbar { display: none; }
/* product page: "Find similar in all stores" progress, the search loader in a card */
/* "Looking for: Console · Games · Controllers": an ambiguous search's meanings, a tap searches that */
.sl-choices { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.4286rem; }
.sl-choices .chip { padding: 0.4286rem 0.9286rem; }
.sl-choices .chip:hover { border-color: var(--accent); color: var(--accent); }
.sl-choices.res { justify-content: flex-start; margin: -0.2857rem 0 1rem; }
.sload.cmp { max-width: none; margin: 0; padding: 1.2857rem 1.1429rem; gap: 0.8571rem; border: 1px solid var(--line); border-radius: 1.2857rem; background: var(--surface); }
.sload.cmp .sl-head { font-size: var(--text-lg); }
.sload.cmp .sl-bar { height: 0.5714rem; }
.sload.cmp .sl-store { width: 2.5714rem; height: 2.5714rem; border-radius: 0.7857rem; }
.sload.cmp .sl-store img.slogo { width: 1.4286rem; height: 1.4286rem; }
.bb-only.done { color: var(--good); display: flex; align-items: center; gap: 0.4286rem; } .bb-only.done svg.i { width: 1.0714rem; height: 1.0714rem; }
/* product page: a second-hand / private seller's offer in the store list (Dubizzle): light orange */
.sg.priv { background: color-mix(in srgb, #f0973a 9%, var(--surface)); }
.sg.priv .sgmore { color: #c46a12; }
.srow.priv .sp { color: #c46a12; }
.srow.priv .sn .small { color: #c46a12; }
/* a colour named in a listing: a dot in that colour, the name a touch stronger */
.cw { color: var(--ink); font-weight: 550; white-space: nowrap; }
.sw { display: inline-block; width: 0.8em; height: 0.8em; border-radius: 50%; margin-inline-end: 0.3571rem; vertical-align: -0.05em; background: var(--c); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 18%, transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .srow.priv .sp, :root:not([data-theme="light"]) .srow.priv .sn .small { color: #f3a65a; } }
:root[data-theme="dark"] .srow.priv .sp, :root[data-theme="dark"] .srow.priv .sn .small { color: #f3a65a; }

/* a mixed search's AI categories: a list on the left of the results; on phones a scrolling row above them */
main.layout.withcats { grid-template-columns: 15rem minmax(0, 1fr); }
.cats { position: sticky; top: calc(var(--head-h, 4.5714rem) + 0.8571rem); display: grid; gap: 0.1429rem; }
.cats h3 { display: flex; align-items: center; gap: 0.4286rem; margin: 0.2857rem 0.7143rem 0.5714rem; font-size: var(--text-md); color: var(--muted); font-weight: 600; }
.cats h3 svg.i { width: 1rem; height: 1rem; color: var(--used); }
.cats .cat { display: flex; align-items: center; justify-content: space-between; gap: 0.5714rem; padding: 0.5714rem 0.7143rem; border: 0; border-radius: 0.6429rem; background: transparent; color: var(--ink-2); font-size: var(--text-base); text-align: start; }
.cats .cat:hover { background: var(--surface-2); color: var(--ink); }
.cats .cat.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.cats .cat i { font-style: normal; font-size: var(--text-sm); color: var(--muted); }
@media (max-width: 900px) {
  main.layout.withcats { grid-template-columns: minmax(0, 1fr); }
  .cats { position: static; display: flex; gap: 0.4286rem; overflow-x: auto; scrollbar-width: none; margin: 0 -1.1429rem; padding: 0 1.1429rem 0.2857rem; }
  .cats::-webkit-scrollbar { display: none; }
  .cats h3 { display: none; }
  .cats .cat { flex: none; border: 1px solid var(--line-2); border-radius: 71.3571rem; padding: 0.4286rem 0.8571rem; background: var(--surface); }
}

/* ---- right-to-left (Arabic, js/i18n.js): logical properties above mirror most of it; these are the rest */
[dir="rtl"] body { font-family: "Noto Sans Arabic", "Segoe UI", Tahoma, "Geeza Pro", Inter, system-ui, sans-serif; }
@media (max-width: 900px) { [dir="rtl"] .side { inset: 0 0 0 auto; transform: translateX(105%); } [dir="rtl"] .side.open { transform: none; } }
@media (max-width: 900px) { [dir="rtl"] .chatwrap:not(.histopen) .chat-hist { transform: translateX(105%); } [dir="rtl"] .chat-hist { box-shadow: -1.7143rem 0 4.5714rem rgba(0, 0, 0, .3); } }
[dir="rtl"] .switch input:checked + i::after { transform: translateX(-1rem); }
[dir="rtl"] select { background-position: left 0.5714rem center; }
/* English titles inside the Arabic page: laid out left to right (the ellipsis at their end), still aligned right */
[dir="rtl"] .card a.t, [dir="rtl"] .pd-head h1, [dir="rtl"] .tt, [dir="rtl"] .sn b, [dir="rtl"] .htile .ht, [dir="rtl"] .bubble { unicode-bidi: plaintext; text-align: right; }
[dir="rtl"] .disc { direction: ltr; unicode-bidi: isolate; }
/* arrows point the reading way */
[dir="rtl"] .back svg.i, [dir="rtl"] [data-back] svg.i, [dir="rtl"] svg.i.chev { transform: scaleX(-1); }
/* prices, links, codes and charts read left to right inside the Arabic page */
[dir="rtl"] .num, [dir="rtl"] .chart, [dir="rtl"] svg.chart, [dir="rtl"] input[type="url"], [dir="rtl"] code { direction: ltr; unicode-bidi: isolate; }
html.i18n-wait body { visibility: hidden; }
.tbtn.lang { font-weight: 700; font-size: var(--text-base); min-width: 2.5714rem; }

/* ---- the AI page on a phone, as the AI apps (Gemini, Claude) do it: a slim bar (history · Ask AI · new chat) instead of
   the site header, a greeting in the middle, the suggestions in one sideways row, the box pinned at the bottom */
.hbtn .i + .i, .newchat .i + .i { display: none; } /* desktop: the history clock and the plus */
.chat-empty .spark { display: none; }
@media (max-width: 640px) {
  body.chatmode { --head-h: 0px; }
  body.chatmode .top { display: none; }
  body.chatmode #chatView { padding-top: 0; }
  body.chatmode .chat-head { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 3rem 1fr 3rem; align-items: center;
    padding: calc(0.4286rem + env(safe-area-inset-top, 0px)) 0 0.4286rem; background: var(--page); }
  body.chatmode .chat-title { justify-content: center; visibility: visible !important; font-size: var(--text-lg); }
  body.chatmode .chat-title svg.i { width: 1.1429rem; height: 1.1429rem; }
  body.chatmode .chat-title b { display: inline; font-weight: 600; }
  body.chatmode .hbtn, body.chatmode .newchat { width: 3rem; height: 3rem; padding: 0; border: 0; background: none; display: grid; place-items: center; color: var(--ink); }
  body.chatmode .hbtn .i, body.chatmode .newchat .i { width: 1.5rem; height: 1.5rem; }
  body.chatmode .hbtn .i:first-child, body.chatmode .newchat .i:first-child, body.chatmode .newchat span { display: none; }
  body.chatmode .hbtn .i + .i, body.chatmode .newchat .i + .i { display: block; }

  /* a new chat: greeting in the middle, suggestions and the box at the bottom */
  body.chatmode .chat.fresh { min-height: calc(100dvh - 4.5714rem - env(safe-area-inset-bottom, 0px)); }
  .chat.fresh .chat-log { order: 1; flex: 1 0 auto; margin: 0; display: grid; place-items: center; padding: 0 0 1rem; }
  .chat.fresh .chat-start { order: 2; margin: 0; padding: 0; width: 100%; }
  .chat.fresh .composer { order: 3; position: sticky; bottom: calc(4rem + env(safe-area-inset-bottom)); width: 100%; margin: 0; padding: 0.5714rem 0 0.7143rem; background: var(--page); }
  .chat-empty { padding: 0; }
  .chat-empty .spark { display: block; width: 2.5714rem; height: 2.5714rem; margin: 0 auto 0.8571rem; color: var(--used); }
  .chat-empty .spark svg.i { width: 100%; height: 100%; stroke-width: 1.6; }
  .chat-empty h2 { font-size: 1.8571rem; font-weight: 500; letter-spacing: -0.02em; text-wrap: balance; }
  .chat-start .suggest { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin: 0 -1.1429rem; padding: 0 1.1429rem 0.2857rem; gap: 0.5rem; }
  .chat-start .suggest::-webkit-scrollbar { display: none; }
  .chat-start .suggest .chip { flex: none; white-space: nowrap; font-size: var(--text-sm); padding: 0.5714rem 0.8571rem; border-radius: 1.1429rem; }

  /* the box: one large pill */
  .composer .cbox { border-radius: 1.7857rem; padding: 0.3571rem; background: var(--surface); box-shadow: 0 0.2857rem 1.4286rem rgba(0, 0, 0, 0.08); }
  .composer .attach { border-radius: 50%; }
  .composer .send { border-radius: 50%; }
  .composer textarea { padding: 0.7143rem 0.2857rem; }
  .chatlegal { font-size: 0.6786rem; line-height: 1.35; margin-top: 0.3571rem; }
  .chatlegal .long { display: none; }
}

/* product page while it loads (js/detail.js): grey blocks in the page's shape, a gentle shimmer */
.pskel { display: grid; gap: 0.8571rem; padding-block: 0.5714rem; }
.sk-side { display: grid; gap: 0.8571rem; align-content: start; }
@media (min-width: 900px) { .pskel { grid-template-columns: minmax(16rem, 27rem) 1fr; gap: 2.2857rem; } .sk-pic { aspect-ratio: 1; } }
.sk { border-radius: 0.8571rem; background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: sk 1.4s ease-in-out infinite; }
.sk-pic { aspect-ratio: 4 / 3; max-height: 22rem; width: 100%; }
.sk-line { height: 1.2857rem; } .sk-line.w80 { width: 80%; } .sk-line.w50 { width: 50%; }
.sk-card { height: 17.8571rem; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
/* a product or a deals aisle as the server sends it (Api/Boot.Seo.cs), until the app draws it */
.ssr img.sk-pic { object-fit: contain; }
.ssr h1 { font-size: 1.4286rem; line-height: 1.3; margin: 0; }
.ssr > h1 { margin-block: 1.1429rem 0.5714rem; }
.ssr-offers { margin: 0; padding-inline-start: 1.2857rem; line-height: 1.8; }
/* a list of products (an aisle, a sale, a price page): one tidy line each, in columns, until the app's cards replace it */
.ssr-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); gap: 0.4286rem 1.7143rem; font-size: var(--text-sm); line-height: 1.6; color: var(--muted); }
.ssr-list li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ssr-list a { color: var(--ink); text-decoration: none; }
.ssr-list b { color: var(--ink); font-weight: 650; }
/* a /price/ page's heading and its answer in one line, above the results */
.topic { padding-block: 0.8571rem 0; }
.topic h1 { font-size: 1.4286rem; line-height: 1.3; margin: 0 0 0.2857rem; }
.topic-sum { margin: 0; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.2857rem 0.5714rem; align-items: center; }
.topic-sum b { color: var(--ink); }
.topic .ssr-list { margin-top: 0.8571rem; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* dark: product photos are the brightest areas on the page (white backgrounds): multiplied onto their dimmer box, the
   photo's white becomes the box's grey (no box in a box) and the product keeps its colours */
:root[data-theme="dark"] :is(img.pic, img.pd-img, img.mini, .tpic img) { mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(img.pic, img.pd-img, img.mini, .tpic img) { mix-blend-mode: multiply; } }

/* Home: room between its parts (the sale, popular searches, the stores line, aisles, deals) */
#homeView > :not(:empty, .rowfold) { margin-bottom: 1.4286rem; }
#homeView .hpop { padding-bottom: 0; }
#homeView #hCats:not(:empty) { margin-bottom: 2.2857rem; }
@media (max-width: 640px) { #homeView > :not(:empty, .rowfold) { margin-bottom: 1.1429rem; } #homeView #hCats:not(:empty) { margin-bottom: 1.7143rem; } }
/* a sideways row opened out by its "Show all" (util.js foldRow) */
button.rowfold { display: flex; width: fit-content; margin: -0.2857rem 0 0.7143rem; margin-inline-start: auto; font-weight: 600; }
.ctiles + button.rowfold { margin-top: 0.5714rem; }
.unfold { flex-wrap: wrap !important; overflow-x: visible !important; }
.ctiles.unfold { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-columns: auto; }
/* a store's promo code for our shoppers (util.js coupon): a dashed ticket; a tap copies it */
.coupon { display: inline-flex; align-items: center; padding: 0.0714rem 0.4286rem; margin-inline-start: 0.3571rem; border: 1px dashed var(--accent);
  border-radius: 0.3571rem; color: var(--accent); font-size: var(--text-xs); font-weight: 500; line-height: 1.6; cursor: copy; flex-wrap: wrap; max-width: 100%; gap: 0 0.2857rem; }
.coupon b { white-space: nowrap; }
.coupon b { font: 700 1em/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.coupon svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.coupon:hover, .coupon:focus-visible { background: color-mix(in srgb, var(--accent) 10%, transparent); outline: none; }
.cpline { margin-top: 0.2857rem; }
.cpline .coupon { margin-inline-start: 0; }
/* Home: the line under the heading (a search engine quotes it) */
.home-hero .hsub { margin: -0.2857rem 0 0.5714rem; color: var(--muted); font-size: var(--text-sm); }

/* room kept for what the app draws over the first paint: the footer doesn't sit mid-screen, then jump (layout shift) */
#cards:empty { min-height: 100vh; }
#homeView:not([hidden]) { min-height: 100vh; }
/* a price page's neighbours ("PS5 Pro price", "PS5 Slim price"): a row of small links */
.ssr-more { margin-top: 0.8571rem; }
.ssr-more h2 { font-size: var(--text-sm); font-weight: 600; color: var(--muted); margin: 0 0 0.4286rem; }
.ssr-more ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.4286rem; overflow-x: auto; scrollbar-width: none; }
.ssr-more ul::-webkit-scrollbar { display: none; }
.ssr-more a { display: inline-block; white-space: nowrap; padding: 0.4286rem 0.8571rem; border: 1px solid var(--line-2); border-radius: 999px; font-size: var(--text-sm); color: var(--ink); text-decoration: none; min-height: 2rem; }
.ssr-more a:hover { border-color: var(--ink); }
/* the aisle tiles' room while they load (js/home.js aisles): the deals under them don't jump down */
#homeView #hCats.sk-cats:empty { display: block; min-height: 13.4286rem; }
@media (max-width: 900px) { #homeView #hCats.sk-cats:empty { min-height: 15.4286rem; } }

/* a search's tags within its aisle (js/app.js drawTags): a wrapping row; one scrolling line on a phone */
.tagrow { display: flex; flex-wrap: wrap; gap: 0.4286rem; margin: 0 0 0.8571rem; }
.tagrow .chip { text-transform: capitalize; }
.tagrow .chip i { font-style: normal; color: var(--muted); font-size: var(--text-xs); margin-inline-start: 0.1429rem; }
.tagrow .chip.on i { color: inherit; opacity: 0.7; }
@media (max-width: 640px) {
  .tagrow { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -1.1429rem; padding-inline: 1.1429rem; }
  .tagrow::-webkit-scrollbar { display: none; }
  .tagrow .chip { flex: none; }
}

/* more results arrived while you were reading further down (js/app.js newPill): a tap takes you up to them; at the
   bottom (above the phone's tab bar), out of the way of what you're reading */
.newpill { position: fixed; bottom: calc(1.1429rem + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 30;
  border: 0; border-radius: 71.3571rem; padding: 0.5rem 1.1429rem; background: var(--accent); color: #fff; font-weight: 600;
  font-size: var(--text-md); box-shadow: 0 0.2857rem 1.1429rem rgb(0 0 0 / 0.18); }

/* while the stores answer: one line of small text and a hairline under the search box, no box, gone when they have
   (js/app.js drawStrip) */
#live.strip { max-width: calc(max(1680px, 70vw) - 3.4286rem); width: calc(100% - 3.4286rem); margin: 0.4286rem auto 0; padding: 0;
  background: none; border: 0; border-radius: 0; box-shadow: none; }
#live .strip-head { display: flex; flex-wrap: nowrap; gap: 0.5714rem; white-space: nowrap; font-size: var(--text-sm); color: var(--muted); }
#live .strip-head .lead { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 500; gap: 0.4286rem; }
#live .strip-head .count { margin-inline-start: auto; flex: none; }
#live .spinner { width: 0.7143rem; height: 0.7143rem; }
#live .prog { height: 0.1429rem; margin: 0.2857rem 0 0; border-radius: 0; }
@media (max-width: 640px) { #live.strip { width: calc(100% - 2.2857rem); } }

/* placeholder cards until a search's first results are in (index.html #cards, js/app.js GHOSTS); the footer waits too */
.card.ghost { pointer-events: none; display: grid; gap: 0.7143rem; padding: 0.5714rem 0.5714rem 1.1429rem; min-height: 22rem; align-content: start; }
.card.ghost b { display: block; aspect-ratio: 1 / 0.82; border-radius: var(--r-md, 0.7143rem); }
.card.ghost i { display: block; height: 0.8571rem; margin: 0 0.4286rem; border-radius: 0.2857rem; }
.card.ghost i.s { width: 45%; height: 1.4286rem; margin-top: 0.5714rem; }
.card.ghost b, .card.ghost i { background: linear-gradient(90deg, var(--surface-2) 25%, color-mix(in srgb, var(--surface-2) 55%, var(--surface)) 50%, var(--surface-2) 75%);
  background-size: 300% 100%; animation: ghost 1.4s ease-in-out infinite; }
@keyframes ghost { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .card.ghost b, .card.ghost i { animation: none; } }
body:has(#cards .ghost) #siteFoot { display: none; }
body:has(#cards .ghost) #count { visibility: hidden; } /* (no "0 products" while the first results load) */
/* the category list's "Sorting 45…": products still being filed (js/app.js drawCats) */
.cats .cat.wait { color: var(--muted); font-size: var(--text-sm); justify-content: flex-start; gap: 0.4286rem; cursor: default; }
.cats .cat.wait .spinner { width: 0.7143rem; height: 0.7143rem; flex: none; }

/* the sort as one small button with its box (index.html #sortF): phones only; a wide screen keeps the list (#sort) */
.sortf { display: none; }
.sortf > summary { gap: 0.3571rem; }
.sortf > summary::after { display: none; }
.sortf > summary .lbl { max-width: 8.5rem; overflow: hidden; text-overflow: ellipsis; }
.sortf .pop { width: 15rem; padding: 0.4286rem; gap: 0.1429rem; }
.sortf .srow { display: block; width: 100%; text-align: start; border: 0; background: none; padding: 0.4286rem 0.7143rem; min-height: 0; line-height: 1.35; border-radius: 0.5rem; font-size: var(--text-md); font-weight: 500; color: var(--ink); }
.sortf .srow:hover { background: var(--surface-2); }
.sortf .srow.on { background: var(--accent-soft); color: var(--accent-2); font-weight: 600; }
@media (max-width: 640px) {
  #sort { display: none; }
  .sortf { display: block; }
  .resbar { gap: 0.4286rem; margin-bottom: 0.5714rem; }
  .resbar .pricef > summary { height: 2.1429rem; padding: 0 0.7143rem; font-size: var(--text-sm); border-radius: 999px; }
  #count { font-size: var(--text-sm); margin-inline-start: auto; }
  .sortf .pop { inset-inline: auto 1.1429rem; width: 15rem; }
  .resbar #sortF { order: 2; }
  main.layout { row-gap: 0.5714rem; } /* (stacked on a phone: the 2rem between columns was an empty band under the chips) */
}

.xpand { display: none; } /* (wide screens: the aisles are a list and the tags wrap) */
/* phones: one bar above the results (js/app.js drawCats): sort and filter icons, then the aisles; an aisle picked,
   "‹ Rice ✕" and its tags; under it only the count. A wide screen keeps the list on the left and the bar above. */
.cats .m-only { display: none; }
.cats.icons-only { display: none; }
@media (max-width: 640px) {
  .cats.icons-only { display: flex; }
  .cats .m-only { display: inline-flex; }
  .cats .mic { flex: none; align-items: center; justify-content: center; width: 2.4286rem; height: 2.4286rem; padding: 0; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); position: relative; }
  .cats .mic.on { border-color: var(--accent); color: var(--accent-2); background: var(--accent-soft); }
  .cats .mic b { position: absolute; top: -0.2143rem; inset-inline-end: -0.2143rem; min-width: 1.0714rem; height: 1.0714rem; padding: 0 0.2143rem; border-radius: 999px; background: var(--accent); color: #fff; font-size: 0.6429rem; display: grid; place-items: center; }
  .cats .cat.picked::after { content: "✕"; font-size: 0.7143rem; opacity: 0.7; margin-inline-start: 0.1429rem; }
  /* the ⌄ at a row's end (js/app.js fits): stays at the right edge while the row scrolls; opened, the row wraps */
  .xpand { display: inline-flex; position: sticky; inset-inline-end: 0; flex: none; align-items: center; justify-content: center; width: 2.2857rem; height: 2.2857rem; padding: 0; margin-inline-start: auto; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); box-shadow: -0.8571rem 0 0.8571rem 0.2857rem var(--page), 1.4286rem 0 0 0.5714rem var(--page); }
  .xpand[hidden] { display: none; }
  .cats.open, .tagrow.open { flex-wrap: wrap; overflow: visible; }
  .cats.open .xpand, .tagrow.open .xpand { position: static; box-shadow: none; }
  .cats.open .xpand svg, .tagrow.open .xpand svg { transform: rotate(180deg); }
  .tagrow .chip { border-style: dashed; }
  /* the tags right under the aisles, the count after them */
  .results { display: flex; flex-direction: column; }
  .results > #tags { order: -1; margin-bottom: 0.2857rem; }
  .tagrow .chip.on { border-style: solid; }
  /* the old bar: only the count, small; the sort box opens from the icon */
  .resbar > :not(#count):not(#sortF):not(#priceF):not(#storeRow) { display: none !important; }
  .resbar #sortF > summary, .resbar #priceF > summary { display: none; }
  .resbar #priceF { display: block !important; } /* (its box opens from the AED button) */
  .resbar #priceF .pop { position: fixed; top: calc(var(--head-h, 4.5714rem) + 3.7143rem); inset-inline: 1.1429rem; width: auto; }
  .cats .mic.aed { width: auto; padding: 0 0.7143rem; font-size: var(--text-sm); font-weight: 650; letter-spacing: 0.02em; }
  .cats .mic.aed b { min-width: 0.5714rem; height: 0.5714rem; padding: 0; top: 0; inset-inline-end: 0; }
  .resbar { margin: 0.2857rem 0 0.4286rem; }
  .resbar #count { font-size: var(--text-xs); margin-inline-start: 0; order: 0; }
  .sortf .pop { position: fixed; top: calc(var(--head-h, 4.5714rem) + 3.7143rem); inset-inline: 1.1429rem auto; width: 15rem; }
}

/* a misspelt search: "· also persimmon · only “persimom”" after the count */
#count .spell { color: var(--muted); font-weight: 400; }
#count .spell b { color: var(--ink); font-weight: 600; }
#count .spell a { color: var(--accent, inherit); text-decoration: underline; cursor: pointer; }
@media (max-width: 720px) { #count { white-space: normal; } }
/* long press on a home store logo */
.hlogos > span { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.hlogos img { -webkit-user-drag: none; pointer-events: none; }
.logozoom { position: fixed; z-index: 1000; display: flex; flex-direction: column; align-items: center; gap: 0.5714rem; padding: 1rem 1.1429rem 0.8571rem; border-radius: 1.1429rem; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 0.5714rem 2rem rgb(0 0 0 / 0.25); pointer-events: none; animation: logozoom .12s ease-out; }
.logozoom .slogo { width: 4.5rem; height: 4.5rem; max-width: none; margin: 0; border-radius: 1.1429rem; }
.logozoom b { font-size: var(--text-sm); white-space: nowrap; }
@keyframes logozoom { from { transform: scale(.6); opacity: 0; } }
.deal .spread { margin-top: 0.4286rem; }
.chip.bestchip { gap: 0.3571rem; }
.chip.bestchip .i { width: 1rem; height: 1rem; }
/* the stores in the results (js/app.js drawStoreRow): logos with counts, one row that scrolls sideways */
.storerow { display: flex; gap: 0.4286rem; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 0 1 auto; padding: 0.1429rem 0; }
.storerow::-webkit-scrollbar { display: none; }
.storerow .schip { flex: none; display: inline-flex; align-items: center; gap: 0.3571rem; height: 2.2857rem; padding: 0 0.6429rem; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: var(--text-sm); cursor: pointer; }
.storerow .schip:hover { border-color: var(--ink); }
.storerow .schip .slogo { width: 1.2857rem; height: 1.2857rem; margin: 0; border-radius: 0.2857rem; }
.storerow .schip i { font-style: normal; color: var(--muted); font-size: 0.8571rem; }
.storerow .schip.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 600; }
.storerow .schip.on i, .storerow .schip.on b { color: var(--accent); font-weight: 400; }
/* phones: a row of its own under the bar */
@media (max-width: 720px) { .resbar .storerow { order: -1; flex: 1 0 100%; margin: 0 -1.1429rem; padding: 0.1429rem 1.1429rem; } .resbar .storerow[hidden] { display: none !important; } }

/* the stores' offers leaflets (js/home.js leaflets): covers in a row; a tap opens the pages over the page */
.leaflets { display: flex; gap: 0.8571rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 0.2857rem; }
.leaflets::-webkit-scrollbar { display: none; }
.leaflet { flex: none; width: 9.2857rem; display: grid; gap: 0.2857rem; padding: 0; border: 0; background: none; text-align: start; cursor: pointer; color: var(--text); }
.leaflet img { width: 100%; aspect-ratio: 0.707; object-fit: cover; object-position: top; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.leaflet .lf-store { display: flex; align-items: center; gap: 0.3571rem; font-size: var(--text-sm); }
.leaflet .lf-store .slogo { width: 1.1429rem; height: 1.1429rem; margin: 0; }
.leaflet small { color: var(--muted); font-size: var(--text-xs); }
.lfview { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: #1b1b1d; color: #fff; }
.lfbar { flex: none; display: flex; align-items: center; gap: 0.5714rem; padding: 0.5714rem 0.8571rem; padding-top: calc(0.5714rem + env(safe-area-inset-top)); background: #111; }
.lfbar .lftitle { color: #bbb; font-size: var(--text-sm); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lfbar .lfcount { font-size: var(--text-sm); font-variant-numeric: tabular-nums; color: #ddd; white-space: nowrap; }
.lfbar .lfx { border: 0; background: #2c2c30; color: #fff; width: 2.2857rem; height: 2.2857rem; border-radius: 50%; font-size: 1rem; cursor: pointer; }
/* the pages: one spread per screen width, snapping (a swipe turns one page) */
.lftrack { flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; outline: none; }
.lftrack::-webkit-scrollbar { display: none; }
.lfspread { flex: 0 0 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; display: flex; align-items: center; justify-content: center; padding: 0.5714rem 0.5714rem calc(0.5714rem + env(safe-area-inset-bottom)); }
.lfspread img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; box-shadow: 0 0.5714rem 2rem rgb(0 0 0 / 0.5); user-select: none; -webkit-user-select: none; }
/* two pages side by side, a book's seam between them */
.lfspread.two img { max-width: 50%; }
.lfspread.two img:first-child { border-radius: 0.2857rem 0 0 0.2857rem; box-shadow: inset -1.4286rem 0 1.4286rem -1.1429rem rgb(0 0 0 / 0.35), 0 0.5714rem 2rem rgb(0 0 0 / 0.5); }
.lfspread.two img:last-child { border-radius: 0 0.2857rem 0.2857rem 0; }
[dir=rtl] .lfspread.two { flex-direction: row-reverse; }
/* zoomed in (a double tap): the spread twice as big, panned by dragging; turning pages waits until zoomed out */
.lftrack.zoomed { overflow-x: hidden; }
.lfspread.zoom { overflow: auto; display: block; text-align: center; padding: 0; }
.lfspread.zoom img { max-width: none; max-height: none; height: 200%; width: auto; }
.lfspread.two.zoom img { max-width: none; }
.lfturn { position: absolute; top: 50%; transform: translateY(-50%); width: 2.8571rem; height: 4.2857rem; border: 0; border-radius: 0.5714rem; background: rgb(0 0 0 / 0.45);
  color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; z-index: 2; }
.lfturn.prev { inset-inline-start: 0.5714rem; } .lfturn.next { inset-inline-end: 0.5714rem; }
[dir=rtl] .lfturn { transform: translateY(-50%) scaleX(-1); }
.lfturn:disabled { opacity: 0; pointer-events: none; }
@media (hover: none) { .lfturn { background: rgb(0 0 0 / 0.25); width: 2.2857rem; height: 3.4286rem; font-size: 1.5rem; } }
body.lfopen { overflow: hidden; }

/* deals search: "no exact match, closest matches" (js/deals.js) */
.dnote { margin: 4px 2px 12px; color: var(--muted, #6b6b6b); font-size: 14px; }
