/* ═══════════════════════════════════════════════════════════════════════════
 * BaliBetween — the Stitch composition layer
 *
 * WHAT THIS FILE IS
 * -----------------
 * The founder-approved Stitch homepage (`stitch_balibetween_design_system/
 * bb_cns_01_homepage_explore_desktop/{screen.png,code.html}` and
 * `..._mobile/{screen.png,code.html}`) approved as a *composition replacement*:
 * the page's structure is the ten Stitch regions, and the shared public chrome
 * (header + footer) is restyled into the same system. It is loaded AFTER
 * `site.css` and `editorial.css`, and it is scoped to the two things it owns:
 *
 *   1. the shared public chrome — the header and the footer; and
 *   2. the homepage composition — `views/public/home.ts`, whose every class is
 *      prefixed `bb-`.
 *
 * Nothing else on the public site is restyled here. `/services`, `/trust`,
 * `/how-it-works`, the guides and `/find` keep the BB-DS styles they were
 * reviewed with; that is why this is a separate file rather than edits to
 * `site.css`, which every public page loads.
 *
 * WHY THE COLOUR BLOCK BELOW DOES NOT ONLY USE `tokens.css`
 * ---------------------------------------------------------
 * The Stitch screen carries an authoritative token table in the `tailwind-config`
 * script at the tail of its `code.html`: primary `#000000`, primary-container
 * `#1c1b1b`, surface/background `#fbf9f5`, surface-container-low `#f5f3ef`,
 * surface-container-lowest `#ffffff`, secondary `#a53b23`, outline-variant
 * `#c4c7c7`, on-surface `#1b1c1a`.
 *
 * Four of those are the same VALUE the BB-DS tokens already carry
 * (`--bg` `#FBF9F5`, `--surface` `#FFFFFF`, `--muted` and so on) and are bound to
 * them below. Four are NOT: `tokens.css` carries `--fg: #181818` where Stitch
 * says `#000000`, `--surface-warm: #F3EFE8` where Stitch says `#f5f3ef`,
 * `--accent: #A83D25` where Stitch says `#a53b23`, and it has no
 * `outline-variant` at all. Rather than edit the shared token file — which would
 * move the booking surface and every other page — the four differing values are
 * declared ONCE here, in a named `--bb-stitch-*` block, with the reason. There
 * is no second vocabulary: where BB-DS and Stitch agree, the BB-DS token is the
 * value.
 *
 * TYPOGRAPHY
 * ----------
 * Sizes and line-heights are the BB-DS scale from `tokens.css`
 * (`--bb-display-hero` 56/64, `--bb-headline-lg` 40/48, `--bb-headline-md`
 * 28/36, `--bb-headline-sm` 22/28, `--bb-title-editorial` 18/24,
 * `--bb-body-lg` 17/28, `--bb-body-md` 15/24, `--bb-body-sm` 13/20,
 * `--bb-label-data` 12/16, `--bb-price` 20/24). The letter-spacings are the
 * Stitch table's own, because BB-DS does not declare them: `label-caps` is
 * 11px/14px/0.14em/600, which is why `--bb-stitch-caps-tracking` exists rather
 * than reusing `--bb-micro-tracking`'s 0.2em. No font is introduced: headings
 * are `--font-display` (Newsreader), everything else `--font-body`
 * (Plus Jakarta Sans), both already self-hosted and declared in `site.css`.
 *
 * NO INLINE STYLES ANYWHERE. The CSP is `style-src 'self'`, so every value in
 * this file is a class. The markup it styles contains not one `style` attribute.
 * ═══════════════════════════════════════════════════════════════════════════ */

/* ── the Stitch token block ──────────────────────────────────────────────── */

.site {
  /* Bound to the BB-DS token where the value is identical. */
  --bb-stitch-surface: var(--bg); /* #fbf9f5 — surface / background */
  --bb-stitch-surface-lowest: var(--surface); /* #ffffff — surface-container-lowest */
  --bb-stitch-on-dark: var(--bg); /* #fbf9f5 — text on the dark fields */
  --bb-stitch-outline: var(--bb-sand); /* the BB-DS metadata line, unchanged */

  /* Stitch's own values, where BB-DS differs. Declared once, named, explained. */
  --bb-stitch-primary: #000000; /* primary — solid actions only */
  --bb-stitch-primary-container: #1c1b1b; /* the dark hero / protocol field */
  --bb-stitch-surface-low: #f5f3ef; /* the one recessed band */
  --bb-stitch-secondary: #a53b23; /* rust — accent only, never a flood fill */
  --bb-stitch-outline-variant: #c4c7c7; /* hairline containment */
  --bb-stitch-on-surface: #1b1c1a; /* body ink */
  --bb-stitch-on-surface-variant: #444748; /* secondary ink */
  --bb-stitch-on-dark-soft: #e4e2de; /* standfirst on the dark fields */

  /* The Stitch table's two "on dark" accents. `secondary-fixed` exists in that table
     for exactly this job — a rust-family label on a dark field — and it is used here
     rather than the flat rust, which measures 2.66:1 against #1c1b1b and fails at
     11px. Measured after this change: 13.1:1. */
  --bb-stitch-secondary-fixed: #ffdad2;

  /* The translucent chrome surface: `bg-surface/90` from the Stitch header. */
  --bb-stitch-chrome: rgba(251, 249, 245, 0.9);

  /* Geometry: the Stitch measure and its three margins. */
  --bb-stitch-measure: 1440px;
  --bb-stitch-edge-desktop: 4rem; /* 64px */
  --bb-stitch-edge-tablet: 2.5rem; /* 40px */
  --bb-stitch-edge-mobile: 1.25rem; /* 20px */

  /* Section rhythm: the Stitch 4.5rem / 6.5rem scale. */
  --bb-stitch-y-sm: 4.5rem;
  --bb-stitch-y-lg: 6.5rem;

  /* The chrome heights are declared on the ROOT (see below), because the scrolling
     element needs `--bb-stitch-head-h` for `scroll-padding-top`. */

  /* The Stitch table's phone display size: `display-hero-mobile` 38px / 44px. */
  --bb-stitch-display-hero-mobile: 38px;
  --bb-stitch-display-hero-mobile-line: 44px;

  /* The Stitch letter-spacing table. */
  --bb-stitch-track-display: -0.02em;
  --bb-stitch-track-headline-lg: -0.015em;
  --bb-stitch-track-headline-md: -0.01em;
  --bb-stitch-track-body-lg: -0.005em;
  --bb-stitch-track-price: -0.02em;
  --bb-stitch-caps-tracking: 0.14em;
  --bb-stitch-data-tracking: 0.04em;

  /* The header is sticky, so the document still reserves its height or the first
     section sits underneath it at scroll 0. One number, used by the bar and the
     reserve: the same rule the bottom dock already follows
     (`--bb-mobile-bottom-nav-height`). Declared on the ROOT below, because the
     scrolling element (`<html>`) needs it too. */
  padding-top: calc(var(--bb-stitch-head-h) + env(safe-area-inset-top));
}

/*
 * THE HEADER HEIGHT LIVES ON THE ROOT, BECAUSE THE SCROLL CONTAINER IS `<html>`.
 *
 * Three things need the same number: the bar's own height, the document's
 * reservation for it, and `scroll-padding-top` — which is what makes the skip link
 * land `#main` BELOW the bar instead of under it (t6, A8R-D3). Scroll padding
 * belongs to the scrolling element, and the scrolling element here is the
 * document, so the token is declared once on the root and inherited by both.
 */
:root {
  --bb-stitch-header-h: 80px;
  --bb-stitch-topbar-h: 56px;
  --bb-stitch-head-h: var(--bb-stitch-topbar-h);
}

@media (min-width: 700px) {
  :root {
    --bb-stitch-head-h: var(--bb-stitch-header-h);
  }
}

html {
  scroll-padding-top: calc(var(--bb-stitch-head-h) + env(safe-area-inset-top));
}

/* The Stitch measure. `.wrap` already applies the gutter, so this narrows the canvas
   from the BB-DS 1600px to the Stitch 1440px — and it can only do that because it is
   at least as specific as `.site .wrap` and comes later.
 *
 * THE EDGE IS THE REFERENCE'S 40px, NOT THE BB-DS 64–80px (t6, V-6).
 *
 * The approved screen is `mx-auto max-w-[1440px] px-gutter-desktop`, and its own
 * theme declares `gutter-desktop: 2.5rem` — 40px. The first implementation kept the
 * BB-DS `clamp(4rem, 6vw, 5rem)`, which measures 80px at 1440 and 76.8px at 1280:
 * a page edge twice the reference at 1440, a narrower column (1280px against the
 * reference's 1360px) and a 24px gutter against the reference's 40px, so the 3-up
 * cards rendered 411px where the reference's are ~427px. Both numbers are now the
 * reference's, and the column gap below follows the same token.
 *
 * Below 1000px the BB-DS gutter stays, because the reference's phone and tablet
 * edges (20px, 40px) are what `--gutter` already resolves to there. */
.site .wrap--stitch {
  max-width: var(--bb-stitch-measure);
}

@media (min-width: 1000px) {
  .site .wrap--stitch {
    padding-inline: var(--bb-stitch-gutter-desktop);
  }
}

/* The reference's own desktop spacing unit: `gutter-desktop` 2.5rem = 40px. */
:root {
  --bb-stitch-gutter-desktop: 2.5rem;
}

/* ── type roles, exactly as the Stitch table declares them ──────────────── */

.site .bb-title-display,
.site .bb-title-hero {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--bb-display-hero);
  font-weight: 400;
  line-height: var(--bb-display-hero-line);
  letter-spacing: var(--bb-stitch-track-display);
  color: inherit;
}

.site .bb-title-lg {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--bb-headline-lg);
  font-weight: 400;
  line-height: var(--bb-headline-lg-line);
  letter-spacing: var(--bb-stitch-track-headline-lg);
  color: var(--bb-stitch-on-surface);
}

.site .bb-title-md {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--bb-headline-md);
  font-weight: 400;
  line-height: var(--bb-headline-md-line);
  letter-spacing: var(--bb-stitch-track-headline-md);
  color: var(--bb-stitch-on-surface);
}

.site .bb-title-sm {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--bb-headline-sm);
  font-weight: 500;
  line-height: var(--bb-headline-sm-line);
  color: var(--bb-stitch-on-surface);
}

.site .bb-title-editorial {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--bb-title-editorial);
  font-weight: 400;
  line-height: var(--bb-title-editorial-line);
  color: var(--bb-stitch-on-surface);
}

.site .bb-body-lg {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--bb-body-lg);
  font-weight: 400;
  line-height: var(--bb-body-lg-line);
  letter-spacing: var(--bb-stitch-track-body-lg);
}

.site .bb-body-md {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--bb-body-md);
  font-weight: 400;
  line-height: var(--bb-body-md-line);
}

.site .bb-body-sm {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--bb-body-sm);
  font-weight: 400;
  line-height: var(--bb-body-sm-line);
}

/* 11px / 14px / 0.14em / 600. The caps tracking is the Stitch table's, not
   `--bb-micro-tracking`'s 0.2em; see the file header. */
.site .bb-caps {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--bb-micro-size);
  font-weight: var(--bb-micro-weight);
  line-height: var(--bb-micro-line);
  letter-spacing: var(--bb-stitch-caps-tracking);
  text-transform: uppercase;
  color: var(--bb-stitch-on-surface-variant);
}

.site .bb-caps--rust {
  color: var(--bb-stitch-secondary);
}

.site .bb-data {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--bb-label-data);
  font-weight: 500;
  line-height: var(--bb-label-data-line);
  letter-spacing: var(--bb-stitch-data-tracking);
  color: var(--bb-stitch-on-surface-variant);
}

.site .bb-price {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--bb-price);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: var(--bb-stitch-track-price);
  font-variant-numeric: tabular-nums;
  color: var(--bb-stitch-on-surface);
}

/* ── the header ─────────────────────────────────────────────────────────── */

/*
 * THE HEADER YIELDS AT THE END OF THE DOCUMENT, AND THAT IS WHAT FIXES V-3.
 *
 * The header is `position: fixed`, so at maximum scroll it sat over whatever the
 * viewport's top band contained. On `/` at 360, 390, 430 and 768 that was footer
 * links — the accessibility harness recorded `header.site-head (56px tall) covers
 * 88 per cent of "Jimbaran"` on every public route at phone widths — and because the
 * document is already at its end, the frame cannot be scrolled clear.
 *
 * No CSS geometry escapes this while the bar is painted: the footer is taller than
 * the viewport at phone and tablet widths (measured 1749px of footer against an
 * 800px viewport at 360), so SOME text is always in the top band at maximum scroll.
 * Trailing space makes it worse, not better — padding below the footer moves the
 * footer's text UP relative to the viewport at maximum scroll.
 *
 * So the bar yields: a scroll-driven animation fades it out and lifts it away over
 * the LAST 10% of the scroll, which is the band in which the footer is arriving. At
 * maximum scroll the bar is at opacity 0, so it is not a layer at all — nothing is
 * behind it and nothing is covered. Scrolling back up brings it straight back.
 *
 * Two properties matter and both are measured:
 *   - `opacity: 0` (not only a transform) is what makes the bar stop counting as an
 *     overlay: the harness's occlusion check skips layers whose opacity is 0.
 *   - The whole rule sits inside `@supports (animation-timeline: scroll())`. Without
 *     the guard, a browser that supports `animation` but not scroll timelines would
 *     run this as a 0s time-based animation and hide the bar immediately.
 *
 * The alternative that was tried and rejected: `position: sticky` inside a container
 * spanning the header and `main`. It fixed `/` and broke every short route — measured
 * on `/bookings-guest`, `/articles` and `/search-bare` at phone and laptop widths, the
 * bar came to rest in the MIDDLE of the viewport at the container's end and covered
 * 45–100% of a text node there, which is worse than the defect it removed.
 */
@keyframes bb-head-yield {
  to {
    opacity: 0;
    transform: translateY(-100%);
  }
}

@supports (animation-timeline: scroll()) {
  .site .site-head {
    animation-name: bb-head-yield;
    animation-duration: auto;
    animation-timing-function: linear;
    animation-fill-mode: both;
    animation-timeline: scroll(root block);
    animation-range: 90% 100%;
  }
}

.site .site-head {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--bb-z-header);
  /* EXACTLY the Stitch header height, INCLUDING its hairline. The border is inside
     the box, so the bar is 80px on desktop and 56px on a phone rather than 81 and
     57 — the acceptance names 80, and a bar that is one pixel taller than its own
     reservation is the defect class the bottom dock already taught this codebase. */
  height: calc(var(--bb-stitch-head-h) + env(safe-area-inset-top));
  background: var(--bb-stitch-chrome);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.site .bb-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--space-1);
  height: 100%;
  min-height: 0;
  padding-block: 0;
}

/* The 32px black square that carries the canonical emblem.
 *
 * The Stitch prototype draws a `⧉` placeholder glyph here because a prototype has
 * no logo. The real value for that slot is the brand's own canonical mark, so the
 * square holds it: the same geometry the mark file defines, in its own colours,
 * on a bone plate inside the black tile. Nothing is redrawn and nothing is
 * recoloured — `bb-ds-components.test.ts` forbids reconstructing the mark, and a
 * knockout or filter treatment would be exactly that. */
.site .brand-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  background: var(--bb-stitch-primary);
  border-radius: var(--bb-radius-sm);
}

.site .brand-glyph .brand-mark {
  width: 24px;
  height: 24px;
  padding: 1px;
  background: var(--bb-stitch-surface);
}

/* The header lockup: emblem in its square, then the wordmark with the coordinate
   micro-line beneath it — the composition the Stitch header draws. The selectors
   are the lockup's own (`.brand`, `.brand-text`, `.brand-name`) because
   `brandLockup()` owns that markup, and a second set of header-only classes would
   be a second lockup. */
.site .brand {
  gap: var(--space-2);
  min-height: var(--bb-touch-min);
}

.site .brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.site .brand--horizontal .brand-name {
  font-size: var(--bb-title-editorial);
  line-height: 1.2;
  letter-spacing: var(--bb-stitch-track-headline-md);
  text-transform: uppercase;
  color: var(--bb-stitch-on-surface);
  white-space: nowrap;
}

/* The coordinate micro-line. The Stitch header renders a precision coordinate
   under the wordmark; a coordinate is a fixture claim about a measured position
   this product does not hold (it records no provider coordinates at all, as
   `/near-me` states), so the slot carries a real, checkable fact about where the
   service operates instead. The role — a tracked data micro-line in the header
   lockup — is preserved. */
.site .bb-coord {
  display: block;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: var(--bb-stitch-data-tracking);
  text-transform: uppercase;
  color: var(--bb-stitch-on-surface-variant);
  white-space: nowrap;
}

.site .site-nav ul {
  gap: var(--space-3);
}

.site .site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--bb-touch-min);
  padding-block: 0;
  font-family: var(--font-body);
  font-size: var(--bb-micro-size);
  font-weight: var(--bb-micro-weight);
  line-height: var(--bb-micro-line);
  letter-spacing: var(--bb-stitch-caps-tracking);
  text-transform: uppercase;
  color: var(--bb-stitch-on-surface-variant);
  border-bottom: 1px solid transparent;
}

.site .site-nav a[aria-current='page'] {
  color: var(--bb-stitch-primary);
  font-weight: 700;
  border-bottom-color: var(--bb-stitch-primary);
}

/* THE DESKTOP NAVIGATION IS A BARE `<nav>`, NOT A NEUTRALISED `<details>`.
 *
 * A closed `<details>` does not paint its non-summary content just because a
 * descendant is set to `display: block`, and at 1280/1440 the disclosure in the
 * previous header collapsed to `width: 0px` and painted nothing across seven
 * destinations (docs/design/evidence/2026-10/REVIEW.md, Worst #1). The
 * disclosure stays for the widths where a menu control is the right affordance;
 * from 1000px up it is removed from the layout entirely rather than neutralised,
 * so that failure mode cannot come back.
 *
 * THE BREAKPOINT IS 1000px, AND THE FIRST VERSION OF THIS FILE GOT IT WRONG.
 *
 * It was 1200px, on the reasoning that nine destinations at 11px tracked caps need
 * more room than 1024px gives. What that missed is `site.css`'s own rule:
 * `@media (min-width: 1000px) { .site-nav { display: block !important } }` — which
 * applies to the nav INSIDE the closed disclosure as well. Between 1000px and
 * 1199px the disclosure was therefore laid out as a zero-width box with nine
 * stacked destinations, and `smoke:gutter` measured the consequence on all 34 routes
 * at 1024px: `li "Near Me"` at L1179/R-214 and the primary action pushed to
 * L989/R-27, i.e. a clipped control in the header. Exactly the defect the previous
 * header shipped, one layer down.
 *
 * So the desktop nav starts where `site.css` starts treating a nav as desktop, the
 * disclosure is hidden from that same width, and the row is made to fit by tightening
 * the nav rather than by dropping a destination: at 1000–1199px the links step down
 * to `--bb-micro-floor` (10px, the bottom of BB-DS-00's stated micro-label band) with
 * 0.06em tracking and an 8px column gap, the area selector stands down because the
 * nav carries "Near Me", and the primary action keeps a 44px target with less
 * padding. Measured after the change at 1024px: the row fits inside the content box
 * with the CTA on screen (see `docs/evidence/visual-qa/stitch-home/report.json`).
 */
.site .site-nav--desk {
  display: none;
}

@media (min-width: 1000px) {
  .site .site-nav--desk {
    display: block;
  }

  .site .bb-disclosure {
    display: none;
  }

  /* The 1000–1199px squeeze. Measured at 1024px, the widest width in this band: the
     row needs 956px against a 944px content box, so it wrapped — `.bb-head` grew to
     100px inside the 80px bar and the end cluster painted below it. It was 12px short
     at 1024 and 36px short at 1000, so the whitespace between destinations comes all
     the way out (each link keeps its own inline padding and its 44px row height, so
     nothing becomes unpressable) and the action gives back some of its padding. The
     row is the same row; only the gaps change. */
  .site .site-nav--desk a {
    font-size: var(--bb-micro-floor);
    letter-spacing: 0.06em;
  }

  .site .site-nav--desk ul {
    gap: 0;
  }

  /* The row's own column gap comes out too, and the action label steps to the floor
     size the rest of this band uses. Measured: with the gaps at 4px the row needed
     948px against 920px at a 1000px viewport — 28px short — and the action's label is
     the one element here whose type is allowed to move, because it is a control label
     rather than body copy. Every target keeps its 44px row height. */
  .site .bb-head {
    column-gap: 0;
  }

  .site .bb-head__cta {
    font-size: var(--bb-micro-floor);
    letter-spacing: 0.06em;
  }

  .site .bb-head__area {
    display: none;
  }

  .site .bb-head__cta {
    padding-inline: var(--space-1);
  }

  .site .bb-head__search {
    padding-inline: 0;
  }
}

/*
 * 1200–1359px: THE DECLARED CAPS SIZE, WITH THE WHITESPACE GIVEN BACK (V-14).
 *
 * The reference's own row is a single band of 11px tracked caps, so the type stays
 * the declared `--bb-micro-size` here rather than dropping to the floor the
 * 1000–1199 band uses — the fix is the gap between destinations and the action's
 * padding, not the type. Measured at 1280 after this change: the row needs ~1125px
 * in a 1200px box.
 */
@media (min-width: 1200px) {
  /* Room again: back to the declared caps size and tracking. */
  .site .site-nav--desk a {
    font-size: var(--bb-micro-size);
    letter-spacing: var(--bb-stitch-caps-tracking);
  }

  /* 1200 is the tightest width in this band: brand 176 + nav 628 + end 309 needs
     1121px against a 1120px content box, so the destinations keep a 4px gap and the
     row's own gap comes out. At 1280 the same row has 79px of slack. */
  .site .site-nav--desk ul {
    gap: var(--space-1);
  }

  .site .bb-head {
    column-gap: 0;
  }

  .site .bb-head__cta {
    padding-inline: var(--space-3);
  }
}

/* 1360px and up: the fully relaxed row, with the quiet link and the widest gaps. */
@media (min-width: 1360px) {
  .site .site-nav--desk ul {
    gap: var(--space-3);
  }

  .site .bb-head {
    column-gap: var(--space-1);
  }

  .site .bb-head__cta {
    font-size: var(--bb-micro-size);
    letter-spacing: var(--bb-stitch-caps-tracking);
    padding-inline: var(--space-5);
  }
}

.site .bb-head__end {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-inline-start: auto;
}

.site .bb-head__search {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--bb-touch-min);
  min-width: var(--bb-touch-min);
  padding-inline: var(--space-1);
  color: var(--bb-stitch-on-surface-variant);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: var(--bb-micro-size);
  font-weight: var(--bb-micro-weight);
  letter-spacing: var(--bb-stitch-caps-tracking);
  text-transform: uppercase;
}

.site .bb-head__search:hover,
.site .bb-head__quiet:hover,
.site .brand:hover .brand-name {
  color: var(--bb-stitch-primary);
}

.site .bb-head__search-label {
  display: inline;
}

.site .bb-head__quiet {
  display: none;
}

/* The area selector. On a phone this is the control the Stitch top bar carries
   beside the brand; it is a real link to the area chooser, not a picker that
   cannot open without JavaScript. */
.site .bb-head__area {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--bb-touch-min);
  min-width: var(--bb-touch-min);
  padding-inline: var(--space-2);
  border-radius: var(--bb-radius-pill);
  background: var(--bb-stitch-surface-low);
  color: var(--bb-stitch-on-surface);
  text-decoration: none;
}

.site .bb-head__area .bb-icon {
  color: var(--bb-stitch-secondary);
}

.site .bb-head__area-label {
  display: none;
  font-family: var(--font-body);
  font-size: var(--bb-label-data);
  font-weight: 500;
  letter-spacing: var(--bb-stitch-data-tracking);
}

/*
 * THE PHONE ROW'S FIT, MEASURED RATHER THAN GUESSED.
 *
 * At 390px the content box is 350px and the controls are: the lockup (glyph,
 * divider, wordmark, micro-line), the area selector, the search affordance and the
 * menu disclosure. With the area label and an 18px wordmark that row measured 381px
 * — so the menu control was clipped off the right edge, silently, because a fixed
 * `nowrap` row does not scroll and does not widen the document. Two admissions, both
 * bounded:
 *
 *   ≥ 520px  the area selector carries its label.
 *   < 420px  the wordmark steps down to 15px (the lockup itself is untouched).
 *
 * After both, the row measures 327px at 390 and 307px at 360 — inside the box at
 * every phone width the mandate names.
 */
@media (min-width: 520px) {
  .site .bb-head__area-label {
    display: inline;
  }
}

@media (max-width: 419px) {
  .site .brand--horizontal .brand-name {
    font-size: 15px;
  }

  /* 8px of slack at 360, so a font-fallback wordmark cannot push the menu control
     off the edge. The row fits exactly without it (measured at 346/346); exactly is
     not a margin. */
  .site .bb-head__search {
    padding-inline: 0;
  }
}

/* The desktop primary action — the compact Stitch button. It is deliberately a
   lower weight than the hero's: 44px against the hero submit's 60px, both in the
   system's own ink. */
.site .bb-head__cta {
  display: none;
  align-items: center;
  min-height: var(--bb-touch-min);
  padding-inline: var(--space-5);
  background: var(--bb-stitch-primary);
  color: var(--bb-stitch-surface);
  border-radius: var(--bb-radius-md);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: var(--bb-micro-size);
  font-weight: var(--bb-micro-weight);
  letter-spacing: var(--bb-stitch-caps-tracking);
  text-transform: uppercase;
}

.site .bb-head__cta:hover {
  background: var(--bb-stitch-secondary);
}

@media (min-width: 700px) {
  .site .bb-head__cta {
    display: inline-flex;
  }
}

/*
 * THE QUIET LINK APPEARS WHEN THE ROW HAS ROOM FOR IT — MEASURED, NOT GUESSED (t13, V-14).
 *
 * It used to reveal at 1280px, and at exactly 1280–1285 layout px the row was a few
 * pixels short: the flex row wrapped, `.bb-head` grew to 100px inside the 80px bar,
 * and the AREAS/SEARCH/FOR VENUES/REQUEST A TIME cluster painted 20px below the
 * header box and over the hero's top. 1275 was clean and 1286 was clean, so this was
 * a breakpoint gap that happened to contain a mandated viewport — the six-viewport
 * capture cannot see a 6px gap, which is why the sweep at 1px steps exists.
 *
 * The row's arithmetic at 1280 with the link shown: brand 176 + nav 624 + search 68
 * + quiet 88 + CTA 168 + gaps = ~1213px against a 1200px content box (1280 minus the
 * reference's 40px edges). With the link withheld, and with the whitespace the
 * 1200–1359 band gives back below, the same row needs ~1125px — 75px of slack at the
 * mandated width instead of a 13px deficit.
 */
@media (min-width: 1360px) {
  .site .bb-head__quiet {
    display: inline-flex;
    align-items: center;
    min-height: var(--bb-touch-min);
    color: var(--bb-stitch-on-surface-variant);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: var(--bb-micro-size);
    font-weight: var(--bb-micro-weight);
    letter-spacing: var(--bb-stitch-caps-tracking);
    text-transform: uppercase;
  }
}


/* The skip link must outrank the fixed header, which is now z-index 20. */
.site .skip-link {
  z-index: var(--bb-z-skip);
}

/* The disclosure, restyled as a Stitch control. Its existing `.nav-disclosure`
   class is kept so the shell's hard-won rules in `site.css` — the open list
   wrapping inside 360px, the demotion onto pages that carry the dock — keep
   applying. */
.site .nav-disclosure summary {
  min-height: var(--bb-touch-min);
  min-width: var(--bb-touch-min);
  padding-inline: var(--space-2);
  border: 0;
  border-radius: var(--bb-radius-md);
  color: var(--bb-stitch-on-surface);
  font-family: var(--font-body);
  font-size: var(--bb-micro-size);
  font-weight: var(--bb-micro-weight);
  letter-spacing: var(--bb-stitch-caps-tracking);
  text-transform: uppercase;
}

.site .nav-disclosure[open] summary {
  color: var(--bb-stitch-primary);
  border-color: transparent;
}

.site .nav-disclosure[open] .site-nav {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  background: var(--bb-stitch-surface);
  border-bottom: 1px solid var(--bb-stitch-outline-variant);
  padding: var(--space-5) var(--gutter) var(--space-6);
  max-height: 70vh;
  overflow-y: auto;
}

.site .nav-disclosure[open] .site-nav ul {
  flex-wrap: wrap;
}

/* ── the footer ─────────────────────────────────────────────────────────── */

.site .site-foot {
  margin-top: var(--bb-stitch-y-lg);
  padding-block: var(--bb-stitch-y-lg) var(--space-8);
  background: var(--bb-stitch-surface);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.site .foot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 700px) {
  .site .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .site .foot-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--space-6);
  }

  .site .foot-brand {
    grid-column: span 3;
  }

  .site .foot-col {
    grid-column: span 2;
  }

  .site .foot-col--wide {
    grid-column: span 3;
  }
}

.site .foot-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
}

.site .foot-brand .brand {
  align-items: flex-start;
  min-height: var(--bb-touch-min);
}

.site .foot-brand .brand-mark {
  width: 24px;
  height: 24px;
}

.site .foot-note {
  max-width: 42ch;
  color: var(--bb-stitch-on-surface-variant);
}

.site .foot-col h4 {
  margin: 0 0 var(--space-5);
  font-family: var(--font-body);
  font-size: var(--bb-micro-size);
  font-weight: var(--bb-micro-weight);
  line-height: var(--bb-micro-line);
  letter-spacing: var(--bb-stitch-caps-tracking);
  text-transform: uppercase;
  color: var(--bb-stitch-on-surface);
}

.site .foot-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0;
  white-space: normal;
}

/* 16px, not the Stitch footer's `body-sm` 13px. A footer link is a control, and
 * 16px is the size `site.css` already declares for the public surface's controls
 * and inputs; there is no reason for a navigation label to be smaller than the
 * field beside it. (ACCESSIBILITY_REQUIRED — see the note at the end of the
 * file.) */
.site .foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--bb-touch-min);
  color: var(--bb-stitch-on-surface-variant);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
}

.site .foot-nav a:hover,
.site .foot-contact a:hover {
  color: var(--bb-stitch-on-surface);
}

.site .foot-contact {
  display: flex;
  flex-direction: column;
  gap: 0;
  color: var(--bb-stitch-on-surface-variant);
}

.site .foot-contact a {
  display: inline-flex;
  align-items: center;
  min-height: var(--bb-touch-min);
  color: var(--bb-stitch-on-surface);
  font-family: var(--font-body);
  font-size: var(--text-base);
  text-decoration: underline;
}

.site .bb-media-note {
  margin-top: var(--space-8);
  color: var(--bb-stitch-on-surface-variant);
}

.site .foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--bb-stitch-y-sm);
  padding-top: var(--space-5);
  border-top: 1px solid var(--bb-stitch-outline-variant);
}

/* The honesty sentence lives in the footer of every route. It is a product rule,
   not marketing copy: it says what the site refuses to do. */
.site .foot-honesty {
  max-width: 62ch;
  margin: 0;
  color: var(--bb-stitch-on-surface-variant);
}

/* ── shared composition primitives ──────────────────────────────────────── */

.site .bb-band {
  padding-block: var(--bb-stitch-y-sm);
}

@media (min-width: 700px) {
  .site .bb-band {
    padding-block: var(--bb-stitch-y-lg);
  }
}

.site .bb-band--dark {
  position: relative;
  background: var(--bb-stitch-primary-container);
  color: var(--bb-stitch-on-dark);
}

.site .bb-band--low {
  background: var(--bb-stitch-surface-low);
}

.site .bb-band--lowest {
  background: var(--bb-stitch-surface-lowest);
}

.site .bb-bandhead {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.site .bb-bandhead--row {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

@media (min-width: 700px) {
  .site .bb-bandhead--row {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

/* The rust dot. Rust is the reserved accent: the only large dark fields on this
   page are the hero and the protocol band, and rust never fills anything. */
.site .bb-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--bb-stitch-secondary);
}

.site .bb-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--bb-radius-md);
  background: var(--bb-stitch-surface-low);
}

.site .bb-frame .bb-picture,
.site .bb-frame .bb-picture__img {
  display: block;
  width: 100%;
  height: 100%;
}

.site .bb-frame__img {
  object-fit: cover;
}

/*
 * THE OVERLAY CAPTION CARRIES ITS OWN SURFACE, AND THERE IS NO SCRIM.
 *
 * The first version drew a gradient scrim over the photograph and put the caption
 * text on it. `REFERENCE_LOCK.md:455` permits that ("no gradient scrim except where
 * text must sit on" an image) — but a permitted device is not a required one, and
 * `DESIGN.md:51` with `FOUNDATIONS.md:53` forbid gradients that are DECORATIVE.
 * Once the caption carries its own surface it no longer depends on the scrim for
 * legibility, so the scrim would have been exactly the decoration those two
 * documents refuse. It is gone; the page now paints no gradient anywhere, and
 * `scripts/smoke/no-ai-smell-probe.mjs` reports category 5 with zero gradient
 * samples.
 *
 * MEASURED, so the claim can be checked. The caption is `--bb-stitch-on-dark`
 * (#fbf9f5) at 12px on `rgba(28, 27, 27, 0.85)`; over the brightest possible image
 * pixel (white) that surface composites to `rgb(62, 62, 62)`, whose relative
 * luminance is 0.0481 against the caption's 0.9469 — a contrast ratio of 10.2:1,
 * against the 4.5:1 WCAG AA requires at this size.
 */
.site .bb-hero__caption {
  position: absolute;
  inset: var(--space-4) var(--space-4) auto auto;
  display: block;
  max-width: 26ch;
  padding: var(--space-2) var(--space-3);
  background: rgba(28, 27, 27, 0.85);
  border-radius: var(--bb-radius-sm);
  color: var(--bb-stitch-on-dark);
  text-align: right;
}

.site .bb-hero__caption .bb-data {
  color: inherit;
}

.site .bb-card {
  display: flex;
  flex-direction: column;
  background: var(--bb-stitch-surface-lowest);
  border: 1px solid var(--bb-stitch-outline-variant);
  border-radius: var(--bb-radius-md);
  overflow: hidden;
}

.site .bb-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  flex: 1;
}

.site .bb-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--bb-stitch-surface-low);
  border-radius: var(--bb-radius-sm);
}

.site .bb-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5) var(--space-5);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.site .bb-lede {
  margin: 0;
  max-width: 62ch;
  color: var(--bb-stitch-on-surface-variant);
}

.site .bb-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--bb-touch-min);
  color: var(--bb-stitch-primary);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: var(--bb-micro-size);
  font-weight: var(--bb-micro-weight);
  letter-spacing: var(--bb-stitch-caps-tracking);
  text-transform: uppercase;
}

.site .bb-link:hover {
  color: var(--bb-stitch-secondary);
}

.site .bb-link .bb-icon {
  width: 16px;
  height: 16px;
}

.site .bb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--bb-touch-min);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--bb-radius-md);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: var(--bb-micro-size);
  font-weight: var(--bb-micro-weight);
  line-height: var(--bb-micro-line);
  letter-spacing: var(--bb-stitch-caps-tracking);
  text-transform: uppercase;
  text-align: center;
}

.site .bb-btn--primary {
  background: var(--bb-stitch-primary);
  color: var(--bb-stitch-surface);
}

.site .bb-btn--primary:hover {
  background: var(--bb-stitch-secondary);
}

.site .bb-btn--light {
  background: var(--bb-stitch-surface);
  color: var(--bb-stitch-primary);
}

.site .bb-btn--light:hover {
  background: var(--bb-stitch-secondary);
  color: var(--bb-stitch-surface);
}

.site .bb-btn--block {
  width: 100%;
}

/* ═══ REGION 2 — the dark editorial hero ═════════════════════════════════════ */

.site .bb-hero {
  padding-block: var(--space-8) var(--space-12);
}

@media (min-width: 700px) {
  .site .bb-hero {
    padding-block: var(--space-12) var(--bb-stitch-y-sm);
  }
}

.site .bb-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  /* `--space-10` does not exist in the token scale (which stops at `--space-12` but
     skips 7, 9, 10 and 11), so this gap was invalid at computed-value time and fell
     back to the initial `normal` — zero. Found by sweeping every custom property the
     six served stylesheets use, which is the check this team added after a missing
     token rendered invisible labels on `/search`. 2rem is the intended rhythm here. */
  gap: var(--space-8);
  align-items: center;
}

@media (min-width: 1000px) {
  .site .bb-hero__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--space-6);
  }

  /* The asymmetric split: 7 / 5, exactly as the Stitch composition draws it. */
  .site .bb-hero__col {
    grid-column: span 7;
  }

  .site .bb-hero__media {
    grid-column: span 5;
  }
}

.site .bb-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  color: var(--bb-stitch-outline-variant);
}

/*
 * THE MICRO-LABELS ON THE DARK FIELDS ARE LIGHT, AND THEY ARE SCOPED TO THE DARK
 * SURFACES RATHER THAN TO `.bb-hero` AS A WHOLE.
 *
 * `.bb-caps` declares its own colour — #444748, the ink that is correct on bone —
 * so a caps label inside the dark hero inherited nothing and measured 1.83:1: the
 * eyebrow, the chip-row label and all four trust rules. The white cards INSIDE the
 * hero carry the same class and must stay dark, which is why these selectors name
 * the three dark areas instead of the hero.
 *
 * Measured after the change: `--bb-stitch-outline-variant` (#c4c7c7) on
 * `--bb-stitch-primary-container` (#1c1b1b) is 10.0:1.
 */
.site .bb-hero__eyebrow .bb-caps,
.site .bb-hero__chips > .bb-caps,
.site .bb-trust .bb-caps {
  color: var(--bb-stitch-outline-variant);
}

/* The dark protocol panel's own labels are light. Scoped to the TEXT column, not to
   the whole panel: the panel also contains a white caption card, and a light label on
   white measures 1.3:1. */
.site .bb-protocol__text .bb-caps {
  color: var(--bb-stitch-secondary-fixed);
}

.site .bb-hero__title {
  color: var(--bb-stitch-on-dark);
  text-wrap: balance;
}

/* The phone form's display size. The Stitch table declares `display-hero-mobile`
 * as 38px / 44px, and 56px on a 360px screen is not the approved composition. */
@media (max-width: 699px) {
  .site .bb-title-hero {
    font-size: var(--bb-stitch-display-hero-mobile);
    line-height: var(--bb-stitch-display-hero-mobile-line);
  }
}

/* The second line of the hero: italic Newsreader, set lighter than the first. */
.site .bb-hero__title-2 {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  color: var(--bb-stitch-on-dark-soft);
}

.site .bb-hero__standfirst {
  max-width: 52ch;
  margin: var(--space-5) 0 var(--space-8);
  color: var(--bb-stitch-on-dark-soft);
}

.site .bb-hero__frame {
  aspect-ratio: 4 / 5;
}

/*
 * The overlay caption carries its own surface — the plate is declared once, above,
 * with the measured contrast that licenses it. There is NO gradient scrim: the
 * scrim element was deleted, it is not in the DOM, and nothing in this file
 * references it any more. The keyboard focus ring on the dark hero is handled
 * separately — see the focus-ring rule at the end of this file.
 */
.site .bb-hero__caption .bb-data {
  color: inherit;
}

/* The availability-role card. The composition is the prototype's; the content is
   the truth: no time is held, and a time can only appear once a venue confirms
   one. Nothing here is a live figure, a count, or a provider. */
.site .bb-avail {
  position: absolute;
  inset: auto var(--space-4) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--bb-stitch-surface-lowest);
  border-radius: var(--bb-radius-md);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.28);
}

.site .bb-avail__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.site .bb-avail__title {
  color: var(--bb-stitch-on-surface);
}

.site .bb-avail__note {
  color: var(--bb-stitch-on-surface-variant);
}

.site .bb-avail .bb-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--bb-touch-min);
  height: var(--bb-touch-min);
  border-radius: 50%;
  background: var(--bb-stitch-primary);
  color: var(--bb-stitch-surface);
}

.site .bb-avail .bb-icon-btn:hover {
  background: var(--bb-stitch-secondary);
}

/* ── the four-field search card ─────────────────────────────────────────── */

.site .bb-searchcard {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--bb-stitch-surface-lowest);
  border: 1px solid var(--bb-stitch-outline-variant);
  border-radius: var(--bb-radius-md);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.3);
  /* The card is a light surface inside a dark field, so it carries its own ink
     rather than inheriting the field's. Without this, the control support text
     inside the card rendered in the hero's light `on-dark` colour on white:
     1.05:1, measured. */
  color: var(--bb-stitch-on-surface);
}

@media (min-width: 700px) {
  /*
   * TWO ROWS, AND THE MEASUREMENT IS WHY.
   *
   * The approved card is one row of four fields and a submit inside the hero's
   * seven-column half. Measured at 1280 that half is 647px wide, so a 12-column
   * single row gave the two selects 73px each — and "Morning, 09:00–12:00" at any
   * legible size is ~160px, so the selected value was cut to a fragment. The
   * reference itself does not have this problem because its own values are short
   * ("18:30 Tonight", "Petitenget & Seminyak"); the product's real window labels are
   * not.
   *
   * The composition is unchanged — one white card, four labelled fields in the
   * approved order, one solid black submit — and the fields are laid out so every
   * label and every value is fully legible at 700px and above. Measured after this
   * change: Where/What 285–291px, When 240–245px, Parties 143–148px, submit
   * 192–200px at 1280.
   */
  .site .bb-searchcard {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: stretch;
  }

  .site .bb-searchcard__field--where,
  .site .bb-searchcard__field--what {
    grid-column: span 6;
  }

  .site .bb-searchcard__field--when {
    grid-column: span 5;
  }

  .site .bb-searchcard__field--parties {
    grid-column: span 2;
  }

  .site .bb-searchcard__submit {
    grid-column: span 5;
  }
}

/* The cell is a LABEL WRAPPER, not a second field box. The control inside it
   carries the public surface's standard treatment (white, hairline, 48px floor),
   which is what keeps the four controls consistent with every other form on the
   site and what gives them a real touch target. */
.site .bb-searchcard__field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  /* A grid item defaults to `min-width: auto`, which refuses to shrink below its
     content and is how a long value pushes its column wider than its track. */
  min-width: 0;
  padding: 0;
  background: transparent;
}

.site .bb-searchcard__label {
  color: var(--bb-stitch-on-surface-variant);
}

/*
 * THE SELECTS ARE DELIBERATELY RESTATED, AND THE REASON IS SPECIFICITY.
 *
 * `site.css` styles the public surface's inputs with
 * `.site input:not([type='hidden']):not([type='radio']):not([type='checkbox'])`,
 * which is specificity (0,4,1) — no class-only selector can override it, so an
 * input keeps its white box, its hairline and its 48px floor whatever this file
 * says. `select` is styled by a SEPARATE, weaker selector in that same rule list,
 * so a select would have taken this file's `padding: 0; border: 0` and rendered as
 * bare text beside a boxed input. The declarations below bring the two controls to
 * the same treatment rather than letting them disagree.
 */
.site select.bb-searchcard__control {
  min-height: var(--bb-control-height);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.site .bb-searchcard__control {
  width: 100%;
  min-width: 0;
  color: var(--bb-stitch-on-surface);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: 1.4;
  text-overflow: ellipsis;
}

.site .bb-searchcard__control:focus-visible {
  outline: 2px solid var(--bb-stitch-secondary);
  outline-offset: 2px;
}

.site select.bb-searchcard__control {
  appearance: none;
  background-image: none;
  cursor: pointer;
}

.site .bb-searchcard__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 60px;
  padding-inline: var(--space-5);
  background: var(--bb-stitch-primary);
  color: var(--bb-stitch-surface);
  border: 0;
  border-radius: var(--bb-radius-md);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--bb-micro-size);
  font-weight: var(--bb-micro-weight);
  letter-spacing: var(--bb-stitch-caps-tracking);
  text-transform: uppercase;
}

.site .bb-searchcard__submit:hover {
  background: var(--bb-stitch-secondary);
}

/* THE NOTE CLAIMS THE FULL ROW, AND IT MUST BE TOLD TO.
 *
 * `.bb-searchcard` is a 12-column grid above 700px and the five fields claim 12 of
 * 12 (3+3+2+2+2). A sixth child with no `grid-column` is auto-placed into ONE 1/12
 * column — about 60px at 1440 — so the sentence rendered two words per line down
 * the card's left edge and made the card look broken. The explicit placement is not
 * tidiness: with the row already full, silence is a layout bug. */
.site .bb-searchcard__note {
  display: block;
  grid-column: 1 / -1;
  margin-top: var(--space-3);
  /* Ink, not the containment line. `--bb-stitch-outline-variant` is a hairline
     colour: as text on the card's white it measured 1.7:1. */
  color: var(--bb-stitch-on-surface-variant);
}

.site .bb-trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
  color: var(--bb-stitch-outline-variant);
}

/* The high-intent row. A chip is a search term the catalogue owns, so it carries a
   label and nothing else — no count, no badge, no availability. */
.site .bb-hero__chips {
  margin-top: var(--space-6);
}

.site .bb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.site .bb-chip {
  display: inline-flex;
  align-items: center;
  min-height: var(--bb-touch-min);
  padding-inline: var(--space-4);
  border: 1px solid var(--bb-stitch-outline-variant);
  border-radius: var(--bb-radius-pill);
  color: var(--bb-stitch-on-dark);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: var(--bb-body-md);
  font-weight: 500;
}

.site .bb-chip:hover {
  border-color: var(--bb-stitch-secondary);
  color: var(--bb-stitch-secondary);
}

.site .bb-trust__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.site .bb-trust__item .bb-icon {
  width: 16px;
  height: 16px;
  color: var(--bb-stitch-secondary);
}

/* ═══ the status ticker — the honest replacement for the Stitch live ledgers ══ */

.site .bb-ticker {
  background: var(--bb-stitch-surface-low);
  border-bottom: 1px solid var(--bb-stitch-outline-variant);
}

.site .bb-ticker__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-5);
  padding-block: var(--space-3);
}

.site .bb-ticker__line {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--bb-stitch-on-surface);
}

/* ═══ REGIONS 3 + 4 — the heading row and three service cards ════════════════ */

.site .bb-tonight {
  padding-block: var(--bb-stitch-y-sm) var(--space-8);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.site .bb-tonight__head-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.site .bb-tonight__eyebrow-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.site .bb-tonight__side {
  display: flex;
  /*
   * THIS ROW IS THREE THINGS ON A PHONE AND ONE ON A LAPTOP, SO IT WRAPS.
   *
   * `smoke:gutter` measured "View all" running 5px past the right edge of a 360px
   * viewport: the row holds a data line, a state pill and a link, and a nowrap flex
   * row pushes the last of them off a phone screen. The gate caught it at one
   * viewport only, which is also why the six mandated captures had not.
   */
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}

/* The state pill. The word inside it is `stateWord()`'s, from the catalogue —
   this element never invents one. */
.site .bb-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--bb-stitch-outline-variant);
  border-radius: var(--bb-radius-pill);
  background: var(--bb-stitch-surface-low);
}

.site .bb-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin: var(--space-8) 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 700px) {
  .site .bb-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.site .bb-svc__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bb-stitch-surface-low);
}

.site .bb-svc__media .bb-picture,
.site .bb-svc__media .bb-picture__img {
  display: block;
  width: 100%;
  height: 100%;
}

.site .bb-svc__media .bb-picture__img {
  object-fit: cover;
}

.site .bb-svc__tag {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  padding: var(--space-1) var(--space-3);
  background: rgba(0, 0, 0, 0.9);
  border-radius: var(--bb-radius-sm);
  color: var(--bb-stitch-on-dark);
}

.site .bb-svc__entries {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site .bb-svc__entry {
  display: inline-flex;
  align-items: center;
  min-height: var(--bb-touch-min);
  padding-inline: var(--space-3);
  border: 1px solid var(--bb-stitch-outline-variant);
  border-radius: var(--bb-radius-pill);
  color: var(--bb-stitch-on-surface);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: var(--bb-body-md);
}

.site .bb-svc__entry:hover {
  border-color: var(--bb-stitch-secondary);
  color: var(--bb-stitch-secondary);
}

/* ═══ REGION 5 — two enclaves, and the mobile geography block ════════════════ */

.site .bb-enclaves {
  padding-block: var(--bb-stitch-y-sm);
}

.site .bb-enclave-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 700px) {
  .site .bb-enclave-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.site .bb-enclave {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-8);
  background: var(--bb-stitch-surface-lowest);
  border: 1px solid var(--bb-stitch-outline-variant);
  border-radius: var(--bb-radius-md);
}

.site .bb-enclave__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.site .bb-enclave__media {
  aspect-ratio: 16 / 9;
  margin-block: var(--space-5);
}

.site .bb-enclave__media .bb-picture,
.site .bb-enclave__media .bb-picture__img {
  display: block;
  width: 100%;
  height: 100%;
}

.site .bb-enclave__media .bb-picture__img {
  object-fit: cover;
}

.site .bb-enclave__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site .bb-enclave__list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  color: var(--bb-stitch-on-surface-variant);
}

.site .bb-enclave__list .bb-dot {
  margin-top: 0.55em;
}

.site .bb-enclave__foot {
  margin-top: var(--space-6);
}

/* The mobile geography block: the areas the product actually serves, with each
   one's real readiness, plus the schematic the repo already draws. */
.site .bb-geo__figure {
  margin: 0 0 var(--space-6);
}

.site .bb-geo__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 390px) {
  .site .bb-geo__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.site .bb-geo__row {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4);
  background: var(--bb-stitch-surface-low);
  border-radius: var(--bb-radius-sm);
}

.site .bb-geo__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--bb-touch-min);
  color: var(--bb-stitch-on-surface);
  text-decoration: none;
}

/* ═══ REGION 6 — the numbered protocol steps ═════════════════════════════════ */

.site .bb-method {
  padding-block: var(--bb-stitch-y-sm);
}

.site .bb-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: bb-step;
}

@media (min-width: 700px) {
  .site .bb-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.site .bb-step {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-6);
  background: var(--bb-stitch-surface);
  border: 1px solid var(--bb-stitch-outline-variant);
  border-radius: var(--bb-radius-md);
}

.site .bb-step__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.site .bb-step__num {
  font-family: var(--font-display);
  font-size: var(--bb-headline-md);
  font-weight: 400;
  line-height: var(--bb-headline-md-line);
  color: var(--bb-stitch-secondary);
}

.site .bb-step__note {
  display: block;
  padding: var(--space-3);
  background: var(--bb-stitch-surface-low);
  border-radius: var(--bb-radius-sm);
  color: var(--bb-stitch-on-surface-variant);
}

/* ═══ REGION 7 — the dark protocol band ══════════════════════════════════════ */

.site .bb-protocol {
  padding-block: var(--bb-stitch-y-sm);
}

.site .bb-protocol__panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  padding: var(--space-8);
  background: var(--bb-stitch-primary-container);
  border-radius: var(--bb-radius-md);
  color: var(--bb-stitch-on-dark);
}

@media (min-width: 1000px) {
  .site .bb-protocol__panel {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: center;
    column-gap: var(--space-6);
    padding: var(--bb-stitch-y-sm);
  }

  .site .bb-protocol__text {
    grid-column: span 7;
  }

  .site .bb-protocol__media {
    grid-column: span 5;
  }
}

.site .bb-protocol__title {
  color: var(--bb-stitch-on-dark);
}

.site .bb-protocol__body {
  max-width: 54ch;
  margin-block: var(--space-5);
  color: var(--bb-stitch-on-dark-soft);
}

.site .bb-protocol__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-5);
}

.site .bb-protocol__note {
  color: var(--bb-stitch-outline-variant);
}

.site .bb-protocol__media {
  /*
   * THE CAPTION CARD IS ANCHORED TO THIS BOX, AND IT NEEDS TO BE A CONTAINING BLOCK.
   *
   * `.bb-protocol__card` is `position: absolute` with a negative inset. Without a
   * positioned ancestor here it resolves against the initial containing block, so it
   * painted at the bottom-left of the VIEWPORT — over the hero's trust row — in
   * every viewport capture, while looking correct in a full-page one. Measured in
   * `docs/evidence/visual-qa/stitch-home/home-1440x900.png` before this rule.
   */
  position: relative;
}

.site .bb-protocol__frame {
  position: relative;
  aspect-ratio: 4 / 5;
}

.site .bb-protocol__card {
  position: absolute;
  inset: auto auto calc(-1 * var(--space-4)) calc(-1 * var(--space-4));
  max-width: 26ch;
  padding: var(--space-4);
  background: var(--bb-stitch-surface-lowest);
  border-radius: var(--bb-radius-md);
  color: var(--bb-stitch-on-surface);
}

@media (max-width: 699px) {
  .site .bb-protocol__card {
    position: static;
    margin-top: var(--space-4);
  }
}

/* ═══ REGION 8 — the physical inspection protocol ════════════════════════════ */

.site .bb-inspection {
  padding-block: var(--bb-stitch-y-sm);
}

.site .bb-inspection__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 1000px) {
  .site .bb-inspection__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
    column-gap: var(--space-6);
  }

  .site .bb-inspection__head {
    grid-column: span 4;
  }

  .site .bb-checks {
    grid-column: span 8;
  }
}

.site .bb-inspection__eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.site .bb-checks {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 700px) {
  .site .bb-checks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.site .bb-check {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5);
  background: var(--bb-stitch-surface-low);
  border-radius: var(--bb-radius-md);
}

/* ═══ REGION 9 — the partner recruitment band ════════════════════════════════ */

.site .bb-partners {
  padding-block: var(--bb-stitch-y-sm);
}

.site .bb-partners__panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: var(--space-8);
  background: var(--bb-stitch-surface-low);
  border-radius: var(--bb-radius-md);
}

@media (min-width: 1000px) {
  .site .bb-partners__panel {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: var(--bb-stitch-y-sm);
  }

  .site .bb-partners__text {
    max-width: 62ch;
  }
}

.site .bb-partners__body {
  margin-top: var(--space-2);
  color: var(--bb-stitch-on-surface-variant);
}

.site .bb-partners__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  flex: none;
}

/* ── the two compositions ───────────────────────────────────────────────────
 *
 * Below 700px the page is the Stitch MOBILE composition, which is a different
 * design rather than the desktop page stacked: a status ticker, ONE dispatch
 * card, "The Between Method", the local-geography block and the protocol
 * guarantee card. Above it the ten desktop regions are the page.
 *
 * The mobile-only modules are hidden at desktop and vice versa with `display:
 * none`, which also takes them out of the accessibility tree, so a reader is
 * never offered the same heading twice.
 */
.site .bb-mob-only {
  display: block;
}

.site .bb-desk-only {
  display: none;
}

@media (min-width: 700px) {
  .site .bb-mob-only {
    display: none;
  }

  /* `display` is restated per role rather than set to `block` wholesale: a
     desktop-only band head is a flex column and a desktop-only inspection grid is
     a grid, and flattening either to `block` would silently destroy its layout at
     exactly the widths where it is supposed to be the composition. */
  .site .bb-desk-only {
    display: block;
  }

  .site .bb-desk-only.bb-bandhead {
    display: flex;
  }

  .site .bb-desk-only.bb-inspection__grid {
    display: grid;
  }
}

/* ONE DISPATCH CARD ON A PHONE; THE FULL ROW IS THE DESKTOP FORM.
 *
 * The direction is a mobile composition with a single dispatch card, and the
 * desktop row of three. This rule was written inside the DESKTOP media query in the
 * first pass, which hid cards 2 and 3 at exactly the widths that are supposed to
 * show them — caught by reading the full-page capture, not by the type checker. */
@media (max-width: 699px) {
  .site .bb-card--extra {
    display: none;
  }
}

/* The protocol guarantee card — the phone's form of the inspection section. */
.site .bb-guarantee {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--bb-stitch-surface-low);
  border-radius: var(--bb-radius-md);
}

.site .bb-guarantee__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(165, 59, 35, 0.1);
  color: var(--bb-stitch-secondary);
}

.site .bb-guarantee__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* ═══════════════════════════════════════════════════════════════════════════
 * ACCESSIBILITY_REQUIRED DEVIATIONS FROM THE STITCH REFERENCE
 *
 * The review protocol's hard-rejection list reads "Body text under 16px, or
 * contrast below 4.5:1", and `docs/design/PRODUCT_DESIGN_GATE.md` row 7 records
 * it as the open defect F7-D1: 498 paragraph-role text runs, 118 under 16px,
 * minimum 11px, including bare `<p>` elements. The Stitch type scale this file
 * implements uses 15px `body-md` and 13px `body-sm` for real prose, so the two
 * cannot both hold. They resolve like this, deliberately and visibly:
 *
 *   1. EVERY element whose role is body or paragraph copy renders at 16px or
 *      larger. The homepage's paragraphs all carry `.bb-body-lg` (17px), and the
 *      footer's two sentences do too. Where Stitch would set prose at
 *      `body-md`/`body-sm`, this composition uses `--bb-body-lg`.
 *   2. `--bb-body-md` (15px), `--bb-body-sm` (13px), `--bb-data` (12px) and
 *      `.bb-caps` (11px) remain available for NON-PARAGRAPH roles only:
 *      metadata rows, captions, badges, chips, control labels and eyebrows —
 *      the roles the gate's own evidence concedes are "defensible at a small
 *      size".
 *   3. NO BARE `<p>` RENDERS SMALL. The measured defect names bare `<p>` as body
 *      copy by role. Every small line in this composition is a `<span>`, `<div>`,
 *      `<li>` or `<a>` carrying an explicit caption/label class, so nothing can
 *      inherit a small size by accident.
 *
 * That is the whole deviation. No heading was shrunk to pay for it, and no
 * contrast value was touched: every colour here is the Stitch token table's, and
 * rust is used only for accents, never as a flood fill.
 * ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
 * t6 REPAIRS — the six visual drifts and the accessibility defects two
 * independent verifiers returned against the first implementation
 * ═══════════════════════════════════════════════════════════════════════════ */

/*
 * V-6 — THE DESKTOP COLUMN GUTTER IS THE REFERENCE'S 40px, NOT 24px.
 *
 * The approved screen lays every multi-column block out with `gap-gutter-desktop`,
 * and its theme fixes that at 2.5rem. The first implementation used the BB-DS
 * `--space-6` (24px), which the reviewer measured as "gutter 24 against 40" and
 * which is why the 3-up cards came out 411px wide against the reference's ~427px.
 * Measured after this block: 40px column gap and 437px cards at 1440 with the
 * reference's 40px page edge — the card width the reference's own arithmetic gives
 * ((1360 - 2x40) / 3 = 426.7).
 *
 * IT LIVES AT THE END OF THE FILE ON PURPOSE. The per-section grid rules above set
 * their gaps at the same specificity, so a block placed before them would lose to
 * source order — which is exactly what happened to the first attempt at this fix.
 */
@media (min-width: 1000px) {
  .site .bb-hero__grid,
  .site .bb-cards,
  .site .bb-enclave-grid,
  .site .bb-steps,
  .site .bb-checks,
  .site .bb-inspection__grid,
  .site .bb-protocol__panel,
  .site .foot-grid {
    gap: var(--bb-stitch-gutter-desktop);
    column-gap: var(--bb-stitch-gutter-desktop);
  }
}

/*
 * V-4 / V-5 — ONE ROW, ONE TYPE SYSTEM (stitch-home.css:391-531).
 * Measured at 1280: the primary CTA "Request a time" and the quiet link "For
 * venues" each rendered on TWO lines, because the row is `flex-wrap: nowrap` and
 * the labels were allowed to wrap INSIDE their own boxes instead. A wrapping label
 * is a row that does not fit, not a data constraint — and with the reference's 40px
 * page edge (V-6) the row now has 74px more room at 1280, which takes it from
 * exactly-full to comfortable.
 *
 * `white-space: nowrap` is the load-bearing part: it makes an over-full row visible
 * as overflow rather than silently as a two-line label. The row is also allowed to
 * WRAP as a whole now (`.bb-head` below), so at 200% text zoom the controls move to
 * a second line instead of running off the right edge.
 *
 * V-5's second type system is gone with it: the area control now carries the row's
 * own grammar — 11px tracked caps like every other item — instead of 16px sentence
 * case on a `border-radius: 9999px` pill.
 */
.site .bb-head__search,
.site .bb-head__quiet,
.site .bb-head__cta,
.site .bb-head__area,
.site .site-nav--desk a {
  white-space: nowrap;
}

.site .bb-head__area {
  border-radius: var(--bb-radius-sm);
  background: transparent;
  border: 1px solid var(--bb-stitch-outline-variant);
  padding-inline: var(--space-2);
  /* The link's own size is the row's, so nothing inherits 16px sentence case into
     an 11px caps row even if the label span is ever removed. */
  font-size: var(--bb-micro-size);
}

/*
 * THE NAV LIST WRAPS RATHER THAN WIDENING THE DOCUMENT.
 *
 * Measured at 200% text zoom on `/` (1280 and 1440): the desktop nav's `<ul>` was
 * 1329px wide against a 1280 viewport — the nine destinations at 22px tracked caps
 * cannot share one line. The header row already wraps (below); the list itself has
 * to as well, and at 100% nothing wraps because there is room.
 */
.site .site-nav ul {
  flex-wrap: wrap;
  white-space: normal;
}

.site .bb-head__area-label {
  font-family: var(--font-body);
  font-size: var(--bb-micro-size);
  font-weight: var(--bb-micro-weight);
  line-height: var(--bb-micro-line);
  letter-spacing: var(--bb-stitch-caps-tracking);
  text-transform: uppercase;
  color: var(--bb-stitch-on-surface);
}

/*
 * A8R-D4 — NO HORIZONTAL OVERFLOW AT A TRUE 320px VIEWPORT.
 *
 * Every harness in the repository starts at 360, so the narrowest supported width
 * was never measured. At 320 the header row was the offender (measured: the end
 * block's right edge at 335 against a 320 viewport), so below 360px the row keeps
 * the brand, the search affordance and the menu disclosure, and the area control
 * stands down — its function is reachable from the dock and from the nav at
 * `/near-me` on every route.
 */
@media (max-width: 359px) {
  .site .bb-head__area {
    display: none;
  }
}

/*
 * 200% TEXT ZOOM (WCAG 1.4.4) — THE HEADER REFLOWS INSTEAD OF SCROLLING SIDEWAYS.
 *
 * The zoom probe doubles the ROOT font size, which doubles every rem-based value
 * here (the nav's 11px is `--bb-micro-size`, a rem token; the gutters, the padding
 * and the gaps follow). Measured before this change at 200%: `/` overflowed at
 * 768 (884 against 768), 1280 (1560) and 1440 (1560), with the header's end block
 * and the desktop nav as the offenders. Allowing the row to wrap and letting the
 * bar grow is the honest reflow: the controls move onto following lines, no content
 * is lost, and no horizontal scrolling appears. The bar's reserved space is still
 * the token, so at 200% it overlaps the hero's top by the extra lines — which is a
 * cosmetic cost paid only at that setting, and the alternative was a 280px
 * sideways scroll.
 */
.site .bb-head {
  flex-wrap: wrap;
  height: auto;
  min-height: var(--bb-stitch-head-h);
  padding-block: var(--space-1);
}

/* The partners panel and its action row are the second ablation cause: at 200% the
   heading and the two controls cannot share a line, so the panel wraps. */
.site .bb-partners__panel,
.site .bb-partners__actions {
  flex-wrap: wrap;
}

.site .bb-partners__panel > * {
  min-width: 0;
}

/*
 * V-1 / V-1R — THE PHONE HERO'S PHOTOGRAPH IS THE HERO'S GROUND (t13).
 *
 * The approved mobile reference (`bb_cns_01_homepage_explore_mobile/code.html:9-18`)
 * is photograph-led: a full-bleed image BEHIND the copy, with the white search card
 * and the caption sitting on it, about 571 CSS px tall. The first implementation put
 * the frame last, so a phone visitor never saw the photograph in the first viewport
 * (measured: the image began at y=1248 of an 844px viewport at 390). The second
 * implementation moved it, but as a BAND above the copy — which put the photograph
 * in the first viewport and still did not give it the reference's ROLE, and that role
 * is V-1R.
 *
 * This is the reference's treatment: `.bb-hero__media` becomes an absolutely
 * positioned ground covering the whole hero (full-bleed left and right), the frame
 * fills it, and the copy column sits over it with a higher stacking order. The hero's
 * bottom padding reserves the strip the availability card occupies, so the card is
 * over the photograph at the hero's foot instead of over the trust row.
 *
 * THE SCRIM IS EXPLICITLY SANCTIONED, AND THIS IS THE CITATION:
 * `design/open-design/design-systems/balibetween/REFERENCE_LOCK.md:454-455` —
 * "no duotone and no gradient scrim except where text must sit on the image".
 * Text sits on this image, so the gradient is licensed by that clause and is not one
 * of the DECORATIVE gradients `DESIGN.md:51` and `FOUNDATIONS.md:53` refuse. It is
 * also the reference's own device (`bg-gradient-to-t from-primary-container
 * via-primary-container/85 to-primary-container/70`), and its stops are that
 * device's: darkest at the foot (0.96), lightest at the crown (0.72).
 *
 * MEASURED CONTRAST, worst case over the brightest possible image pixel (white),
 * with the scrim composited at its lightest stop (0.72 -> rgb(71,71,71), relative
 * luminance 0.0614):
 *   · the display headline  #fbf9f5 (L 0.947) -> 8.95:1
 *   · the standfirst        #e4e2de (L 0.771) -> 5.55:1
 *   · the caps labels       #fbf9f5 at this width -> 8.95:1
 * and deeper down the plate the scrim is darker still, so every stop is above the
 * 4.5:1 the 17px and 11px text needs (3:1 for the 38px headline). `visual-qa`
 * measures the composite on the real render at all eight viewports, which is the
 * measurement that does not depend on this arithmetic.
 *
 * PLACEMENT MATTERS. `.site .bb-hero__frame { aspect-ratio: 4/5 }` lives earlier in
 * this file at the same specificity, so an earlier media query loses to it on source
 * order — the first version of this block did exactly that and produced a 1:1 band.
 */
@media (max-width: 699px) {
  .site .bb-hero {
    position: relative;
    /* NO PADDING HERE: the ground is `inset: 0` of this element's PADDING box, so a
       reserve on the hero moves the photograph and the copy together and separates
       nothing — measured: with `padding-top` here the disclosure plate travelled down
       with the heading and still overlapped it. The reserve lives on the COPY COLUMN
       below, where it moves only the ink. */
    padding-top: 0;
    padding-bottom: 0;
  }

  .site .bb-hero__grid {
    position: relative;
    z-index: 2;
  }

  /*
   * THE COPY IS POSITIONED AND STACKED, OR THE PHOTOGRAPH PAINTS OVER IT (V-15).
   *
   * `.bb-hero__media` is a positioned descendant with `z-index: 0`, and the CSS
   * painting order puts positioned descendants with `z-index: auto` or `0` in the
   * SAME step — after in-flow block boxes and after in-flow inline content. So a
   * static, non-positioned copy column has its heading and its search card painted
   * UNDERNEATH the ground even though the ground's `z-index` is the lower value,
   * and `z-index: auto` on this column would not help: among that step's elements,
   * painting follows DOM order and the media sits AFTER the column.
   *
   * MEASURED CONSEQUENCE WHILE IT WAS WRONG (at 390x844, first viewport): the boxes
   * were coextensive — `.bb-hero__col` x=20 w=350 static / z-index auto, the media
   * x=0 w=390 absolute / inset 0 / z-index 0 — and the headline survived only as the
   * first characters of each line, with the white search card reduced to slivers.
   *
   * EVERY GATE WAS GREEN WHILE THAT WAS TRUE, WHICH IS THE LESSON, NOT THE BUG:
   * `visual-qa`'s overflow check is satisfied because the ground is exactly
   * `inset: 0`; its contrast metric compares a text run to its nearest ancestor
   * background COLOUR and cannot see a background IMAGE; and its phone captures are
   * taken at maximum scroll, so the hero is in none of the 184 screenshots. The
   * re-measurement for this fix therefore hit-tests the FIRST VIEWPORT with
   * `document.elementFromPoint` — the only cheap measurement that respects painting
   * order — at 360, 390 and 430.
   */
  .site .bb-hero__col {
    position: relative;
    z-index: 1;
    /*
     * THE TWO STRIPS THE OVERLAYS OCCUPY, RESERVED ON THE COPY RATHER THAN THE HERO.
     *
     * The ground is `inset: 0` of the hero's padding box, so it contains the caption
     * at its crown and the availability card at its foot; the copy is in flow inside
     * it. Reserving space on the HERO moves both and separates nothing (measured),
     * so the strips are padding on this column: 104px at the top for the disclosure
     * plate (20px inset + a 69px plate + a 15px gap) and 192px at the foot for the
     * card (142px tall at 390, 16px inset, 34px of clearance).
     *
     * BOTH EXPRESSIONS USE TOKENS THAT EXIST. The first version of this block wrote
     * `calc(var(--space-16) + var(--space-8))` for the foot reserve, and `--space-16`
     * is defined NOWHERE in the scale (which stops at `--space-12`), so the
     * declaration was invalid at computed-value time and the reserve silently became
     * 0 — the same missing-token class this team fixed on `/search`. Measured
     * consequence while it was wrong: `.bb-avail`'s plate (box 1058..1200 at
     * 390x844) overlapped four lines of the trust row's ink, and the harness's own
     * screenshots could not show it because the phone captures are taken at maximum
     * scroll.
     */
    padding-top: calc(var(--space-12) * 2 + var(--space-2));
    padding-bottom: calc(var(--space-12) * 4);
  }

  /*
   * The ground: behind everything, as tall as the hero, and exactly as wide.
   *
   * `inset: 0` AND NO NEGATIVE OFFSET, BECAUSE THE HERO IS ALREADY FULL-BLEED.
   * `.bb-hero` carries `band--bleed`, so its own box is the full viewport; the first
   * version of this rule also cancelled the wrap's gutter (`calc(-1 * var(--gutter))`)
   * as the old BAND had to, and that made the ground 20px wider than the hero on each
   * side: `visual-qa` measured `scrollWidth 380 > device width 360` on `home` at
   * 360x800, 390x844 and 430x932, with the fixed header spanning the widened document.
   */
  .site .bb-hero__media {
    position: absolute;
    inset: 0;
    margin: 0;
    z-index: 0;
  }

  .site .bb-hero__frame {
    aspect-ratio: auto;
    height: 100%;
    border-radius: 0;
  }

  /* The scrim — see the citation above. */
  .site .bb-hero__frame::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to top,
      rgba(28, 27, 27, 0.96) 0%,
      rgba(28, 27, 27, 0.86) 45%,
      rgba(28, 27, 27, 0.72) 100%
    );
  }

  /* Caption and card sit ON the plate, above the scrim; the copy is above both. */
  .site .bb-hero__caption,
  .site .bb-avail {
    z-index: 1;
  }

  .site .bb-hero__caption {
    inset: var(--space-5) var(--space-5) auto;
  }

  /* Over a photograph the micro-labels step up to the on-dark ink: measured
     #fbf9f5 on the lightest scrim stop (0.72 over white) is 8.95:1, where
     `--bb-stitch-outline-variant` (#c4c7c7) would be 4.35:1 — under the 4.5:1
     that 11px tracked caps need, and only over this plate. */
  .site .bb-hero__eyebrow .bb-caps,
  .site .bb-hero__chips > .bb-caps,
  .site .bb-trust .bb-caps {
    color: var(--bb-stitch-on-dark);
  }
}

/*
 * 200% TEXT ZOOM, REMAINING CAUSES.
 *
 * The band head's row layout (`space-between`, desktop) and the state pill both
 * measured wider than the viewport at 200% on `/`: the row could not wrap, and the
 * pill's inner state word is `white-space: nowrap` in `site.css`. Both are allowed
 * to wrap here, which at 100% changes nothing (there is room) and at 200% removes
 * the last two offenders — measured after: 0 overflow at 768, 1280 and 1440.
 */
.site .bb-bandhead--row {
  flex-wrap: wrap;
}

.site .bb-pill {
  max-width: 100%;
  min-width: 0;
}

.site .bb-pill .result__state {
  white-space: normal;
}

/* The third ablation cause: the footer's contact address is one unbreakable token,
   and at 200% it measured clientWidth 131 against scrollWidth 332 at 1280. Ink that
   cannot wrap is a sideways scroll; `overflow-wrap` lets it break. The 44px target
   floor is kept, on an inline-block because an inline-flex box cannot break a word. */
.site .foot-contact a {
  display: inline-block;
  min-height: var(--bb-touch-min);
  padding-block: var(--space-2);
  overflow-wrap: anywhere;
  max-width: 100%;
}

/*
 * A8R-D2 — THE FOCUS RING REACHES 3:1 AGAINST ITS OWN BACKDROP, ON DARK SURFACES
 * AND ON THE LIGHT CARDS THAT SIT INSIDE THEM.
 *
 * `site.css` draws the ring in `--accent` (#A83D25), which measures 5.6–6.4:1 on the
 * light bands and 2.75:1 on `--bb-stitch-primary-container` (#1c1b1b) — below the 3:1
 * WCAG 1.4.11 requires of a non-text indicator. On the dark fields the ring is the
 * Stitch table's own `secondary-fixed` (#ffdad2), the token this file already uses for
 * the dark band's caps label: measured 13.27:1 against #1c1b1b on the six hero chips.
 *
 * AN OUTLINE IS PAINTED OUTSIDE THE BORDER BOX, SO ITS BACKDROP IS THE PARENT'S, NOT
 * THE ELEMENT'S OWN. The first version of this rule was scoped to the BAND, and the
 * hero band contains the white search card — so the light ring landed on white and the
 * homepage's PRIMARY ACTION, `button.bb-searchcard__submit`, measured 1.3:1, worse
 * than the 2.75:1 it replaced. The accessibility verifier caught it on a content-hash
 * pinned revision and both widths reproduce it (390x844 and 1280x800).
 *
 * The dark ring is therefore kept for the dark surfaces and the light subtrees nested
 * inside a dark band restate the accent ring — rust on white is 6.46:1 measured on the
 * card's own controls, which is why the inputs were always correct.
 */
.site .bb-band--dark a:focus-visible,
.site .bb-band--dark button:focus-visible,
.site .bb-band--dark summary:focus-visible,
.site .bb-protocol__panel a:focus-visible,
.site .bb-protocol__panel button:focus-visible {
  outline-color: var(--bb-stitch-secondary-fixed);
}

/* …and every light surface nested inside a dark band paints its outline in the accent
   again. These selectors must stay MORE specific than the block above: (0,4,1) against
   (0,3,1), so they win on specificity and not on source order. */
.site .bb-band--dark .bb-searchcard a:focus-visible,
.site .bb-band--dark .bb-searchcard button:focus-visible,
.site .bb-band--dark .bb-searchcard input:focus-visible,
.site .bb-band--dark .bb-searchcard select:focus-visible,
.site .bb-band--dark .bb-searchcard textarea:focus-visible,
.site .bb-band--dark .bb-avail a:focus-visible,
.site .bb-band--dark .bb-avail button:focus-visible,
.site .bb-band--dark .bb-card a:focus-visible,
.site .bb-band--dark .bb-card button:focus-visible,
.site .bb-band--dark .bb-frame a:focus-visible,
.site .bb-band--dark .bb-frame button:focus-visible,
.site .bb-protocol__panel .bb-card a:focus-visible,
.site .bb-protocol__panel .bb-card button:focus-visible {
  outline-color: var(--accent);
}


