/* homeview-barcode-scan-p1: sized for a 1088x1088 square read from across a
   kitchen. Type scales with the SHORTER side (vmin), so a phone in portrait
   gets the same proportions as the square. High contrast for kitchen light. */

:root {
  /* --bg, --card, --ink, --muted, --line, --accent, --accent-ink, --on-accent:
     the app's palettes, generated into strings/theme.css (barcode-strings.mjs). */
  --gap: clamp(12px, 2.4vmin, 32px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* The page FRAME the owner tested on HomeView (2026-11-20): one full-height
   column, the product scrolling INSIDE it. NOT the document: on HomeView a
   pinned layer (the floating button, a sheet) over a scrolled document is
   what Safari hit-tests wrong (deck_template.go, device pass round 5), and
   100svh is the 394 px frame, not the 364 px visible area. Scrolling behind
   Safari's pill comes with the cook page's measured frame + --vvb technique. */
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }
:root { --font: 'Nunito', system-ui, -apple-system, sans-serif; }
body {
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  font-size: clamp(16px, 2.6vmin, 30px);
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
}

.bar {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: calc(var(--gap) * 0.6) var(--gap);
  /* NEVER shrinks (owner's HomeView test, 2026-11-20): the body is a
     full-height flex column, and Safari let this header squeeze below its own
     mark, so the scrolling product and the camera box rode over the wordmark.
     Chrome resolves the min size from the content and hid it. */
  flex: none;
  min-height: max-content;
}
.mark { width: 1.8em; height: 1.8em; }
/* The mark is the theme button (owner, 2026-11-20): plain, a 44 px target, a visible focus ring,
   and a press that answers the tap. The wordmark beside it is the getbinnie.app link (owner,
   2026-12-03). The button keeps its leading 0.3em and drops the trailing one, so the header's own
   0.5em gap puts the wordmark exactly where it sat inside the button. */
.brand-toggle {
  display: inline-flex; align-items: center; gap: 0.5em;
  min-height: 44px; padding: 0 0 0 0.3em; margin-inline-start: -0.3em; position: relative;
  background: transparent; border: 0; border-radius: 12px; color: inherit; font: inherit;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  /* The long press flips light/dark: no text selection or iOS callout. */
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
  transition: transform 120ms ease;
}
/* A 44 px wide hit area centred on the mark, taking no layout space (a min-width moved the mark and
   the wordmark on a phone, measured): it reaches ~5 px past each side, inside the 0.5em gap. */
.brand-toggle::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: max(100%, 44px); transform: translateX(-50%); }
.brand-toggle:active { transform: scale(0.94); }
.brand-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wordmark { font-weight: 800; font-size: 1.3em; letter-spacing: -0.01em; }
.brand-link { display: inline-flex; align-items: center; min-height: 44px; padding-inline-end: 0.3em; color: inherit; text-decoration: none; border-radius: 12px; -webkit-tap-highlight-color: transparent; }
.brand-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

main { flex: 1; display: flex; padding: 0 var(--gap) var(--gap); min-height: 0; }
.state { flex: 1; display: flex; flex-direction: column; gap: var(--gap); min-height: 0; min-width: 0; }
.state[hidden] { display: none; }

/* Scanning: the app's single-scan scanner, mirrored from
   lib/features/barcode/screens/barcode_scanner_screen.dart -
   _buildCamera (:621-760): window min(260, 85% w) x min(170, 60% h), centred
   at 42% of the preview height; scrim black 50% outside it
   (_ScrimCutoutPainter :1083); prompt on an opaque cameraChrome chip 24px
   below the window. ScanWindow (:883-985): radius 24, 1px white-35% edge,
   12px black-25% glow; _CornerBracketPainter (:990): 4px brand-colour
   brackets, 22px arms past the corner arc; the sweeping line in the brand
   colour with a dark keyline, 1600 ms, back and forth (:210, :241).
   Colours are the default palette, Pink watermelon
   (assets/config/colors_pink.json: primary, cameraChrome, cameraChromeGlyph).
   🔴 THE WINDOW IS A GUIDE ONLY. HomeView's Center Stage camera pans and
   zooms on its own, so the decoder reads the WHOLE picture (barcode.js
   loadZXing / BarcodeDetector), unlike the app, which crops to the window. */
.viewfinder {
  --sc-w: min(260px, 85%);
  --sc-h: min(170px, 60%);
  --sc-top: 42%;
  --sc-r: 24px;
  --sc-chrome: #2a1a22;
  --sc-chrome-ink: #ffeaf3;
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 24px;
  overflow: hidden;
  background: #000;
}
/* Owner 2026-12-01 ("the black is too large here"): on a wide screen the camera box is the site's
   reading column (760px), centred, and at most 560px tall, so a desktop shows a camera-sized box
   rather than a black screen; it stays flex, so a short laptop screen still fits the frame, the hint
   and "Type the barcode" above the fold. Phones keep the full width (the cap bites above 800px
   only). The decoder reads the WHOLE video frame, never this box (barcode.js detect), and the window
   is a percentage of the box, so nothing maps differently after the resize. */
@media (min-width: 800px) {
  #scan .viewfinder { width: 100%; max-width: 760px; max-height: 560px; margin-inline: auto; }
}
.viewfinder video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* A user-facing camera (HomeView's, a laptop's) shows as a MIRROR, so a pack
   moved left moves left on screen. The picture only: the decoder reads the
   raw frame, and the window and prompt stay unflipped. */
.viewfinder video.sc-mirror { transform: scaleX(-1); }
/* ?demo=1 (the home page's HomeView act): a DRAWN barcode label stands in for
   the camera picture, under the same window, brackets and sweep (barcode.js
   demoStill). The scene is a plain pack surface; the label is a white printed
   sticker centred on the window, as a pack held up to the screen would be. */
.viewfinder .sc-still {
  position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 42%, #e9e3d8 0%, #cfc6b6 55%, #a99f8e 100%);
}
.sc-label {
  position: absolute;
  left: 50%;
  top: var(--sc-top);
  transform: translate(-50%, -50%);
  /* Inside the window with a margin, whichever side of the window binds. */
  width: min(calc(var(--sc-w) * 0.86), calc(var(--sc-h) * 0.86 * 1.5));
  padding: 5% 6% 4%;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18), 0 6px 18px rgba(0, 0, 0, 0.12);
}
.sc-label svg { display: block; width: 100%; height: auto; }
/* ?demo=1, owner 2026-11-21: the first beat is the scanning window and nothing
   else, so the window fills the screen: no "Type the barcode", no app card, no
   terms line. The real page is untouched (the class is set only in demo). */
/* With the foot gone the preview owns the screen, so the window grows with it
   (the same window, brackets, sweep and hint; only its size): a pack held up
   to HomeView fills the frame, it does not sit small in an empty picture. */
.sc-demo .viewfinder { --sc-w: min(420px, 80%); --sc-h: min(260px, 56%); --sc-top: 44%; }
/* The HomeView mock (getbinnie.app, home.css .hvd) frames this page 544 px wide
   in a screen whose corner radius is 18 of the screen's 148 units (home.css
   derives it: rim 28 - rim pad 2 - bezel pad 8, owner 2026-11-26, concentric
   bezels; it was 19 = 69.8 px until then) = 66.2 px of page. This page runs in
   an iframe, so it cannot read home.css's variables: the same numbers are
   restated here, and a change to one is a change to the other. The panel sits
   var(--gap) in from the screen's edges, so its own 24 px bottom corners
   overshot that curve and the bezel cut them (owner 2026-11-22). Its bottom
   corners are CONCENTRIC with the screen's: radius = screen radius - the inset,
   the same centre, so the panel follows the bezel at an even distance at every
   size the mock scales to (it scales the whole page). */
.sc-demo .viewfinder { --sc-demo-screen-r: calc((28 - 2 - 8) / 148 * 544px); border-bottom-left-radius: calc(var(--sc-demo-screen-r) - var(--gap)); border-bottom-right-radius: calc(var(--sc-demo-screen-r) - var(--gap)); }
.sc-demo #scan .scan-foot,
.sc-demo #scan .legal-line { display: none; }
.sc-window {
  position: absolute;
  left: 50%;
  top: var(--sc-top);
  width: var(--sc-w);
  height: var(--sc-h);
  transform: translate(-50%, -50%);
  border-radius: var(--sc-r);
  border: 1px solid rgba(255, 255, 255, 0.35);
  /* The 100vmax spread is the scrim: everything outside the rounded window
     dims, and .viewfinder's overflow clips it to the preview. */
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.25), 0 0 0 100vmax rgba(0, 0, 0, 0.5);
}
/* Each corner: the arc (radius 24) plus a 22px arm each way, a 4px stroke
   centred on the window edge like the painter's. */
.sc-corner {
  position: absolute;
  width: calc(var(--sc-r) + 24px);
  height: calc(var(--sc-r) + 24px);
  border: 0 solid var(--accent);
}
.sc-tl { top: -3px; left: -3px; border-top-width: 4px; border-left-width: 4px; border-top-left-radius: calc(var(--sc-r) + 2px); }
.sc-tr { top: -3px; right: -3px; border-top-width: 4px; border-right-width: 4px; border-top-right-radius: calc(var(--sc-r) + 2px); }
.sc-br { bottom: -3px; right: -3px; border-bottom-width: 4px; border-right-width: 4px; border-bottom-right-radius: calc(var(--sc-r) + 2px); }
.sc-bl { bottom: -3px; left: -3px; border-bottom-width: 4px; border-left-width: 4px; border-bottom-left-radius: calc(var(--sc-r) + 2px); }
/* The sweep moves the TRACK with transform only (owner, 2026-11-20: "the red
   line in scanner is choppy, needs to be smooth"): animating `top` relaid the
   line out on the main thread every frame, so each barcode decode (up to
   ~480 ms on HomeView) froze it. A transform runs on the compositor and keeps
   going while the main thread is busy. The track is the window less the
   line's 3 px, so translateY(100%) (a % of the TRACK's own height) ends the
   line exactly at the bottom edge. */
.sc-laser-track {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: calc(100% - 3px);
  pointer-events: none;
  will-change: transform;
  animation: sc-sweep 1.6s ease-in-out infinite alternate;
}
.sc-laser {
  position: absolute;
  left: 12px; right: 12px;
  top: 0;
  height: 3px;
  background: var(--accent);
  border: 0.75px solid rgba(0, 0, 0, 0.6);
  border-radius: 2px;
  /* The glow is the line's own palette colour (owner 2026-11-23: "keeps the pink glow, even when
     switching to green/golden"); it was a fixed watermelon rgba, so only the line followed a switch. */
  box-shadow: 0 0 8px 1px color-mix(in srgb, var(--accent) 60%, transparent);
}
@keyframes sc-sweep { from { transform: translateY(0); } to { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { .sc-laser-track { animation: none; transform: translateY(50%); } }
/* The prompt, centred just below the window, on the camera chrome. */
.viewfinder .sc-hint {
  position: absolute;
  left: 8px; right: 8px;
  top: calc(var(--sc-top) + var(--sc-h) / 2 + 24px);
  text-align: center;
  font-size: 1em;
  color: var(--sc-chrome-ink);
}
.sc-hint span {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--sc-chrome);
  color: var(--sc-chrome-ink);
}
/* A short window (HomeView: 448 x 364): the window rides higher and the
   prompt sits closer, so both fit the preview with room to hold a pack. */
@media (max-height: 480px) {
  .viewfinder { --sc-h: min(170px, 52%); --sc-top: 38%; --sc-r: 18px; }
  .viewfinder .sc-hint { top: calc(var(--sc-top) + var(--sc-h) / 2 + 10px); }
  .sc-hint span { padding: 5px 14px; }
}
.hint { text-align: center; color: var(--muted); font-size: 1.05em; }

/* Buttons: large tap targets for a counter-top screen. */
button { font: inherit; cursor: pointer; border-radius: 999px; border: 0; }
.primary {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
  padding: 0.7em 1.4em;
  min-height: 56px;
}
.primary:focus-visible, .secondary:focus-visible, #codeInput:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.primary.big { align-self: center; font-size: 1.15em; padding: 0.8em 2em; }
.secondary {
  align-self: center;
  background: transparent;
  color: var(--accent-ink);
  font-weight: 700;
  padding: 0.6em 1em;
  min-height: 48px;
}

/* Typing */
#typeForm { display: flex; gap: 0.6em; justify-content: center; }
#codeInput {
  font: inherit;
  font-size: 1.4em;
  letter-spacing: 0.06em;
  width: 9.5em;
  padding: 0.4em 0.6em;
  border: 2px solid #8a8a8a; /* >= 3:1 non-text contrast on the card */
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
h1.hint, p.hint, h1.message, p.message { font-weight: 400; }
/* binnie-food-root-is-scanner SEO (owner 2026-12-02): the camera hint, the type screen's reason and
   the not-found message are instructions and status, not headings: <p>, so the page has ONE h1
   (#about's "Binnie Barcode Scanner"; a product's name is the product view's). They keep the
   generic h1's line box and wrapping, so nothing moves. */
p.hint, p.message { line-height: 1.15; overflow-wrap: anywhere; }
h1.hint, p.hint { font-size: 1.05em; }
/* The type screen scrolls INSIDE the frame (it carries the #about block, binnie-food-root-is-scanner
   SEO): never justify-content:center on a scrolling column, which puts the overflow above the top
   where it cannot be reached. Auto margins centre when there is room and collapse when there is not. */
#type { justify-content: flex-start; overflow-y: auto; }
/* The static type screen (index.html): hidden from the first paint while the scripts run (html.js),
   until show() takes over; shown when they never booted (the 2.5 s fallback drops html.js). */
html.js #type.boot-visible { display: none; }
#type > #typeReason { margin-top: auto; }
#type > :last-child { margin-bottom: auto; }
.about { max-width: 36em; margin-inline: auto; padding: var(--gap) 4px 0; font-size: 0.85em; line-height: 1.45; color: var(--muted); }
.about[hidden] { display: none; }
.about h1 { font-size: 1.35em; font-weight: 800; color: var(--ink); margin: 0 0 0.4em; }
.about > p { margin: 0 0 1em; }
.about h2 { font-size: 1.1em; font-weight: 800; color: var(--ink); margin: 1.2em 0 0.3em; }
.about h3 { font-size: 1em; font-weight: 700; color: var(--ink); margin: 1em 0 0.25em; }
.about-faq p { margin: 0; }

/* Loading */
#loading { align-items: center; justify-content: center; }
.spinner {
  width: 4em; height: 4em;
  border: 0.4em solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; border-top-color: var(--line); } }

/* Product */
#product { overflow-y: auto; }
.head { display: flex; align-items: center; gap: var(--gap); }
.titles { flex: 1; min-width: 0; }
h1 { font-size: 1.7em; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
/* Owner 2026-12-01 ("theme appropriate, like recipe titles in our app"): the product name takes the
   recipe title's treatment, the palette's primaryText (--accent-ink, from assets/config/colors*.json)
   at 800, as the recipe pages' h1 (--primary-text). Contrast on --bg: pink 5.12, kiwi 4.75, pink
   dark 6.13, kiwi dark 8.51 (all >= 4.5:1). */
#pName { color: var(--accent-ink); }
.meta { color: var(--muted); margin-top: 0.2em; }
.crowd { font-size: 0.85em; }
h2 { font-size: 1em; font-weight: 800; margin-bottom: 0.4em; }

/* The APP's grade palette and glyph ink (lib/core/nutrition/nutri_grade_palette.dart:
   nutriGradeColor + nutriGradeGlyphColor), not the official Nutri-Score colours,
   which the app deliberately does not use; scripts/website/barcode-strings.mjs
   --check fails when these drift from the Dart palette. */
.grade {
  flex: none;
  width: 2.6em; height: 2.6em;
  border-radius: 0.6em;
  display: grid; place-items: center;
  font-weight: 800; font-size: 1.6em;
  color: #fff;
}
.grade.a { background: #2e7d32; color: #ffffff; }
.grade.b { background: #7cb342; color: #1a1a1a; }
.grade.c { background: #f5a623; color: #1a1a1a; }
.grade.d { background: #f57c00; color: #1a1a1a; }
.grade.e { background: #d32f2f; color: #ffffff; }

/* minmax(0, 1fr): a bare 1fr is minmax(auto, 1fr) and would let the widest
   row push the column past a phone's edge. */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); }
@media (max-aspect-ratio: 3/4) { .cols { grid-template-columns: minmax(0, 1fr); } }

/* Focus moved by script (a11y) lands on headings with tabindex=-1: no ring
   for sighted readers, the screen reader still follows it. */
[tabindex="-1"]:focus { outline: none; }



.message { text-align: center; font-size: 1.3em; }
#message { justify-content: center; }

/* HomeView's REAL viewport (measured by HCH, relayed 2026-11-19): 448 x 364
   CSS px (394 with Safari's bar collapsed), dpr 2. "1088x1088" is device
   pixels. On a window this short the product view tightens, and "Scan
   another" stays pinned at the bottom so the next scan never needs a scroll. */
@media (max-height: 480px) {
  body { font-size: 15px; }
  .bar { padding: 6px var(--gap); }
  .mark { width: 1.5em; height: 1.5em; }
  .wordmark { font-size: 1.1em; }
  h1 { font-size: 1.35em; }
  .grade { width: 2.1em; height: 2.1em; font-size: 1.3em; }
  .primary.big { padding: 0.55em 1.6em; min-height: 48px; }
  .state { gap: 8px; }
}
/* Short AND wide (HomeView): the right column has room under the
   alternatives, so the button sits there, clear of the nutrition table. */
/* Two alternatives on a short window: a third would run under the pinned
   button. Both remain one tap away from the product they replace. */
@media (max-height: 480px) {
}

/* ---- parity: sections, tap rows and the sheet ---- */
.blocks { display: flex; flex-direction: column; gap: var(--gap); }
.blk h2 { margin-bottom: 0.4em; }
.tap {
  display: flex; align-items: center; gap: 0.5em; width: 100%;
  background: transparent; border: 0; border-radius: 12px; padding: 0.2em 0;
  color: inherit; font: inherit; text-align: start; min-height: 44px;
}
/* Inset: a row is as wide as its list, so a ring outside it ran past the right edge and was clipped
   (owner, 2026-12-02). */
.tap:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
/* In the DOCUMENT, at the visual viewport's top (core.js place()), never the
   top layer: on HomeView Safari the fixed/top-layer box sits outside the
   visible area once the page scrolls (owner's HomeView test, 2026-11-20). */
dialog.sheet {
  position: absolute; z-index: 30; left: 50%; right: auto; transform: translateX(-50%); margin: 0;
  border: 0; border-radius: 20px; padding: 0; width: min(calc(100% - 24px), 640px); max-height: 80vh;
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); color: var(--ink); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}
/* Dark mode: the shadow vanishes on a dark page, so the sheet carries a hairline edge. */
:root[data-mode="dark"] dialog.sheet { border: 1px solid var(--line); }
.sheet-scrim { position: absolute; z-index: 29; left: 0; top: 0; width: 100%; background: rgba(0, 0, 0, 0.45); }
.sheet-scrim[hidden] { display: none; }
.sheet-head {
  position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between;
  gap: 0.5em; padding: 0.8em 1em; background: var(--card); border-bottom: 1px solid var(--line);
}
.sheet-head h2 { margin: 0; font-size: 1.15em; }
.sheet-close { background: transparent; color: var(--ink); font-size: 1.6em; line-height: 1; min-width: 44px; min-height: 44px; }
/* The site's ring (the accent, 3px) instead of the browser's default blue, INSET so the sheet's
   rounded corner and overflow can never clip it; keyboard focus only. */
.sheet-close { border-radius: 0.5em; }
.sheet-close:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.sheet-close:focus:not(:focus-visible) { outline: none; }
/* A focus ring is for KEYBOARD users. After a tap or a click (core.js publishes the last input as
   html[data-input]) no element shows one, also where WebKit matches :focus-visible on a scripted
   focus (the sheet's X on open, the opening row on close). !important: the modules' own ring rules
   out-rank this selector. */
html[data-input="pointer"] :focus-visible { outline: none !important; }
.sheet-body { padding: 1em; overflow-y: auto; }

/* ?diag=1 only: the HomeView gate's numbers (never shown otherwise). */
.gate-diag { position: fixed; left: 6px; bottom: 6px; z-index: 9; padding: 2px 6px; border-radius: 6px;
  background: rgba(0, 0, 0, 0.72); color: #fff; font: 600 11px/1.3 system-ui, sans-serif; }

/* ---- Option B (owner, 2026-11-20): the PRODUCT scrolls as the document. ----
   Mirrors the HomeView pre-cook page (functions/app-fast-go/internal/cookpage/
   template.go): no locked html/body, no inner scroller, the top padded by the
   safe-area inset with its 14 px fallback, so content passes UNDER Safari's top
   pill as it scrolls. Nothing is pinned over the scrolling document ("Scan
   another" sits in the header and at the end), because a pinned layer over a
   scrolled document is what HomeView Safari hit-tests wrong. */
html.doc-scroll, html.doc-scroll body { height: auto; }
html.doc-scroll body { display: block; padding-top: max(env(safe-area-inset-top, 0px), 14px); }
/* Owner 2026-12-01 ("Barcode page goes full width, we should cap the width"): the product view
   reads in the site's own column (main { max-width: 760px }, as the recipe and legal pages); the
   camera view (not doc-scroll) keeps the full screen for the viewfinder. */
html.doc-scroll main { display: block; max-width: 760px; margin-inline: auto; }
html.doc-scroll #product { overflow: visible; }
html.doc-scroll #product .blocks { padding-bottom: 0; }
/* And a second "Scan another" at the END of the product (owner: "a second one
   at the bottom, that's fine"), in the page, never pinned. */
#product .primary.big { display: block; margin: var(--gap) auto calc(var(--gap) + env(safe-area-inset-bottom, 0px)); }
/* The cook page's full-screen button (cookpage .mark .go-deck): a filled pill,
   44 px tall, at the end of the header row. */
.header-scan { margin-inline-start: auto; min-height: 44px; padding: 0 16px; border-radius: 22px; font-size: 0.95em; width: auto; }
/* The ?diag=1 line is fixed but never a tap target: it must not take taps
   meant for the content scrolling under it. */
.gate-diag { pointer-events: none; }
/* The product title stays out of the "Scan another" column (owner, HomeView,
   2026-11-20: "Maybe title shouldn't be full width, so directly below scan
   another the title is not competing"): it wraps before the pill's column. */
html.doc-scroll #product .titles { padding-inline-end: 7.5em; }

/* Round 4 (owner, HomeView, 2026-11-20). */
/* The sheet's header stays ABOVE what scrolls in the sheet (the grade's A-E
   strip and its raised disc rode over it): its own stacking layer, opaque. */
.sheet-head { z-index: 5; background: var(--card); }
.sheet-body { position: relative; z-index: 0; }

/* THE info mark (BB.infoIcon, core.js): one drawing, one size per role. */
.bb-info { fill: currentColor; flex: none; display: block; }
.bb-info-head { width: 1.2em; height: 1.2em; }
.bb-info-sm { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; }

/* The legal line under the scanner and the typing form (owner, 2026-11-20). */
.legal-line { margin: var(--gap) auto 0; max-width: 32em; text-align: center; font-size: 0.8em; color: var(--muted); line-height: 1.4; }
.legal-line a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* The app plug (owner, 2026-11-20): one calm, themed card. The QR sits on its
   own WHITE tile in both themes (a phone camera reads dark modules on light),
   at a size a phone reads across a kitchen counter. */
.app-plug { display: flex; align-items: center; gap: 14px; margin: var(--gap) auto 0; padding: 12px; max-width: 30em;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; color: var(--ink); text-align: start; }
.app-plug[hidden] { display: none; }
.app-plug-qr { flex: none; width: 112px; height: 112px; background: #fff; border-radius: 10px; padding: 2px; }
.app-plug-qr svg { display: block; width: 100%; height: 100%; }
.app-plug-text { min-width: 0; margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.app-plug-lead { font-size: 0.95em; line-height: 1.35; color: var(--ink); }
/* THE [binnie] APP: the grade caption's own form (brand.js nameCaption), sized
   here from the OUTSIDE only (its em is relative), a touch larger than the
   grade's because it is the card's point. */
.app-plug-name { display: block; font-size: 1.14em; }
/* On the locked scanner frame it is a slim STRIP (owner, 2026-11-20, "Compact
   strip"): the full card took the camera from 203 px to 77 px. No second
   wordmark (the header has it), a 64 px QR beside the line. */
#scan .scan-foot { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
#scan .app-plug { padding: 6px 8px; gap: 8px; margin: 0; border-radius: 12px; max-width: 15em; }
#scan .app-plug-qr { width: 64px; height: 64px; border-radius: 6px; padding: 1px; }
#scan .app-plug-lead { font-size: 0.85em; }
#scan .app-plug-name { font-size: 1.03em; }

/* public-barcode-any-browser: the site's "Get the [binnie] app" row, top and bottom, off HomeView
   (barcode.js renderGetApp; the recipe pages' .egg-get-app look). */
.get-app { margin: var(--gap) auto; padding: 0 16px; max-width: 40em; text-align: center; }
/* The title is the recipe pages' .egg-get-app-title (css/recipe-egg.css), declaration for declaration:
   small caps ("GET THE [binnie] APP", owner 2026-12-01), the wordmark is artwork and keeps its own
   case. Mirrored rather than linked because /css is cached immutable and /barcode/ is not stamped;
   browser-extension/test/site/get-app-plug-parity.test.ts fails the build if the two ever differ.
   Scripts without case (ja, zh, ko, ar, hi, ...) are unaffected by uppercase. */
.get-app-title { margin: 0; font: 700 0.875rem/1.2 var(--font); letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-secondary, var(--muted)); text-align: center; }
.get-app .get-app-title { margin-bottom: 10px; }
.get-app .stores { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; }
/* binnie-food-root-is-scanner (owner 2026-12-02): the bridge into the app (barcode.js bridge()).
   The tagline wears getbinnie.app's hero kicker (website/css/style.css .hero-kicker: weight 800,
   -0.02em, the page's text colour), at a size for a row rather than a hero. The link is the
   page's accent, underlined, a full-size tap target. */
.get-app-tagline { margin: 0 0 6px; font: 800 1.25rem/1.25 var(--font); letter-spacing: -0.02em; color: var(--ink); }
.get-app-learn { display: inline-block; min-height: 44px; line-height: 44px; padding: 0 8px; font: 600 1rem var(--font); color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.get-app-learn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
/* The get-app title (+ the bottom row's tagline) as ONE link to getbinnie.app (barcode.js bridge):
   the heading's look at rest, the tagline's flow on hover / focus (recipe-egg.css, same rule), a
   ring for the keyboard. */
.get-app-head { display: flex; flex-direction: column; align-items: center; gap: 6px; color: inherit; text-decoration: none; cursor: pointer; border-radius: 10px; }
.get-app-flow { background: var(--flow-swoosh) 0 100% / 0% 0.36em no-repeat; -webkit-box-decoration-break: clone; box-decoration-break: clone; padding-bottom: 0.3em; }
.get-app-flow:dir(rtl) { background-position: 100% 100%; } /* draws from the reading edge */
.get-app-head:hover .get-app-flow, .get-app-head:focus-visible .get-app-flow { background-size: 100% 0.36em; }
.get-app-head:hover .swoosh-ink, .get-app-head:focus-visible .swoosh-ink { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .get-app-flow { transition: background-size 360ms cubic-bezier(0.2, 0.7, 0.2, 1); }
  .get-app .swoosh-ink { transition: opacity 160ms ease; }
}
.get-app-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
html.doc-scroll .get-app[data-get-app="bottom"] .get-app-head { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 6px 14px; }
.get-app .stores a { display: block; line-height: 0; border-radius: 10px; }
.get-app .stores img { display: block; height: 44px; width: auto; }
/* The product view's row (owner 2026-12-01): under the brand line, centred in the reading column
   as the recipe pages centre theirs; the top row stays for the camera view and is not shown while
   a product is (doc-scroll = the product state). */
.get-app-in-product { margin: 12px 0 var(--gap); padding: 0; max-width: none; }
html.doc-scroll .get-app[data-get-app="top"] { display: none; }
/* The BOTTOM row (owner 2026-12-01, "on this page the bottom plug is not needed, at least not at
   this size"): none on the short pages (camera, code entry, a not-found message), where the top row
   is enough; on the long product page one compact line that closes the page without shouting: the
   small-caps title beside smaller badges, wrapping under it only where a phone is too narrow. */
html:not(.doc-scroll) .get-app[data-get-app="bottom"] { display: none; }
/* binnie-food-root-is-scanner (owner 2026-12-02): the short screens without a camera (code entry, a
   not-found message) keep 12-01's rule (no bottom title, no second set of badges) but show the
   BRIDGE alone below the content: the app's
   tagline over "Learn more about {app}". Only when bridge() drew it (has-bridge): never an empty
   row. #scan fills the first screen, so this sits below it, never above the scanner. */
/* barcode-page-trust-tagline (owner 2026-12-05): that row is now the whole get-app block, the small
   "GET THE binnie APP" eyebrow over the swooshed tagline, with the store buttons BESIDE them ("This
   panel should not take up too much vertical space, so maybe put affordances next to each other"):
   one row where it fits, text over buttons on a phone. */
html:not(.doc-scroll) .get-app[data-get-app="bottom"].has-bridge:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 28px; }
html:not(.doc-scroll) .get-app[data-get-app="bottom"].has-bridge .get-app-head { align-items: flex-start; gap: 2px; }
html:not(.doc-scroll) .get-app[data-get-app="bottom"].has-bridge .get-app-title { margin: 0; font-size: 0.75rem; text-align: start; }
html:not(.doc-scroll) .get-app[data-get-app="bottom"].has-bridge .get-app-tagline { margin: 0; text-align: start; }
@media (max-width: 599px) {
  html:not(.doc-scroll) .get-app[data-get-app="bottom"].has-bridge .get-app-head { align-items: center; }
  html:not(.doc-scroll) .get-app[data-get-app="bottom"].has-bridge .get-app-title,
  html:not(.doc-scroll) .get-app[data-get-app="bottom"].has-bridge .get-app-tagline { text-align: center; }
}
/* The narrowest phones: the tagline one size down so it keeps ONE line (measured at 320px). */
@media (max-width: 359px) {
  html:not(.doc-scroll) .get-app[data-get-app="bottom"].has-bridge .get-app-tagline { font-size: 1.1rem; }
}
/* The CAMERA screen (owner 2026-12-02): no bottom bridge, the camera keeps its height; its bridge
   is the link beside "Type it instead" (#scan .scan-learn). */
html.scan-state .get-app[data-get-app="bottom"] { display: none !important; }
/* No side padding and a 4px gap (measured, every language at 360/375; ml at 360 fit to the pixel at 6px): the link's 44px tap height is
   kept, and those ~20px are what let it fit beside "Type it instead" instead of taking a row of camera. */
#scan .scan-learn { min-height: 44px; line-height: 44px; padding: 0; font-size: 0.95em; }
html:not(.is-homeview) #scan .scan-foot { column-gap: 4px; }
html.doc-scroll .get-app[data-get-app="bottom"] { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; margin-block: 8px var(--gap); }
html.doc-scroll .get-app[data-get-app="bottom"][hidden] { display: none; }
html.doc-scroll .get-app[data-get-app="bottom"] .get-app-title { margin: 0; }
html.doc-scroll .get-app[data-get-app="bottom"] .stores { gap: 8px; }
html.doc-scroll .get-app[data-get-app="bottom"] .stores img { height: 32px; }

/* The site footer (owner 2026-12-01), the recipe pages' .footer (css/style.css) in /barcode's
   tokens (--line, --ink, --muted, --accent), its brand linking to getbinnie.app. */
.site-footer { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center;
  margin-top: var(--gap); padding: 40px 16px; border-top: 1px solid var(--line); }
.site-footer[hidden] { display: none; }
/* Product view only (doc-scroll): the camera and code-entry views stay exactly as they were. */
html:not(.doc-scroll) .site-footer { display: none; }
.site-footer .footer-brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; border-radius: 8px; }
.site-footer .footer-brand img { width: 28px; height: 28px; }
.site-footer .footer-wordmark { font-size: 1rem; font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; }
.site-footer .footer-links { display: block; text-align: center; text-wrap: balance; line-height: 2; margin-inline: -12px; }
.site-footer .footer-links a { display: inline-block; white-space: nowrap; margin-inline: 12px; font-size: 0.85rem; color: var(--muted); }
.site-footer .footer-links a:hover { color: var(--accent); }
.site-footer .footer-copyright { margin: 0; font-size: 0.8rem; color: var(--muted); }
.site-footer .footer-trademarks { margin: 4px 0 0; font-size: 0.7rem; color: var(--muted); }
.site-footer a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* binnie-food-home-explains-scanning: two calm lines under the scanner, never above it. */
.scan-why { max-width: 34rem; margin: 0.75rem auto 0; padding: 0 1rem; text-align: center; }
.scan-why p { margin: 0.25rem 0; font-size: 0.875rem; line-height: 1.4; color: var(--muted, #6b5a62); }
.scan-why p:first-child { color: inherit; }
