/*
 * wb-landing-restyle-a.css — T483 landing round: restyle "A" applied to the
 * REAL front door ("/" = "/v2/" = "/v2/market", one shared renderer since
 * T389 deploy 1), shipped behind the SAME flag that gates the Buddy chat and
 * bottle-page restyles (WB_BUDDY_RESTYLE_A_USERS allow-list, the
 * wb_restyle_a cookie, or ?restyle=a — auth.resolve_restyle_a, shared with
 * /v2/buddy and /v2/bottle/{canonical_name}). Robert approved building this
 * in (asks #1910 "yes", #1911 "honour 44px") after reviewing the proof
 * render in sprint-state/ui-rebuild/landing-round/.
 *
 * APPEARANCE ONLY (Robert, 2026-08-27, ask #1902). Every selector below
 * already exists in the shipped DOM — nothing here can add, remove, reorder
 * or reword an element, and no markup/JS/wording/behaviour on the landing
 * grid changes because of this file.
 *
 * SOURCE (byte-identical body below): the proof sheet that earned asks
 * #1910/#1911's approval, sprint-state/ui-rebuild/landing-round/override-
 * landing-a.css (injected over the real page via page.add_style_tag() for
 * that render). This file is the same rules, now linked for real, ONLY when
 * the flag is on AND the page being rendered is a landing/market page (not
 * /v2/buddy, which keeps its own the former Buddy stylesheet) — no product CSS,
 * template or Python selector is edited.
 */

:root {
  --r2-paper:   #FBF9F6;
  --r2-surface: #FBF9F6;
  --r2-sunk:    var(--sk-q-sunk);
  --r2-ink:     var(--sk-q-dark);
  --r2-ink-2:   #5C5651;
  --r2-ink-3:   #8A837C;
  --r2-hair:    var(--sk-q-hair-2);
  --r2-hair-2:  #CFC9C0;
  --r2-accent:  var(--sk-deep-accent);
  --r2-accent-ink: #FFFFFF;
  --r2-focus:   var(--sk-q-dark);

  --r2-display: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r2-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
             "Liberation Sans", Helvetica, Arial, sans-serif;
  --r2-ease: cubic-bezier(.2,.6,.3,1);
  --r2-dur-fast: 120ms;   /* state changes; 200ms is for things that move */

  /* The image plate. A bottle photo is CONTENT, and the catalogue's display
     shots are cut out on WHITE (not on transparency) — so the plate stays a
     white plate in dark mode rather than flipping with the page. This is the
     one place the "lightness flips" rule is deliberately not applied, and it
     is a token, not a literal, so the exception lives in exactly one place.
     Measured, not assumed: at #F1EDE7 the white-backed shots (George T.
     Stagg, Four Roses, the Jack Daniel's box art) painted a visible white
     rectangle INSIDE the plate — see NOTES.md §4. */
  --r2-plate: #FFFFFF;
}

@media (prefers-color-scheme: dark) {
  :root {
    --r2-paper:   #14120F;
    --r2-surface: #1C1916;
    --r2-sunk:    #211D19;
    --r2-ink:     #F3EFE9;
    --r2-ink-2:   #B4ADA4;
    --r2-ink-3:   #8B847B;
    --r2-hair:    #2E2A25;
    --r2-hair-2:  #423C35;
    --r2-accent:  #E5A25C;
    --r2-accent-ink: #1A1409;
    --r2-focus:   #F3EFE9;
  }
}

/* ── The page's own token blocks, re-pointed ───────────────────────────────
   market.css defines ~22 `--*` custom properties in :root and wb-quiet-tokens
   re-points them again; every rule in both sheets reads them. Re-pointing the
   properties is a pure value swap — no selector in a product sheet is
   rewritten — and it is what gives this page a dark mode it has never had
   (the live front door is white at night, in both schemes). */
html:not(#_),
html:not(#_) body,
html:not(#_) .wb-header {
  --paper: var(--r2-paper);
  --paper-soft: var(--r2-paper);
  --bg: var(--r2-paper);
  --bg-tint: var(--r2-paper);
  --card: var(--r2-surface);
  --soft: var(--r2-sunk);
  --ink: var(--r2-ink);
  --ink-soft: var(--r2-ink);
  --muted: var(--r2-ink-2);
  --ink-2: var(--r2-ink-2);
  --line: var(--r2-hair);
  --line-soft: var(--r2-hair);
  --accent: var(--r2-ink);
  --accent-2: var(--r2-ink);
  --accent-bg: var(--r2-sunk);
  --accent-line: var(--r2-hair);
  --gold: var(--r2-accent);
  --gold-soft: var(--r2-accent);
  --brass: var(--r2-accent);
  --brass-deep: var(--r2-accent);
  --burnt: var(--r2-accent);
  --green: var(--r2-accent);
  --green-bg: var(--r2-paper);
  --green-line: var(--r2-hair);
  --red: var(--r2-ink);
  --red-bg: var(--r2-paper);
  --red-line: var(--r2-hair);
  --chip-bg: var(--r2-sunk);
  --focus: var(--r2-focus);
  --wb-quiet-accent: var(--r2-accent);
  --sans: var(--r2-body);
  --round: var(--r2-body);
  --serif: var(--r2-body);
}

/* ── Shell ─────────────────────────────────────────────────────────────────
   `html` too, not just `body`: the page overscrolls past the body on iOS and
   the cream `--bg` of market.css shows through as a band above the header. */
html:not(#_),
html:not(#_) body,
html:not(#_) main.wrap,
html:not(#_) .wrap {
  background: var(--r2-paper) !important;
  color: var(--r2-ink) !important;
  font-family: var(--r2-body) !important;
}
html:not(#_) body {
  font-size: 1rem !important;               /* the 16px floor, on the page */
  line-height: 1.5 !important;
}
/* No shadows. Ever. Separation is a hairline. */
html:not(#_) body *,
html:not(#_) body *::before,
html:not(#_) body *::after {
  box-shadow: none !important;
  text-shadow: none !important;
}
html:not(#_) .wrap,
html:not(#_) main.wrap {
  padding-left: 16px !important;
  padding-right: 16px !important;
}
html:not(#_) main.wrap { padding-bottom: 48px !important; }

/* Focus: 2px ring in ink (paper in dark), 2px offset — one rule, everywhere. */
html:not(#_) a:focus-visible,
html:not(#_) button:focus-visible,
html:not(#_) input:focus-visible,
html:not(#_) select:focus-visible,
html:not(#_) summary:focus-visible,
html:not(#_) [tabindex]:focus-visible {
  outline: 2px solid var(--r2-focus) !important;
  outline-offset: 2px !important;
}

/* ══ Header ════════════════════════════════════════════════════════════════
   Paper, one hairline, and three real 44px targets. Same treatment as the
   bottle round, applied to the site header this page actually renders. */
html:not(#_) .wb-header {
  background: var(--r2-paper) !important;
  border-bottom: 1px solid var(--r2-hair) !important;
}
/* 12px of top air, not 6: the "ADMIN" plan chip is absolutely pinned 7px
   ABOVE the Menu button on phones (wb-header.css:255), and once that button
   is a real 44px the chip clipped off the top edge of the header. */
html:not(#_) .wb-header-in {
  padding: 12px 16px 8px !important;
  gap: 8px !important;
}
html:not(#_) .wb-brand {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 44px !important;
  gap: 8px !important;
  color: var(--r2-ink) !important;
  text-decoration: none !important;
}
/* wb-quiet-tokens pins the wordmark at `#111111 !important` from
   `.wb-word,.wb-word .wb-w,.wb-nav a,.wb-brand` — invisible on dark paper, so
   every leg of that selector is answered here. This is the ONE serif role on
   the screen (the rulebook's "at most three places", used once). */
html:not(#_) .wb-word,
html:not(#_) .wb-word .wb-w,
html:not(#_) .wb-word .wb-b,
html:not(#_) .wb-brand {
  font-family: var(--r2-display) !important;
  font-size: 1.1875rem !important;          /* 19px — the wordmark role */
  font-weight: 700 !important;
  letter-spacing: -0.011em !important;
  color: var(--r2-ink) !important;
}
/* The "buddy" half of the wordmark and the "ai" superscript are a brass
   GRADIENT clipped to the text (`-webkit-text-fill-color:transparent`), so
   `color` alone cannot reach them — they read as a second accent that means
   nothing, and they vanish against dark paper. Flattened to one ink word. */
html:not(#_) .wb-word .wb-b,
html:not(#_) .wb-word .wb-ai {
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  color: var(--r2-ink) !important;
  -webkit-text-fill-color: var(--r2-ink) !important;
  filter: none !important;
}
html:not(#_) .wb-word .wb-ai { font-size: 0.8125rem !important; }
html:not(#_) .wb-mark,
html:not(#_) .wb-brand img.wb-mark {
  border-radius: 6px !important;
  border: 0 !important;
}
html:not(#_) .wb-header-right { gap: 4px !important; }
/* Icons are strokes in ink — never a filled disc, never coloured, never in a
   button beside a word. */
html:not(#_) .wb-bell-btn {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
  border-radius: 6px !important;
  color: var(--r2-ink) !important;
}
html:not(#_) .wb-bell-btn svg {
  width: 22px !important;
  height: 22px !important;
  stroke-width: 1.5 !important;
  color: var(--r2-ink) !important;
}
html:not(#_) .wb-bell-badge,
html:not(#_) .wb-bell-dot {
  background: var(--r2-accent) !important;
  color: var(--r2-accent-ink) !important;
  border: 0 !important;
}
html:not(#_) .wb-bell-pop,
html:not(#_) .wb-menu-pop {
  background: var(--r2-surface) !important;
  border: 1px solid var(--r2-hair) !important;
  border-radius: 10px !important;
  color: var(--r2-ink) !important;
}
html:not(#_) .wb-bell-head,
html:not(#_) .wb-menu-pop a,
html:not(#_) .wb-menu-plan strong { color: var(--r2-ink) !important; }
html:not(#_) .wb-bell-empty,
html:not(#_) .wb-bell-retention,
html:not(#_) .wb-menu-plan-usage,
html:not(#_) .wb-menu-plan-link { color: var(--r2-ink-2) !important; }
html:not(#_) .wb-menu-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 44px !important;
  padding: 0 8px !important;
  background: none !important;
  border: 0 !important;
  border-radius: 6px !important;
  color: var(--r2-ink) !important;
}
html:not(#_) .wb-menu[open] .wb-menu-btn {
  background: var(--r2-sunk) !important;
  border: 0 !important;
  color: var(--r2-ink) !important;
}
html:not(#_) .wb-menu-burger span,
html:not(#_) .wb-menu[open] .wb-menu-burger span {
  background: var(--r2-ink) !important;
  height: 1.5px !important;
}
html:not(#_) .wb-menu-label {
  font-family: var(--r2-body) !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  color: var(--r2-ink) !important;
}
/* The plan chip ("ADMIN") is a label, not a badge: hairline pill, label ink. */
html:not(#_) .wb-menu-plan-chip {
  background: var(--r2-paper) !important;
  border: 1px solid var(--r2-hair) !important;
  color: var(--r2-ink-2) !important;
  border-radius: 999px !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.06em !important;
  line-height: 1.2 !important;
  padding: 1px 8px !important;
  top: -6px !important;
}
/* 2026-08-28 (Robert: "Admin menu formatting problem"): on a phone the chip
   is absolutely pinned above the Menu button (wb-header.css:255); at 13px it
   read as a stray second control floating over the header. Back to the
   shipped micro-label size there — 9px, tight, inside the button's corner. */
@media (max-width: 599px) {
  html:not(#_) .wb-menu-plan-chip {
    font-size: 0.5625rem !important;        /* 9px */
    letter-spacing: 0.05em !important;
    padding: 2px 5px !important;
    top: -5px !important;
    right: 4px !important;
    line-height: 1 !important;
  }
}
html:not(#_) .wb-menu[open] .wb-menu-plan-chip {
  background: var(--r2-paper) !important;
  border-color: var(--r2-hair) !important;
  color: var(--r2-ink-2) !important;
}
html:not(#_) .wb-search input {
  background: var(--r2-sunk) !important;
  border: 1px solid var(--r2-hair) !important;
  border-radius: 999px !important;
  color: var(--r2-ink) !important;
  font-size: 1rem !important;
  min-height: 44px !important;
}
html:not(#_) .wb-search input::placeholder { color: var(--r2-ink-2) !important; }
html:not(#_) .wb-search .ico { color: var(--r2-ink-2) !important; stroke-width: 1.5 !important; }
html:not(#_) .wb-search-buddy,
html:not(#_) .wb-nav-buddy {
  background: transparent !important;
  border: 0 !important;
  color: var(--r2-ink) !important;
  min-height: 44px !important;
}
/* The sparkle is a mask painted with background-color; ink, not black. */
html:not(#_) .wb-spark { background-color: var(--r2-ink) !important; }
html:not(#_) .wb-results {
  background: var(--r2-surface) !important;
  border: 1px solid var(--r2-hair) !important;
  border-radius: 10px !important;
  color: var(--r2-ink) !important;
}

/* ══ Discover search ═══════════════════════════════════════════════════════
   Shipped as a dark espresso pill (#241708) left over from the old palette —
   a black bar sitting on a white page. Repainted to the sunk surface, one
   hairline, a pill radius, and a 16px input (below 16px iOS zooms the whole
   page on focus). Position and order are NOT touched (see NOTES.md §5). */
html:not(#_) .disc-search {
  background: var(--r2-sunk) !important;
  border: 1px solid var(--r2-hair) !important;
  border-radius: 999px !important;
  margin: 8px 16px 16px !important;
  padding: 0 16px !important;
  min-height: 48px !important;
  gap: 8px !important;
}
html:not(#_) .disc-search-icon {
  stroke: var(--r2-ink-2) !important;
  stroke-width: 1.5 !important;
  width: 20px !important;
  height: 20px !important;
}
html:not(#_) .disc-search-input {
  color: var(--r2-ink) !important;
  font-family: var(--r2-body) !important;
  font-size: 1rem !important;
  background: transparent !important;
}
html:not(#_) .disc-search-input::placeholder { color: var(--r2-ink-2) !important; }
html:not(#_) .disc-search-clear {
  color: var(--r2-ink-2) !important;
  min-width: 44px !important;
  min-height: 44px !important;
}
html:not(#_) .disc-search-results {
  background: var(--r2-surface) !important;
  border: 1px solid var(--r2-hair) !important;
  border-radius: 10px !important;
  margin-left: 16px !important;
  margin-right: 16px !important;
}
html:not(#_) .disc-search-results a {
  color: var(--r2-ink) !important;
  font-size: 1rem !important;
  min-height: 44px !important;
  display: flex !important;
  align-items: center !important;
  border-bottom: 1px solid var(--r2-hair) !important;
}

/* ══ Shelf headers — treatment B, unchanged in structure ═══════════════════
   Robert's pick (ask #1854): one slim line — small uppercase letter-spaced
   label, a hairline filling the rest of the line, "See all →" at the far
   right. Kept exactly; only the type role and the rule colour are retuned.
   The label is the token sheet's ONE small-caps style (13px / 0.06em). */
html:not(#_) .picks { margin: 0 0 32px !important; }
html:not(#_) .picks-head {
  margin-bottom: 12px !important;
  gap: 12px !important;
  min-height: 24px !important;
}
html:not(#_) .picks-head h2,
html:not(#_) .panel h2,
html:not(#_) .act-head h1 {
  font-family: var(--r2-body) !important;
  font-size: 0.8125rem !important;          /* 13px — the label role */
  font-weight: 650 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: var(--r2-ink-2) !important;
  margin: 0 !important;
}
html:not(#_) .picks-head::after {
  background: var(--r2-hair) !important;
  margin-left: 0 !important;
}
html:not(#_) .picks-see-all {
  font-family: var(--r2-body) !important;
  font-size: 0.8125rem !important;
  font-weight: 650 !important;
  color: var(--r2-ink) !important;
  text-decoration: underline !important;    /* ask #1909: links are ink + rule */
  text-underline-offset: 3px !important;
  text-decoration-thickness: 1px !important;
  display: inline-flex !important;
  align-items: center !important;
  min-height: 44px !important;
}
html:not(#_) .picks-see-all:hover { color: var(--r2-ink) !important; }
html:not(#_) .picks-link h2 { color: var(--r2-ink-2) !important; }
html:not(#_) .picks-featured {
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
}

/* ══ The grid ══════════════════════════════════════════════════════════════
   A WRAPPING grid, exactly as approved (#1853/#1854) — no sideways rows, no
   column-count change. Only the gaps move onto the spacing scale: 24px
   between rows (unrelated tiles), 16px between columns (tight horizontally). */
html:not(#_) .card-grid,
html:not(#_) .card-grid-compact {
  gap: 24px 16px !important;
  align-items: stretch !important;
}

/* ── Card: a hairline plus padding, never a fill ─────────────────────────── */
html:not(#_) .card,
html:not(#_) .card-family,
html:not(#_) .card--skeleton {
  background: var(--r2-paper) !important;
  border: 1px solid var(--r2-hair) !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  padding-bottom: 12px !important;
  transform: none !important;
  transition: border-color var(--r2-dur-fast) var(--r2-ease) !important;
}
html:not(#_) .card:hover,
html:not(#_) .card-family:hover { border-color: var(--r2-hair-2) !important; }
/* Stacked-deck edges (market.css .card-family-deck::before/::after) hardcode
   a literal white fill so they read as "a set" behind a light card — with no
   dark awareness they stayed literal white against this page's dark surface,
   painting as bright glitch strips (ask #2105 dark-mode fix round). Scoped to
   dark mode only so light mode's existing look is untouched; the edges read
   the SAME background/hairline pair the tile in front of them just got above
   (--r2-paper/--r2-hair), never an invented new dark value. */
@media (prefers-color-scheme: dark) {
  html:not(#_) .card-family-deck::before,
  html:not(#_) .card-family-deck::after {
    background: var(--r2-paper) !important;
    border-color: var(--r2-hair) !important;
  }
}
/* Only the cards that actually carry the pinned Ask-Buddy control reserve a
   44px foot for it. Reserving it on every card left 44px of dead air under
   every batch-family tile, which has no such button. */

/* Family card, phone only (ask #2111 gap-fix round): market.css already
   dedicates row 5 of the family card's own grid to Ask Buddy (mobile
   layout, .card-family>.card-img-wrap{grid-row:1/span 5} etc) and sizes
   the card by that grid's content — it needs no extra foot reserved. The
   generic 44px reservation above still applies (`.card-family` also
   carries the base `.card` class), stacking a second, unused 44px of
   padding below the grid's own content. That padding sits INSIDE the
   card's border box, so it: (a) left the image column's `height:100%`
   filling only the grid's own auto-sized rows, ~45px short of the card's
   true bottom edge (defect 1 — a blank strip under the photo); and (b)
   pushed the buy-line/Ask-Buddy pair's shared containing-block bottom
   down by the same 45px, opening a ~48px gap between "at <retailer> →"
   and Ask Buddy instead of the row-5 fit (defect 2). Same specificity
   (0,2,0) as the rule above; wins on source order within this file. */

/* Ask Buddy tight under the buy line on SPARSE families (fix, ask #2111
   follow-up): the generic "Ask Buddy" rule above (`html:not(#_)
   .card-buddy`, an ID-weight selector via :not(#_)) pins the button to its
   grid area's BOTTOM edge (`bottom:0`). market.css dedicates the family
   card's row 5 to Ask Buddy, but that row's height grows to absorb
   whatever leftover space the image column's forced min-height pushes
   into it (an auto grid row shares a spanning item's extra height with
   its siblings) — on a sparse family (1-2 chips, short name) that leftover
   is large, so bottom-anchoring left Ask Buddy floating 28-50px below the
   "at <retailer> →" buy line (measured live on the real Weller family,
   1 batch: ~28px). Anchoring to row 5's TOP edge instead is immune to how
   tall the row ends up: that edge is always exactly where row 4 (the buy
   line) ends, regardless of slack absorbed beneath it. Needs a selector at
   the same `html:not(#_)` (ID-weight) level to win — market.css's plain
   4-class family override can't beat the ID-weight rule above. */

html:not(#_) .card-link { border-radius: 10px !important; }

/* The photo plate. A bottle shot is content: it keeps its own light plate in
   both modes so a cut-out-on-white image never paints a white slab inside a
   dark card. The photo's size, crop and position are exactly what ships. */
html:not(#_) .card .card-img-wrap {
  background: var(--r2-plate) !important;
  border-bottom: 1px solid var(--r2-hair) !important;
  padding: 12px 12px 8px !important;
  margin: 0 !important;
  overflow: hidden !important;
}
html:not(#_) .card .card-img-wrap img { mix-blend-mode: normal !important; }

/* Family card, phone only (ask #2111): market.css lays the image out on the
   LEFT of the tile at this width (full card height, image column on the
   left) instead of above the name — the divider above moves from under the
   photo to its right edge to match. Same --r2-hair token either way, so it
   still flips correctly in dark mode; this only changes which edge it's on. */
@media (max-width: 600px) {
  html:not(#_) .card-family .card-img-wrap {
    border-bottom: 0 !important;
    border-right: 1px solid var(--r2-hair) !important;
    padding: 12px 8px !important;
  }
}

/* ── Card type: brand-small / name-bold / price-dominant (Vivino) ─────────
   The price is the biggest thing on the card — the question is "what should I
   buy", so the answer is the money. Name is marked by WEIGHT, not size. */
html:not(#_) .card-name {
  font-family: var(--r2-body) !important;
  font-size: 0.875rem !important;           /* 14px */
  font-weight: 650 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.006em !important;
  color: var(--r2-ink) !important;
  padding: 12px 12px 0 !important;
  margin: 0 !important;
  min-height: 2.6em !important;
}
html:not(#_) .card:hover .card-name { color: var(--r2-ink) !important; }
html:not(#_) .card-sub {
  font-family: var(--r2-body) !important;
  font-size: 0.8125rem !important;          /* 13px — meta */
  font-weight: 400 !important;
  line-height: 1.4 !important;
  color: var(--r2-ink-2) !important;
  padding: 0 12px !important;
  margin: 4px 0 0 !important;
}
html:not(#_) .card-sub strong {
  color: var(--r2-ink-2) !important;
  font-weight: 400 !important;
}
/* Top-anchored under the ABV line, NOT `margin-top:auto`. market.css pins the
   price block to the card's bottom to "align the price line across a row",
   but with a variable-height deal line below it that does the opposite: the
   card with the shorter deal text opens a gap ABOVE its price and the two
   prices in a row sit at different heights (measured: $170 ~35px below $149,
   Daily deals row 1). Anchoring the block to the top makes every card's price
   land at the same y — the name has a fixed 2-line min-height and the ABV
   line is always one line — and the slack falls at the card's foot, where
   nothing is reading. Same fix wb-components.css already made for the
   catalogue card (.cat-price-wrap, 2026-07-17). */
html:not(#_) .price-block {
  margin-top: 0 !important;
  padding: 12px 12px 0 !important;
}
html:not(#_) .card-commerce {
  border-bottom: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
}
/* "From" / "From · a124" — the ONE small-caps label style. */
html:not(#_) .price-label {
  font-family: var(--r2-body) !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  /* ink-2, not ink-3: measured 3.56:1 on paper at 13px — ink-3 cannot carry
     text at AA in light mode (NOTES.md §7). */
  color: var(--r2-ink-2) !important;
  margin-bottom: 4px !important;
}
html:not(#_) .price-row {
  min-height: 0 !important;
  gap: 8px !important;
  margin: 0 !important;
}
html:not(#_) .price-amount {
  font-family: var(--r2-body) !important;
  font-size: 1.5rem !important;             /* 24px — the biggest thing here */
  font-weight: 650 !important;
  line-height: 1.1 !important;
  letter-spacing: -0.011em !important;
  color: var(--r2-ink) !important;
  font-variant-numeric: tabular-nums !important;
}
html:not(#_) .price-amount .dollar {
  font-size: 1.0625rem !important;          /* 17px */
  font-weight: 650 !important;
  color: var(--r2-ink) !important;
  margin-right: 1px !important;
}
html:not(#_) .price-amount .cur {
  font-size: 0.8125rem !important;          /* 13px — a label */
  font-weight: 500 !important;
  letter-spacing: 0.06em !important;
  color: var(--r2-ink-2) !important;
  margin-left: 6px !important;
}
/* The trend glyph beside the price is hidden today and stays hidden — the
   deal line below says the same thing in words. */
html:not(#_) .trend-dot { display: none !important; }

/* ── The retailer line: a real 44px target, ink + underline (ask #1909) ──── */
html:not(#_) .card-buy,
html:not(#_) .pm-ret-link {
  font-family: var(--r2-body) !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  color: var(--r2-ink) !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 6px !important;
  padding: 0 !important;
  margin: 4px 0 0 !important;
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  align-self: flex-start !important;
  width: auto !important;
  max-width: 100% !important;
  text-align: left !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  text-decoration-thickness: 1px !important;
  text-decoration-color: var(--r2-hair-2) !important;
}
html:not(#_) .card-buy:hover {
  color: var(--r2-ink) !important;
  text-decoration-color: var(--r2-ink) !important;
}
html:not(#_) .card-buy-arr { color: var(--r2-ink) !important; }
html:not(#_) .card-buy--empty {
  visibility: hidden !important;
  min-height: 44px !important;
  display: flex !important;
}

/* ── The deal line: the ONE place colour appears ──────────────────────────
   The accent means money or a deal, and only that. market.js stamps
   `trend--down` on three different messages, so the accent is keyed off
   data-signal (a real drop event) exactly as the shipped quiet sheet does —
   "Trending down" and "Price steady" stay quiet secondary ink. */
html:not(#_) .card-drop {
  font-family: var(--r2-body) !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  color: var(--r2-ink-2) !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 8px 0 0 !important;
  min-height: 0 !important;
  display: block !important;
}
html:not(#_) .card-drop.trend--up,
html:not(#_) .card-drop.trend--flat,
html:not(#_) .card-drop.trend--down { color: var(--r2-ink-2) !important; }
html:not(#_) .card-drop[data-signal="at-low"],
html:not(#_) .card-drop[data-signal="off-peak"] {
  color: var(--r2-accent) !important;
  font-weight: 650 !important;
  position: relative !important;
  padding-top: 12px !important;
}
html:not(#_) .card-drop[data-signal="at-low"]::before,
html:not(#_) .card-drop[data-signal="off-peak"]::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 24px !important;
  height: 1px !important;
  background: var(--r2-accent) !important;
  display: block !important;
}
html:not(#_) .card-drop--empty { display: none !important; }

/* ── The 90-day price bar ────────────────────────────────────────────────
   THE HORIZONTAL-SCROLL FIX. Shipped, the "today $179" pill is absolutely
   positioned at the price's percentage of the 90-day range and centred on it
   (`left:6%; transform:translateX(-50%)`), so on a 2-up phone grid it hangs
   14px off the left edge of the viewport and 14px off the right — measured
   405px of content in a 390px window, in BOTH colour modes, on the live front
   door today (checks.json, `before/*`). Any page overflow becomes a draggable
   sideways pan of the whole document inside the iOS WKWebView.
   The percentage is written as an INLINE style by market.js, so CSS cannot
   clamp it; the fix is to take the tag out of absolute positioning entirely
   and let it sit as a flush-left caption above the track. Same element, same
   words, same order — it stops being a pointer and becomes a label, and the
   dot on the track still carries the position. */
html:not(#_) .price-bar { margin-top: 12px !important; }
html:not(#_) .price-bar-track-wrap { padding-top: 0 !important; }
html:not(#_) .price-bar-tag {
  position: static !important;
  transform: none !important;
  display: inline-block !important;
  background: transparent !important;
  color: var(--r2-ink-2) !important;
  font-family: var(--r2-body) !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  padding: 0 !important;
  margin-bottom: 6px !important;
  border-radius: 0 !important;
}
html:not(#_) .price-bar-tag::after { display: none !important; }
html:not(#_) .price-bar-track {
  height: 2px !important;
  border-radius: 999px !important;
  background: var(--r2-hair) !important;
}
html:not(#_) .price-bar-fill { background: var(--r2-hair-2) !important; }
html:not(#_) .price-bar-dot {
  width: 8px !important;
  height: 8px !important;
  background: var(--r2-accent) !important;
  border: 2px solid var(--r2-paper) !important;
}
html:not(#_) .price-bar-ends {
  font-family: var(--r2-body) !important;
  font-size: 0.8125rem !important;
  font-weight: 400 !important;
  color: var(--r2-ink-2) !important;
  margin-top: 6px !important;
}
html:not(#_) .price-bar-caption {
  font-family: var(--r2-body) !important;
  font-size: 0.8125rem !important;
  color: var(--r2-ink-2) !important;
  margin-top: 2px !important;
}

/* ── Ask Buddy: a text control at the card foot, at a real 44px ──────────── */




/* ── Batch-family tile ───────────────────────────────────────────────────── */
html:not(#_) .fam-batches {
  margin-top: 12px !important;
  border-top: 1px solid var(--r2-hair) !important;
  padding: 0 12px !important;
}
html:not(#_) .fam-batches summary {
  font-family: var(--r2-body) !important;
  font-size: 0.8125rem !important;
  font-weight: 650 !important;
  color: var(--r2-ink) !important;
  min-height: 44px !important;
  display: flex !important;
  align-items: center !important;
  border-radius: 6px !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  text-decoration-thickness: 1px !important;
  text-decoration-color: var(--r2-hair-2) !important;
}
html:not(#_) .fam-batch {
  min-height: 44px !important;
  padding: 4px 0 !important;
  border-bottom: 1px solid var(--r2-hair) !important;
  gap: 12px !important;
}
html:not(#_) .fam-batch-name {
  font-family: var(--r2-body) !important;
  font-size: 0.8125rem !important;
  font-weight: 400 !important;
  color: var(--r2-ink) !important;
}
html:not(#_) .fam-batch:hover .fam-batch-name { color: var(--r2-ink) !important; }
html:not(#_) .fam-batch-price {
  font-family: var(--r2-body) !important;
  font-size: 0.8125rem !important;
  font-weight: 650 !important;
  color: var(--r2-ink) !important;
  font-variant-numeric: tabular-nums !important;
}

/* ── Skeletons: a calm block, no shimmer ─────────────────────────────────── */
html:not(#_) .sk { background: var(--r2-sunk) !important; border-radius: 6px !important; opacity: 1 !important; }

/* ── Chips and tags: hairline, label ink, never a colour ─────────────────── */
html:not(#_) .chip,
html:not(#_) .chip-brand,
html:not(#_) .chip-rel,
html:not(#_) .picks-tag,
html:not(#_) .idx,
html:not(#_) .act-tag,
html:not(#_) .stock-chip,
html:not(#_) .status-chip {
  background: var(--r2-paper) !important;
  color: var(--r2-ink-2) !important;
  border: 1px solid var(--r2-hair) !important;
  border-radius: 999px !important;
  font-family: var(--r2-body) !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.06em !important;
}

/* ══ Market-facts panel ════════════════════════════════════════════════════ */
html:not(#_) .panel,
html:not(#_) .facts-panel,
html:not(#_) .idx-feature,
html:not(#_) .hist-row,
html:not(#_) .filters {
  background: var(--r2-paper) !important;
  border: 1px solid var(--r2-hair) !important;
  border-radius: 10px !important;
  margin: 32px 0 !important;
  padding: 16px !important;
}
html:not(#_) .facts-list {
  margin: 12px 0 0 !important;
  padding-left: 20px !important;
  font-size: 1rem !important;
  line-height: 1.6 !important;
  color: var(--r2-ink) !important;
  max-width: 34em !important;
}
html:not(#_) .facts-list li { margin-bottom: 8px !important; }
/* A figure IS money-adjacent, but the accent is reserved for price and deals —
   a count of bottles is emphasis, and emphasis is weight, not colour. */
html:not(#_) .facts-list strong {
  color: var(--r2-ink) !important;
  font-weight: 650 !important;
  font-variant-numeric: tabular-nums !important;
}
html:not(#_) .note,
html:not(#_) .muted,
html:not(#_) .fr-note {
  font-family: var(--r2-body) !important;
  font-size: 0.8125rem !important;
  line-height: 1.5 !important;
  color: var(--r2-ink-2) !important;
  max-width: 34em !important;
}

/* ══ Catalogue CTA ═════════════════════════════════════════════════════════
   Shipped as a tinted gradient band with an accent link. Flat paper, one
   hairline, and the link is ink + underline — the accent stays money-only. */
html:not(#_) .browse-cta {
  background: var(--r2-paper) !important;
  background-image: none !important;
  border: 1px solid var(--r2-hair) !important;
  border-radius: 10px !important;
  margin: 32px 0 0 !important;
  padding: 16px !important;
  gap: 4px !important;
  align-items: center !important;
}
html:not(#_) .browse-cta a {
  font-family: var(--r2-body) !important;
  font-size: 1.0625rem !important;          /* 17px — the lead action */
  font-weight: 650 !important;
  color: var(--r2-ink) !important;
  text-decoration: underline !important;
  text-underline-offset: 4px !important;
  text-decoration-thickness: 1px !important;
  display: inline-flex !important;
  align-items: center !important;
  min-height: 44px !important;
  border-radius: 6px !important;
}
html:not(#_) .browse-cta .note { color: var(--r2-ink-2) !important; }

/* ══ Footer ════════════════════════════════════════════════════════════════ */
html:not(#_) .wb-footer {
  background: var(--r2-paper) !important;
  border-top: 1px solid var(--r2-hair) !important;
  color: var(--r2-ink-2) !important;
  margin-top: 48px !important;
  padding: 32px 0 24px !important;
}
html:not(#_) .wb-footer-in,
html:not(#_) .wb-foot-bottom {
  padding-left: 16px !important;
  padding-right: 16px !important;
}
html:not(#_) .wb-footer .wb-foot-tag,
html:not(#_) .wb-footer .wb-foot-bottom { color: var(--r2-ink-2) !important; }
html:not(#_) .wb-footer .wb-foot-head {
  color: var(--r2-ink-2) !important;
  font-family: var(--r2-body) !important;
  font-size: 0.8125rem !important;
  font-weight: 650 !important;
  letter-spacing: 0.06em !important;
}
html:not(#_) .wb-footer .wb-foot-nav a {
  color: var(--r2-ink) !important;
  font-size: 1rem !important;
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  text-decoration-thickness: 1px !important;
  text-decoration-color: var(--r2-hair-2) !important;
}
html:not(#_) .wb-footer .wb-mark { border-color: var(--r2-hair) !important; }
html:not(#_) .wb-foot-bottom { border-top: 1px solid var(--r2-hair) !important; }

/* ══ Buddy dock / floating chrome ══════════════════════════════════════════
   Not this round's surface, but it paints ON this page — so it gets the same
   paper and hairline rather than a white slab on dark paper. */


/* ══ Desktop: the phone column, widened, not a different design ════════════ */
@media (min-width: 861px) {
  html:not(#_) .wrap,
  html:not(#_) main.wrap {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
  html:not(#_) .card-grid,
  html:not(#_) .card-grid-compact { gap: 32px 24px !important; }
  html:not(#_) .card-name { padding: 16px 16px 0 !important; }
  html:not(#_) .card-sub { padding: 0 16px !important; }
  html:not(#_) .price-block { padding: 12px 16px 0 !important; }
  html:not(#_) .card .card-img-wrap { padding: 16px 16px 8px !important; }
  
  html:not(#_) .fam-batches { padding: 0 16px !important; }
  html:not(#_) .panel,
  html:not(#_) .facts-panel,
  html:not(#_) .browse-cta { padding: 24px !important; }
}

/* ── Motion: 120ms for state, one curve, and none of it under reduce ─────── */
@media (prefers-reduced-motion: reduce) {
  html:not(#_) *,
  html:not(#_) *::before,
  html:not(#_) *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Row alignment of the 90-day bar (Robert, 2026-08-27, on the sheets) ──
   "my ocd is triggered by the horizontal bar for the 90 days range when
   it's next to another bottle's line at a different height." Cause: the deal
   line is 1 line on one card ("At 90-day low") and 2 on its neighbour ("1%
   below 90-day high"), and everything below it slides. Two rules, both
   layout-only, no DOM change:
   1. the deal line always reserves two lines, so the bar and the range
      figures sit at the same y whether the message wraps or not;
   2. belt-and-braces: the commerce block fills the card and pushes the bar
      to the card's foot, so the bars in a row align even if some other line
      above ever wraps (a long retailer name). Grid rows stretch, so every
      card in a row is already the same height. */
html:not(#_) .card-drop { min-height: 2.8em !important; }        /* 2 lines @ 1.4 */
html:not(#_) .card-drop--empty { display: block !important; visibility: hidden !important; }
html:not(#_) .card-buy,
html:not(#_) .pm-ret-link { white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
html:not(#_) .price-block { flex: 1 1 auto !important; display: flex !important; flex-direction: column !important; }
html:not(#_) .card-commerce { flex: 1 1 auto !important; display: flex !important; flex-direction: column !important; }
html:not(#_) .price-bar { margin-top: auto !important; padding-top: 12px !important; }
/* …and the bar itself must be the same height on every card: the "steady"
   variant's caption ("Steady at $1,490 · 90 days") wraps to two lines where
   "90 day range" takes one, which lifted that card's track 20px (measured,
   Daily deals). Every caption reserves two lines; the tag stays one. */
html:not(#_) .price-bar-caption { min-height: 2.8em !important; line-height: 1.4 !important; }
html:not(#_) .price-bar-tag { white-space: nowrap !important; max-width: 100% !important; overflow: hidden !important; text-overflow: ellipsis !important; }

/* ── Search / Ask-Buddy bar back on top (Robert 2026-08-28: "Landing page has
   no way to get to buddy chat"; finding T500). market.css's phone block makes
   main.wrap a flex column and sends #market to order:-1, so the Discover
   search form — the phone's only Buddy entry — sorts under ~13,000px of
   grid. Flex `order` only, no DOM change: the form and its results panel go
   above the grid. */
@media (max-width: 600px) {
  html:not(#_) main.wrap > .disc-search { order: -3 !important; }
  html:not(#_) main.wrap > .disc-search-results { order: -2 !important; }
}

/* ══ T517(c) landing "Ask Buddy" chip (asks #1922/#1924/#1925) ═════════════
   Not an "appearance only" restyle rule like the rest of this file — this is
   the ONE new element T517 adds to the landing DOM (templates/partials/
   landing_buddy_chip.html), scoped entirely under .wb-abc so it can never
   collide with a product selector. Floating bottom-right pill, real app-icon
   asset (/static/brand/mark.png — the same file site_chrome.py's header
   link serves), collapses to a 48px icon-only chip after the first ~80px of
   scroll (landing_buddy_chip.html's inline script toggles .wb-abc-collapsed
   and remembers it in sessionStorage for the tab).
   Order in source matters here: this block is linked LAST in this file and
   this file is linked before the former Buddy stylesheet in the page head
   (see the template's <head>), so the Buddy-dock rules just above (.bd-bar
   etc) never need to know this element exists. */
html:not(#_) .wb-abc {
  position: fixed;
  right: 16px;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: 16px;
  bottom: max(16px, calc(env(safe-area-inset-bottom, 0px) + 12px));
  z-index: 60; /* below the Buddy takeover panel/bar (1200/1201) and the
                  desktop rail (41) is irrelevant here since the rail never
                  reaches the right edge — this only has to clear this
                  page's own chrome. */
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 18px 0 6px;
  border-radius: 999px;
  background: var(--r2-surface);
  color: var(--r2-ink);
  border: 1px solid var(--r2-hair-2);
  box-shadow: 0 6px 20px rgba(23, 19, 16, 0.16);
  text-decoration: none !important;
  font-family: var(--r2-body);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: padding var(--r2-dur-fast, 120ms) var(--r2-ease, ease),
              gap var(--r2-dur-fast, 120ms) var(--r2-ease, ease);
}
html:not(#_) .wb-abc:hover,
html:not(#_) .wb-abc:focus-visible {
  border-color: var(--r2-ink-3);
}
html:not(#_) .wb-abc:focus-visible {
  outline: 2px solid var(--r2-focus);
  outline-offset: 2px;
}
/* T526: WebKit clips an element's hit area to its border-radius, so the
   999px pill left the bounding box's corners untappable — and the landing's
   featured-pick cards stretch a.card-link across themselves directly under
   the chip, so a corner tap opened a bottle page instead of Buddy. The pill
   geometry is untouched; this transparent rectangular ::before (child boxes
   are NOT clipped by the parent's radius) gives BOTH states a rectangular
   tap target with 8px slop past the box. */
html:not(#_) .wb-abc::before {
  content: "";
  position: absolute;
  inset: -8px;
}
html:not(#_) .wb-abc-icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--r2-sunk);
}
html:not(#_) .wb-abc-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
html:not(#_) .wb-abc-label {
  overflow: hidden;
  max-width: 200px;
  transition: max-width var(--r2-dur-fast, 120ms) var(--r2-ease, ease),
              opacity var(--r2-dur-fast, 120ms) var(--r2-ease, ease),
              margin-left var(--r2-dur-fast, 120ms) var(--r2-ease, ease);
}
/* Collapsed: 48px icon-only round chip — the label collapses to zero width
   rather than unmounting, so the accessible name (the anchor's aria-label,
   set once in the markup, unaffected by this class) and the "Ask Buddy"
   text both stay in the DOM in either state (T517 test pin). */
html:not(#_) .wb-abc.wb-abc-collapsed {
  width: 48px;
  height: 48px;
  padding: 0;
  gap: 0;
  justify-content: center;
}
html:not(#_) .wb-abc.wb-abc-collapsed .wb-abc-icon {
  width: 100%;
  height: 100%;
}
html:not(#_) .wb-abc.wb-abc-collapsed .wb-abc-label {
  max-width: 0;
  opacity: 0;
  margin-left: 0;
}
@media (prefers-reduced-motion: reduce) {
  html:not(#_) .wb-abc,
  html:not(#_) .wb-abc-label { transition: none !important; }
}
