/* ═══════════════════════════════════════════════════════════════════════════
 * BaliBetween — public site stylesheet
 *
 * SCOPE. This file styles ONLY the public informational surfaces rendered by
 * `views/public/*`. The transactional surface keeps `app.css`, so a change here
 * cannot move a booking step.
 *
 * WHAT THE DIRECTION ASKS FOR (and where it is implemented below)
 * --------------------------------------------------------------
 * `docs/18_VISUAL_DIRECTION.md` locks "editorial hospitality + transactional
 * clarity", and names four rules this file has to honour:
 *
 *   · "Photography should carry most of the color." There is no licensed
 *     photography at launch, so the palette carries the page instead — and the
 *     answer to that is NOT more colour. It is contrast, measure and rhythm:
 *     deep-ink bands against warm paper, a real typographic scale, and one
 *     scarce accent.
 *   · "Primary transaction CTAs should default to deep ink." `.btn-primary`
 *     below is ink, deliberately, and NOT the botanical green. The green is
 *     reserved for semantic state (`.step-node`, `[data-semantic]`), which is
 *     why the only green on a marketing page marks real progression.
 *   · "Botanical green is scarce and semantic: trust, success, selection, active
 *     progress." Exactly one place uses it: the numbered Between Line nodes.
 *   · "Consumer cards/media are sharp or near-sharp and shadowless." Every
 *     radius is `--radius-sm`/`--radius-md` and there is no `box-shadow` in this
 *     file other than the focus ring.
 *
 * NO INLINE STYLES. The content-security policy is `style-src 'self'`, so every
 * declaration lives here. There is also no JavaScript on the public site, which
 * is why nothing below depends on a class being toggled at runtime.
 *
 * ACCESSIBILITY NOTES THAT ARE NOT OPTIONAL
 * -----------------------------------------
 *   · Every interactive element has a visible `:focus-visible` outline.
 *   · The skip link is the first focusable element and becomes visible on focus.
 *   · Text contrast is checked against the token values: `--fg` (#1f2723) on
 *     `--bg` (#f5f1e8) is ~12.6:1; `--muted` (#677069) on `--bg` is ~4.9:1,
 *     which clears 4.5:1 for body text; muted text is never used below 0.875rem.
 *   · Motion is limited to a colour transition and is disabled by the token
 *     stylesheet's own `prefers-reduced-motion` block.
 * ═══════════════════════════════════════════════════════════════════════════ */

/* ─── base ────────────────────────────────────────────────────────────────── */

.site {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  -webkit-text-size-adjust: 100%;
}

.site *,
.site *::before,
.site *::after {
  box-sizing: border-box;
}

/*
 * ONE GUTTER, THREE WAYS OF OPTING IN.
 *
 * `--gutter` collapses the three per-breakpoint tokens into a single value that reacts
 * to the viewport on its own, so the rule below does not have to be repeated inside
 * three media queries and cannot fall out of step with them.
 */
.site {
  --gutter: var(--container-gutter-phone);
}

@media (min-width: 700px) {
  .site {
    --gutter: var(--container-gutter-tablet);
  }
}

@media (min-width: 1000px) {
  .site {
    --gutter: var(--container-gutter-desktop);
  }
}

.site .wrap {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/*
 * THE FIX FOR CONTENT THAT SAT AT x=0.
 *
 * `/services` and `/find` put blocks straight into `main.page` instead of inside a
 * `.wrap`. `.page` has no horizontal padding of its own - only `padding-bottom` - and
 * `.prose` and `.service-list` have none either, so the reading column ran to the exact
 * edge of the viewport: service headings, summaries, a whole grid of articles, a CTA row
 * and the entire request form.
 *
 * Every other page happened to wrap its blocks, which is why this survived review: it is
 * a defect of OMISSION, invisible on any page that remembered, and it reappears the next
 * time someone adds a section and forgets. So the fix is not to wrap those two pages by
 * hand. It is to make `main.page` unable to render unpadded content.
 *
 * `.wrap` is exempt because it applies the gutter itself, and `.band--bleed` is exempt
 * because a full-bleed visual field touching the viewport edge is deliberate - imagery
 * may go to the edge, text never should, and that contrast is the composition.
 */
.page > *:not(.wrap):not(.band--bleed) {
  padding-inline: var(--gutter);
}

/* ─── focus and skip link ─────────────────────────────────────────────────── */

.site a:focus-visible,
.site button:focus-visible,
.site summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.site .skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  padding: var(--space-3) var(--space-4);
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
}

.site .skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
}

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

.site-head {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  /*
   * `viewport-fit=cover` is what makes `env(safe-area-inset-*)` resolve at all, and
   * once the page can extend under the status bar the identity bar has to keep its
   * own content clear of it. Both resolve to 0 on a device that reports no inset, so
   * this is inert everywhere it is not needed.
   */
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.head-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-6);
  min-height: 4.25rem;
  padding-block: var(--space-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--fg);
}

.brand-mark {
  display: block;
  width: 34px;
  height: 34px;
  flex: none;
}

.brand-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-display);
  line-height: 1;
}

/*
 * THE MOBILE HEADER.
 *
 * What was here: a horizontally scrolling nav row. It clipped the last destination -
 * "Trust" rendered as "Trus" at 390px - with no affordance that the row scrolled, and its
 * `order: 3; width: 100%` pushed the nav onto a third header row, making the phone header
 * TALLER than the desktop one.
 *
 * What replaces it: one compact row (brand, then a Menu disclosure), with the destinations
 * inside. `<details>` gives that for free - native focus, Enter/Space, Escape, and a list
 * that is only in the accessibility tree when open - so there is no JavaScript, no
 * aria-expanded bookkeeping to get wrong, and no hamburger that silently fails when a
 * script does not load.
 *
 * The primary CTA lives inside the disclosure on a phone and inline on desktop. At 360px
 * brand + CTA + toggle does not fit on one row, and a CTA that overflows is worse than a
 * CTA one tap away - the page body carries its own "Request a time" above the fold anyway.
 */
.nav-disclosure {
  order: 3;
  margin-inline-start: auto;
}

.nav-disclosure summary {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem; /* 44px: a comfortable touch target, not a text-sized one */
  padding-inline: var(--space-3);
  cursor: pointer;
  list-style: none;
  color: var(--fg-2);
  font-size: var(--text-sm);
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.nav-disclosure summary::-webkit-details-marker,
.nav-disclosure summary::marker {
  display: none;
}

.nav-disclosure[open] summary {
  color: var(--fg);
  border-color: var(--fg-2);
}

/*
 * ON APP SURFACES THE BOTTOM BAR IS THE NAVIGATION, SO THE HEADER STOPS ACTING
 * LIKE ONE.
 *
 * `MOBILE.md:34-38` gives the consumer public shell a compact identity bar plus the
 * persistent four-destination bottom nav; it does not give the phone two competing
 * navigations. A bordered "Menu" box in the top-right corner is website grammar, and
 * on a page that also carries the bar it reads as the primary way around — which is
 * what the founder called out.
 *
 * The disclosure is therefore DEMOTED, not removed: `body.has-tabbar` is the exact
 * condition (the shell sets it only on registered browsable routes and `/find`
 * deliberately does not carry the bar), so the destinations stay reachable with no
 * JavaScript, and the focused task/page surfaces that have no bar keep the bordered
 * control they need.
 */
body.has-tabbar .nav-disclosure summary {
  padding-inline: var(--space-2);
  border-color: transparent;
}

body.has-tabbar .nav-disclosure[open] summary {
  border-color: var(--fg-2);
}

body.has-tabbar .nav-disclosure summary::before {
  content: "";
  width: 14px;
  height: 10px;
  border-top: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  background: linear-gradient(currentColor, currentColor) center / 14px 1.5px no-repeat;
}

.site-nav {
  display: none;
}

.nav-disclosure[open] .site-nav {
  display: block;
}

/*
 * The open menu must not widen the page.
 *
 * The shared list rule is `white-space: nowrap`, which is right for a single inline row
 * on desktop and wrong inside a 360px disclosure: "How it works" plus the CTA made the
 * open menu 17px wider than the viewport, so opening the navigation produced the exact
 * horizontal overflow this change set out to remove. Measured on production at 360px
 * before this rule existed, and 0px after.
 */
.nav-disclosure .site-nav ul {
  flex-wrap: wrap;
  white-space: normal;
  gap: var(--space-2) var(--space-5);
}

.nav-disclosure-cta {
  margin: var(--space-4) 0 0;
}

/* Hidden on a phone: the disclosure carries it. */
.head-cta {
  display: none;
}

.site-nav ul,
.foot-nav ul {
  display: flex;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
  white-space: nowrap;
}

.site-nav a {
  display: inline-block;
  padding-block: var(--space-2);
  color: var(--fg-2);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

.head-cta {
  margin: 0 0 0 auto;
}

/*
 * DESKTOP IS UNCHANGED.
 *
 * The disclosure is dissolved rather than restyled: the summary disappears, the nav is
 * forced visible with `!important` (the browser hides non-summary `<details>` content
 * unless the element is `open`, and no amount of `display` on the child overrides that
 * without it), and the inline CTA returns. Desktop never learns the mobile pattern existed.
 */
@media (min-width: 1000px) {
  .head-inner {
    flex-wrap: nowrap;
  }

  .nav-disclosure {
    order: 0;
    margin-inline-start: var(--space-8);
  }

  .nav-disclosure summary {
    display: none;
  }

  .site-nav {
    display: block !important;
    overflow: visible;
  }

  .nav-disclosure-cta {
    display: none;
  }

  .head-cta {
    display: block;
    margin-inline-start: auto;
  }
}

/* ─── buttons ─────────────────────────────────────────────────────────────── */

/*
 * THE PUBLIC SURFACE'S BUTTON IS NOT `app.css`'s BUTTON.
 *
 * `app.css:296` already declares `min-height: 44px` for `.btn`, but that stylesheet
 * belongs to the task/application shell and the public shell loads only `tokens.css`,
 * `site.css` and `editorial.css` (see `views/public/shell.ts`). The floor therefore
 * never reached this page: a browser measurement put the public primary action at
 * 42.8px while the app shell's was already compliant.
 *
 * `MOBILE.md:107-108` sets 44px as the interactive minimum and 48-52px as the
 * preferred primary control, so the base carries 44px and the primary variant carries
 * 48px — the difference is deliberate, because "the one action that matters" should be
 * easier to hit than a secondary one, not merely equal to it.
 *
 * `inline-flex` is what lets a minimum height apply around a single line of text;
 * `inline-block` cannot grow to a floor.
 */
.site .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--fg);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard);
}

/* Deep ink, per docs/18 — not the accent. */
.site .btn-primary {
  min-height: 48px;
  background: var(--fg);
  color: var(--bg);
}

.site .btn-primary:hover {
  background: var(--fg-2);
}

.site .btn-quiet {
  border-color: var(--border);
  color: var(--fg);
  background: transparent;
}

.site .btn-quiet:hover {
  border-color: var(--fg);
}

/* ─── target size ─────────────────────────────────────────────────────────── */

/*
 * WCAG 2.2 AA 2.5.8 "Target Size (Minimum)" asks for 24x24 CSS pixels. The
 * criterion carries an explicit exception for links **inline within a sentence**,
 * which is why prose links are NOT enlarged here: padding a link that sits inside
 * a paragraph would push the line box apart and wreck the reading rhythm to
 * satisfy a rule that does not apply to it.
 *
 * What is not exempt is a standalone link, and a browser measurement found the
 * real ones: the header navigation was already 39px tall, but the FOOTER
 * navigation and the BREADCRUMBS were 16px and 14px. Those are the same
 * destinations as the header at a different position on the page, and a link is
 * not easier to hit at the bottom of a document than at the top of it.
 *
 * `padding-block` enlarges the hit area without changing the visual position of
 * the text, so the page looks identical and behaves properly.
 */
.site-nav a,
.foot-nav a,
.breadcrumbs a,
.plain-list a,
.foot-contact a,
.notice a {
  display: inline-block;
  padding-block: var(--space-2);
}

/*
 * The brand is the top bar's identity control and the only way home from a phone, so
 * it carries the same 44px floor as the rest of the chrome (`MOBILE.md:107`). It
 * measured 154x34 before this — a wide but short target, which is the shape that is
 * easiest to miss with a thumb.
 */
.brand {
  min-height: 44px;
}

.foot-nav ul,
.plain-list {
  /* The extra padding must not add visible gaps between rows. */
  row-gap: 0;
}

/* ─── breadcrumbs ─────────────────────────────────────────────────────────── */

.breadcrumbs {
  padding-top: var(--space-4);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-xs);
  color: var(--muted);
}

.breadcrumbs li + li::before {
  content: '/';
  margin-inline-end: var(--space-2);
  color: var(--border);
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
  /* WCAG 2.2 "Target Size (Minimum)" is 24x24 CSS px. The last crumb is frequently a
     single short word — "Bali" measures 20px wide on its own — so the link's own box
     has to supply the remainder rather than the length of the text doing it. That was
     a real undersized tap target on every area page, not a measurement artefact. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
}

.breadcrumbs a:hover {
  color: var(--fg);
  text-decoration: underline;
}

/* ─── page opening ────────────────────────────────────────────────────────── */

.page {
  padding-bottom: var(--section-y-phone);
}

.page-title {
  margin: var(--space-6) 0 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw + 1rem, var(--text-4xl));
  font-weight: 500;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  max-width: 20ch;
}

.lede {
  margin: var(--space-5) 0 0;
  max-width: 46ch;
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--fg-2);
}

.eyebrow {
  margin: var(--space-6) 0 0;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.breadcrumbs + .page .eyebrow {
  margin-top: var(--space-4);
}

/* ─── bands ───────────────────────────────────────────────────────────────── */

.band {
  padding-block: var(--section-y-phone);
  border-top: 1px solid var(--border-soft);
}

.page > .band:first-of-type {
  margin-top: var(--section-y-phone);
}

.band-title {
  margin: 0 0 var(--space-5);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw + 0.9rem, var(--text-2xl));
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: var(--tracking-display);
  max-width: 26ch;
}

.band-lede {
  margin: calc(var(--space-5) * -1 + var(--space-2)) 0 var(--space-6);
  max-width: 52ch;
  color: var(--fg-2);
}

.band-more {
  margin: var(--space-6) 0 0;
  font-weight: 500;
}

.band-cta {
  background: var(--fg);
  color: var(--bg);
  border-top: 0;
}

.band-cta .band-title {
  color: var(--bg);
}

.band-cta .prose p {
  color: rgb(245 241 232 / 0.86);
}

/* ─── wide-screen band composition ────────────────────────────────────────── */

/*
 * Above ~1080px the heading stops sitting on top of its content and becomes a
 * left rail beside it.
 *
 * WHY. Measured at 1440px, the stacked layout left the right 40% of every prose
 * band empty: headings and body both capped at a reading measure, both starting
 * at the same left edge, and roughly 600px of nothing to their right. On a phone
 * that is correct — there is no width to use. On a laptop it reads as a page that
 * was never composed for the screen it is on, which is the opposite of what
 * docs/18_VISUAL_DIRECTION.md asks for.
 *
 * The rule is expressed as "the heading goes in column one, everything else in
 * column two" rather than by naming each block, so a band added later inherits the
 * composition instead of silently falling back to a single column.
 *
 * Below 1080px nothing changes: the grid is not declared, so the bands stay
 * stacked and the phone layout is untouched.
 */
@media (min-width: 1080px) {
  /*
   * SCOPED TO THE PLAIN BANDS, AND THAT SCOPING IS LOAD-BEARING.
   *
   * This rule is the site's original section grammar: heading on the left rail,
   * everything else in a wide right column. It is a good grammar and the prose pages
   * still use it.
   *
   * It was written as `.band > .wrap > *`, which is every band. That was fine while
   * every band WAS this grammar. The moment the Visual V2 pass added bands with their
   * own composition — a full-bleed photograph, an asymmetric split, a graphic canvas —
   * this rule captured them too and pushed their children into column two, which
   * silently collapsed each one into a single indented column. The symptom looked like
   * a broken grid in the new code; the cause was an unscoped selector in the old code.
   */
  .band:not(.band--bleed, .band--split, .band--canvas, .band--pair, .band--close, .band--ink) > .wrap {
    display: grid;
    grid-template-columns: minmax(0, 22ch) minmax(0, 1fr);
    column-gap: var(--space-12);
    align-items: start;
  }

  .band:not(.band--bleed, .band--split, .band--canvas, .band--pair, .band--close, .band--ink) > .wrap > .eyebrow,
  .band:not(.band--bleed, .band--split, .band--canvas, .band--pair, .band--close, .band--ink) > .wrap > .band-title,
  .band:not(.band--bleed, .band--split, .band--canvas, .band--pair, .band--close, .band--ink) > .wrap > .band-lede {
    grid-column: 1;
  }

  .band:not(.band--bleed, .band--split, .band--canvas, .band--pair, .band--close, .band--ink) > .wrap > *:not(.eyebrow):not(.band-title):not(.band-lede) {
    grid-column: 2;
  }

  /* The lede belongs with the heading, so it takes the same rail without the
     negative margin it needs when it is stacked under a title. */
  .band-lede {
    margin-top: 0;
  }

  /* The page opening is not a band, and keeps its full measure: the `h1` is the
     one piece of type allowed to run wide. */
  .page .lede {
    max-width: 52ch;
  }
}

/* ─── prose ───────────────────────────────────────────────────────────────── */

.prose {
  max-width: 68ch;
}

.prose-wide {
  max-width: 74ch;
}

.prose p {
  margin: 0 0 var(--space-4);
  color: var(--fg-2);
}

.prose-wide p:first-child {
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--fg);
}

.prose > p:last-child {
  margin-bottom: 0;
}

.prose strong {
  color: var(--fg);
  font-weight: 600;
}

.prose a,
.band-more a,
.plain-list a,
.tick-list a,
.check-list a {
  color: var(--fg);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.prose a:hover,
.band-more a:hover {
  color: var(--accent-hover);
}

.prose h2,
.article-body h2 {
  margin: var(--space-12) 0 var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: var(--tracking-display);
  max-width: 30ch;
}

.prose h3,
.article-body h3 {
  margin: var(--space-8) 0 var(--space-3);
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.3;
}

.prose h4,
.article-body h4 {
  margin: var(--space-6) 0 var(--space-2);
  font-size: var(--text-base);
  font-weight: 700;
}

.prose ul,
.prose ol,
.article-body ul,
.article-body ol {
  margin: 0 0 var(--space-4);
  padding-inline-start: var(--space-6);
  color: var(--fg-2);
}

.prose li,
.article-body li {
  margin-bottom: var(--space-2);
}

.prose blockquote,
.article-body blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-2) 0 var(--space-2) var(--space-5);
  border-left: 2px solid var(--accent);
  color: var(--fg-2);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose code,
.article-body code {
  padding: 0.1em 0.35em;
  background: var(--surface-warm);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.prose pre,
.article-body pre {
  margin: 0 0 var(--space-4);
  padding: var(--space-4);
  overflow-x: auto;
  background: var(--surface-warm);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
}

.prose hr,
.article-body hr {
  margin: var(--space-8) 0;
  border: 0;
  border-top: 1px solid var(--border);
}

/* Tables scroll rather than break the layout on a phone. */
.table-scroll {
  margin: 0 0 var(--space-6);
  overflow-x: auto;
}

.prose table,
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  text-align: left;
}

.prose th,
.prose td,
.article-body th,
.article-body td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}

.prose th,
.article-body th {
  border-bottom-color: var(--fg);
  font-weight: 600;
}

/* ─── lists used as content ───────────────────────────────────────────────── */

.tick-list,
.cross-list,
.check-list,
.plain-list,
.outcome-list,
.category-nav {
  margin: var(--space-6) 0 0;
  padding: 0;
  list-style: none;
  max-width: 68ch;
}

.tick-list li,
.cross-list li,
.check-list li,
.plain-list li,
.outcome-list li,
.category-nav li {
  position: relative;
  margin-bottom: var(--space-3);
  padding-inline-start: var(--space-6);
  color: var(--fg-2);
}

.tick-list li::before,
.cross-list li::before,
.check-list li::before,
.plain-list li::before {
  position: absolute;
  inset-inline-start: 0;
  color: var(--accent);
  font-weight: 700;
}

.tick-list li::before,
.check-list li::before {
  content: '\2014';
}

.cross-list li::before {
  content: '\00D7';
  color: var(--muted);
}

.plain-list li::before {
  content: '\00B7';
  color: var(--muted);
}

.outcome-list {
  counter-reset: outcome;
}

.outcome-list li {
  counter-increment: outcome;
  padding-inline-start: var(--space-8);
}

.outcome-list li::before {
  content: counter(outcome);
  position: absolute;
  inset-inline-start: 0;
  top: 0.25em;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--fg);
}

.category-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-nav li {
  margin: 0;
  padding: 0;
}

.category-nav a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--fg);
  font-size: var(--text-sm);
  text-decoration: none;
}

.category-nav a:hover {
  border-color: var(--fg);
}

.category-nav .count {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.list-reset {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ─── the Between Line (GRAPHICS.md) ──────────────────────────────────────── */

/*
 * Real progression only. The green node is the single place the accent appears on
 * a marketing page, which is what "scarce and semantic" means in practice.
 */
.between-steps {
  position: relative;
  display: grid;
  gap: var(--space-6);
  margin: var(--space-8) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.between-steps::before {
  content: '';
  position: absolute;
  inset-inline-start: 0.75rem;
  top: 0.75rem;
  bottom: 0.75rem;
  width: 1px;
  background: var(--border);
}

.step {
  position: relative;
  padding-inline-start: var(--space-8);
}

.step-node {
  position: absolute;
  inset-inline-start: 0;
  top: 0.1em;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--accent);
  border-radius: var(--radius-sm);
  color: var(--accent-on);
  font-size: var(--text-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.step-label {
  display: block;
  font-weight: 600;
}

.step-note {
  display: block;
  color: var(--fg-2);
  font-size: var(--text-sm);
}

@media (min-width: 1000px) {
  .between-steps {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
  }

  .between-steps::before {
    inset-inline: 0.75rem;
    top: 0.75rem;
    bottom: auto;
    width: auto;
    height: 1px;
  }

  .step {
    padding-inline-start: 0;
    padding-top: var(--space-6);
  }
}

/* ─── figure library (views/public/figures.ts) ────────────────────────────── */

/*
 * The figure module carries its geometry as SVG presentation attributes, so a
 * figure is legible with no stylesheet at all. What CSS owns here is the two
 * things an attribute cannot express: the figure's box in the page, and the
 * behaviour of the parts that must stay out of the drawing.
 *
 * Colour stays on the page's own vocabulary: ink for a stage name, `--fg-2` for its
 * detail, `--muted` for a note and for structure. The accent is not restated here —
 * where a figure makes a state claim it already carries `--accent` inside its own
 * markup, which is the only place it should be decided.
 */

.bb-figure {
  margin: 0;
  max-width: 100%;
}

.bb-figure svg {
  display: block;
  width: 100%;
  height: auto;
}

.bb-figure-caption {
  margin: var(--space-4) 0 0;
  max-width: 68ch;
  color: var(--muted);
  font-size: var(--text-sm);
}

/*
 * THE ACCESSIBLE HALF OF THE BETWEEN LINE. `betweenLineFlow()` emits the same
 * stages twice: an `aria-hidden` SVG, which is the drawing, and an ordered list,
 * which is the content a screen reader reads. The list is clipped, never
 * `display: none` — `display: none` would take it out of the accessibility tree and
 * leave the figure with no content at all. This is the standard clip-rect utility,
 * and it deliberately has no breakpoint: a sighted reader sees the line at every
 * width and hears nothing, a screen-reader user hears the stages in order.
 */
.bb-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/*
 * WIDE SCHEMATICS AND THE PHONE. A caption set inside SVG `<text>` cannot wrap or
 * reflow, so one viewBox has to stay legible from a 360px phone to a 1080px band.
 * These figures keep their authored scale inside a scroll container instead of
 * shrinking until an 11px caption is 4px off the page — the same treatment
 * `.table-scroll` already gives a wide table. Each `min-width` is the width at which
 * that figure's smallest caption still clears about 10px, so the scroll is short,
 * and on the desktop container nothing scrolls at all.
 */
.bb-figure-flow,
.bb-figure-request,
.bb-figure-wayfinding,
.bb-figure-time {
  overflow-x: auto;
  /*
   * A FADE THAT SAYS "THERE IS MORE", because a clipped edge says nothing.
   *
   * Below the point where these figures fit, the diagram is cut mid-word with no
   * indication it can be scrolled - the same failure the mobile nav had when "Trust"
   * rendered as "Trus". The gradient sits on the right edge of the visible area and
   * reads as content continuing rather than content ending.
   *
   * `background-attachment: local` makes the fade scroll away with the content, so it
   * disappears once the reader has reached the end rather than lying to them. That is
   * the one part of this that cannot be done without it.
   */
  background-image: linear-gradient(to right, transparent, var(--surface));
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 2.5rem 100%;
  background-attachment: local;
}

@media (min-width: 1000px) {
  /* Above this the figures fit, so there is nothing to signal. */
  .bb-figure-flow,
  .bb-figure-request,
  .bb-figure-wayfinding,
  .bb-figure-time {
    background-image: none;
  }
}

.bb-flow-svg {
  min-width: 62rem;
}

.bb-request-svg {
  min-width: 60rem;
}

.bb-wf-svg {
  min-width: 46rem;
}

.bb-time-svg {
  min-width: 60rem;
}

/* ─── verification and taxonomy rows ──────────────────────────────────────── */

/*
 * `verificationFigure()`. The glyph is the first column and the label and its
 * detail stack in the second, so a row reads as a heading with a description rather
 * than as one run-on line. `display: contents` on the wrapper lets the mark and the
 * name take the grid columns directly, which keeps the glyph on the label's baseline
 * instead of the row's centre.
 */
.bb-verify-list {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  max-width: 68ch;
  list-style: none;
}

.bb-verify-item {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  column-gap: var(--space-3);
  row-gap: 2px;
  align-items: center;
}

.bb-verify-head {
  display: contents;
}

.bb-verify-mark {
  grid-column: 1;
  grid-row: 1;
  color: var(--fg-2);
  line-height: 0;
}

.bb-verify-mark svg,
.bb-verify-not-mark svg {
  width: 1.25rem;
  height: 1.25rem;
}

.bb-verify-name {
  grid-column: 2;
  grid-row: 1;
  color: var(--fg);
  font-weight: 600;
}

.bb-verify-detail {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  color: var(--fg-2);
  font-size: var(--text-sm);
}

.bb-verify-not {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  column-gap: var(--space-3);
  align-items: start;
  margin: var(--space-6) 0 0;
  padding-top: var(--space-5);
  max-width: 68ch;
  border-top: 1px solid var(--border-soft);
}

.bb-verify-not-mark {
  color: var(--muted);
  line-height: 0;
}

.bb-verify-not-text {
  color: var(--fg-2);
  font-size: var(--text-sm);
}

/*
 * `serviceTaxonomyFigure()`. The order is the list's own and the marker is the only
 * number on the row — the drawn zero-padded index that used to sit beside it is
 * gone, because two numbers said the same thing twice. The `li` stays a list item
 * rather than becoming a grid or flex box, because a marker is only generated for
 * `display: list-item`, and that marker is now what carries the count.
 */
.bb-tax-list {
  margin: 0;
  padding-inline-start: var(--space-8);
  max-width: 42rem;
  list-style: decimal-leading-zero;
}

.bb-tax-item {
  padding-block: var(--space-3);
  border-top: 1px solid var(--border-soft);
  color: var(--fg);
}

.bb-tax-item::marker {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.bb-tax-glyph {
  display: inline-flex;
  margin-inline-end: var(--space-3);
  color: var(--fg-2);
  vertical-align: middle;
}

.bb-tax-glyph svg {
  width: 1.25rem;
  height: 1.25rem;
}

.bb-tax-name {
  vertical-align: middle;
}

.bb-tax-scope {
  margin: var(--space-6) 0 0;
  padding-top: var(--space-5);
  max-width: 68ch;
  border-top: 1px solid var(--border-soft);
  color: var(--fg-2);
  font-size: var(--text-sm);
}

/* ─── cards ───────────────────────────────────────────────────────────────── */

.card-row {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-6);
}

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

@media (min-width: 1000px) {
  .card-row-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card {
  display: block;
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: inherit;
  text-decoration: none;
}

a.card:hover {
  border-color: var(--fg);
}

.card h3 {
  margin: 0 0 var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
}

.card p {
  margin: 0;
  color: var(--fg-2);
  font-size: var(--text-sm);
}

.card-plain {
  background: transparent;
}

/* ─── service list ────────────────────────────────────────────────────────── */

.service-list {
  display: grid;
  gap: 0;
  margin-top: var(--space-8);
  border-top: 1px solid var(--border);
}

.service {
  padding-block: var(--space-6);
  border-bottom: 1px solid var(--border-soft);
}

.service h3 {
  margin: 0 0 var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  letter-spacing: var(--tracking-display);
}

.service-summary {
  margin: 0 0 var(--space-3);
  max-width: 60ch;
  font-size: var(--text-base);
  color: var(--fg);
}

.service p:last-child {
  margin: 0;
  max-width: 68ch;
  color: var(--fg-2);
}

/* ─── guide grid ──────────────────────────────────────────────────────────── */

.guide-grid {
  display: grid;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

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

@media (min-width: 1000px) {
  .guide-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.guide-link {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  height: 100%;
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: inherit;
  text-decoration: none;
}

.guide-link:hover {
  border-color: var(--fg);
}

.guide-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.guide-category {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.guide-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: var(--tracking-display);
}

.guide-summary {
  color: var(--fg-2);
  font-size: var(--text-sm);
}

.guide-meta {
  margin-top: auto;
  padding-top: var(--space-2);
  color: var(--muted);
  font-size: var(--text-xs);
}

/* ─── article ─────────────────────────────────────────────────────────────── */

.article {
  margin-top: var(--space-6);
}

.article-hero {
  margin: 0 0 var(--space-8);
}

.article-hero img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.article-hero figcaption {
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: var(--text-xs);
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: 0 0 var(--space-8);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--text-sm);
}

.article-author {
  color: var(--fg);
  font-weight: 600;
}

.article-body {
  max-width: 68ch;
}

.article-body > p:first-of-type {
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--fg-2);
}

.article-sources {
  max-width: 68ch;
  margin-top: var(--section-y-phone);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}

.article-sources h2 {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
}

.article-sources ol {
  margin: 0;
  padding-inline-start: var(--space-5);
  color: var(--fg-2);
  font-size: var(--text-sm);
}

.article-sources li {
  margin-bottom: var(--space-2);
}

.article-sources a {
  color: var(--fg);
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

/* ─── notices and calls to action ─────────────────────────────────────────── */

.notice {
  margin-top: var(--section-y-phone);
  padding: var(--space-6);
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-inline-start: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  max-width: 68ch;
}

.notice-title {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
}

.notice p {
  margin: 0 0 var(--space-3);
  color: var(--fg-2);
}

.notice p:last-child {
  margin-bottom: 0;
}

.notice a {
  color: var(--fg);
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  margin: var(--space-6) 0 0;
}

.cta-note {
  color: var(--muted);
  font-size: var(--text-sm);
}

.band-cta .cta-row {
  margin-top: var(--space-5);
}

.band-cta .btn {
  border-color: var(--bg);
  background: var(--bg);
  color: var(--fg);
}

.band-cta .btn:hover {
  background: transparent;
  color: var(--bg);
}

.contact-big {
  margin: var(--space-4) 0 var(--space-6);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw + 0.8rem, var(--text-2xl));
  word-break: break-word;
}

.contact-big a {
  color: var(--fg);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
 * THE SEARCH-FIRST SURFACES
 *
 * Three objects, and the rules they have to honour are the ones the rest of this
 * file already follows: consumer geometry stays near-sharp (`--radius-sm`/
 * `--radius-md`, never `--radius-pill` on chrome), there is no `box-shadow` other
 * than the focus ring, and colour is semantic rather than decorative.
 *
 * The one thing added here that is genuinely new is the TRUTH STATE on a result
 * row. It is rendered as text first — "Available now", "We can source this",
 * "Guide" — and the modifiers below only reinforce it. Nothing in this file may
 * make a state readable by colour alone, because a state that is distinguished only
 * by colour is not distinguished at all for a reader who cannot see it.
 * ═══════════════════════════════════════════════════════════════════════════ */

/*
 * Screen-reader-only text.
 *
 * `views/public/search.ts` labels the search field with a help paragraph carrying
 * this class, and it was never defined — so the help text rendered as visible
 * instruction copy under every search bar in the product. Clipped rather than
 * `display: none`, because assistive technology still has to reach it.
 */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ─── the search bar ──────────────────────────────────────────────────────── */

/*
 * The search bar is the page's first object on `/search` and `/explore`, directly
 * under the masthead. Without this it butts against the standfirst — the label sat
 * immediately under the last line of the lede, which reads as a rendering fault
 * rather than as a group change.
 */
.search-page,
.explore-page {
  margin-top: var(--space-8);
}

.searchbar {
  display: grid;
  gap: var(--space-3);
  margin: 0;
}

/*
 * `minmax(0, 1fr)`, and that is a correctness requirement rather than a style.
 *
 * A grid track defaults to `min-width: auto`, and an `<input>` has an intrinsic
 * min-content width of about twenty characters. A plain `1fr` therefore cannot
 * shrink below roughly 180px per field, and the two-field bar pushed the document
 * wider than a 360px viewport — the exact defect the public-site QA pass catches
 * with `scrollWidth > innerWidth`, and the kind that is invisible in an HTML test.
 */
@media (min-width: 760px) {
  .searchbar {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) auto;
    align-items: end;
  }
}

.searchbar__slot {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}

.searchbar__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.searchbar__input {
  width: 100%;
  min-width: 0;
  padding: var(--space-3) var(--space-4);
  font: inherit;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.searchbar__input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.searchbar__input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/*
 * A real button, and a thumb-sized one: 44px tall clears the design system's own
 * mobile floor, which is well above the 24px WCAG 2.2 asks for. Ink rather than
 * accent, because every primary action in this system is ink and the green is kept
 * for proven state.
 */
.searchbar__submit {
  min-height: 44px;
  padding: var(--space-3) var(--space-6);
  font: inherit;
  font-weight: 600;
  color: var(--accent-on);
  background: var(--fg);
  border: 1px solid var(--fg);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.searchbar__submit:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/*
 * Autocomplete is a progressive enhancement and nothing here depends on it: with no
 * script the list stays empty and `hidden`, and the form above submits exactly as it
 * does today.
 */
.searchbar__suggestions {
  margin: 0;
  padding: 0;
  list-style: none;
}

/*
 * The home variant is the page's subject, so it gets its own surface and its own
 * weight. `--radius-md` is 3px: the near-sharp ceiling holds, and there is no
 * shadow — the hairline is the edge.
 */
.searchbar--home {
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

/*
 * The area and overview pages still run the older hero composition — a `<h1>` and a
 * prose block, then the photographic field — where the gap between the text and the
 * image has to sit on the adjacency rather than on `.hero`.
 *
 * The homepage no longer matches this selector, and that is the 2026-10-03 change: its
 * field is its own band (`.cinema`) placed directly after the search act, so it owns
 * its own spacing instead of inheriting the hero's.
 */
.hero-body + .hero-field {
  margin-top: var(--space-8);
}

/* ─── results ─────────────────────────────────────────────────────────────── */

.search-page__heading {
  margin: var(--space-8) 0 0;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.25;
}

.results {
  margin: var(--space-6) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border-soft);
}

.result {
  border-bottom: 1px solid var(--border-soft);
}

.result__body {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-5) 0;
  color: inherit;
  text-decoration: none;
}

@media (min-width: 760px) {
  .result__body {
    grid-template-columns: 12rem minmax(0, 1fr);
    align-items: baseline;
    column-gap: var(--space-5);
  }

  .result__detail {
    grid-column: 2;
  }
}

.result__label {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.3;
}

/* The row is a link without an underline, so it has to earn its affordance: the
   label underlines on hover, which is where a pointer user looks. */
.result__body:hover .result__label {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.result__detail {
  margin: 0;
  max-width: 58ch;
  color: var(--fg-2);
  font-size: var(--text-sm);
}

.result__state {
  justify-self: start;
  align-self: start;
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--fg-2);
}

/*
 * `--success` is reserved for PROVEN availability, and this is the only rule in this
 * file allowed to use it. The day an area is BOOKABLE and real inventory exists,
 * this is what a visitor will see; until then nothing can render it.
 */
.result__state--available {
  color: var(--accent-on);
  background: var(--success);
  border-color: var(--success);
}

/*
 * "We can source this" is an ACTION, not a warning and not a success. It is inked on
 * the warm surface so it reads as the actionable state without borrowing the colour
 * that means "confirmed".
 */
.result__state--request {
  color: var(--fg);
  background: var(--surface-warm);
  border-color: var(--border);
}

/* A guide is editorial. Muted, so it can never be mistaken for supply. */
.result__state--guide_only {
  color: var(--muted);
  background: var(--bg);
  border-color: var(--border-soft);
}

/*
 * The honest empty state. It is a panel, not an error: nothing has failed, the
 * catalogue simply does not know this term, and the page says so plainly.
 */
.empty {
  margin-top: var(--space-6);
  padding: var(--space-6);
  background: var(--surface-warm);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
}

.empty__lead {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--fg);
}

.search-page__browse {
  margin-top: var(--space-8);
}

/* ─── explore ─────────────────────────────────────────────────────────────── */

.explore-group {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-soft);
}

.explore-group__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.explore-group__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.25;
}

.explore-group__blurb {
  margin: var(--space-3) 0 0;
  max-width: 60ch;
  color: var(--fg-2);
}

.explore-group__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
}

/*
 * A chip is a real control, so it carries a real touch target.
 *
 * `MOBILE.md:107` sets 44px as the interactive minimum, and this is where that is
 * enforced for the whole chip family rather than per-surface: `/explore` and the
 * homepage discovery index render the same object, so a floor set on one of them
 * would just be a second opinion. Measured at 40px before this rule existed, on the
 * homepage's six primary discovery groups and on every `/explore` group.
 *
 * `inline-flex` is what lets the floor work on a single line of text: an inline box
 * cannot grow to a minimum height around its content.
 */
.explore-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.explore-chip:hover {
  color: var(--accent-hover);
  border-color: var(--accent);
}

/* ─── the persistent bottom navigation ────────────────────────────────────── */

/*
 * 64px, hairline, NO shadow, no pill — `docs/design/MOBILE.md` and REFERENCE_LOCK
 * §7.6. Depth comes from the hairline and the surface shift, which is what the
 * system permits for chrome; a raised, rounded tab bar is the default this design
 * language exists to avoid.
 *
 * `env(safe-area-inset-bottom)` is added rather than assumed. Without a
 * `viewport-fit=cover` viewport it resolves to 0, and on a device that reports one
 * it is the difference between the row of labels and the home indicator.
 */
.tabbar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 10;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  box-shadow: none;
}

/*
 * The list carries the page gutter, and that is a measured fix rather than a
 * flourish. `layout-gutter-gate.mjs` treats `LI` as a text-holding element and
 * measures its content box, so a full-bleed `<li>` reports L0 even though its text
 * is centred inside a child span — and a 105-hit finding is what that looks like.
 * Reserving the gutter here means the bar's contents line up with the reading column
 * on every page, and no label can ever sit within 12px of the viewport edge.
 */
.tabbar__list {
  display: flex;
  align-items: stretch;
  max-width: var(--container-max);
  height: 64px;
  margin-inline: auto;
  padding: 0 var(--gutter);
  list-style: none;
}

.tabbar__item {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
}

.tabbar__link {
  display: grid;
  flex: 1;
  grid-template-rows: 22px auto;
  place-items: center;
  align-content: center;
  gap: 2px;
  /*
   * 44px is the interactive minimum (`MOBILE.md:107`) and is stated HERE rather than
   * inherited from the 64px bar. The bar height is a visual decision; the touch
   * target is an accessibility floor, so a future change to the bar must not be able
   * to drop the target below it without this line being edited on purpose.
   */
  min-height: 44px;
  min-width: 44px;
  padding: var(--space-1);
  color: var(--muted);
  text-decoration: none;
}

/* The glyph is redundant with the visible label, so it is `aria-hidden` upstream and
   carries no state of its own — it only shifts with the label's ink. */
.tabbar__glyph {
  display: block;
  line-height: 0;
}

.tabbar__glyph .bb-icon {
  width: 22px;
  height: 22px;
}

.tabbar__link:hover {
  color: var(--fg);
}

/*
 * 10px monospace at +0.07em tracking is the metadata voice `MOBILE.md:55` names, and
 * it is what stops the bar reading as the website's link row. Uppercase matches the
 * same voice as `.eyebrow` above.
 */
.tabbar__label {
  display: block;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

/*
 * The current destination is carried three ways on purpose: `aria-current="page"`
 * in the markup, the ink change here, and a visible 1px rule. Colour alone would be
 * a state a colour-blind or greyscale reader cannot see, and a filled accent pill is
 * specifically refused (`MOBILE.md:56-57`).
 */
.tabbar__link.is-current {
  color: var(--fg);
  font-weight: 600;
}

.tabbar__link.is-current .tabbar__label {
  border-bottom-color: var(--accent);
}

/*
 * The bar is fixed, so the document reserves its height or the last row of the
 * footer sits underneath it. Only a page that actually renders the bar carries the
 * class — `/find` has no bar and therefore no unexplained gap at the bottom.
 */
.site.has-tabbar {
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}

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

.site-foot {
  margin-top: var(--section-y-phone);
  padding-block: var(--section-y-phone) var(--space-6);
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: var(--text-sm);
}

.foot-inner {
  display: grid;
  gap: var(--space-6);
}

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

@media (min-width: 1000px) {
  .foot-inner {
    grid-template-columns: 1fr 2fr 1fr;
  }
}

.foot-name {
  margin: 0 0 var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-lg);
}

.foot-inner .meta,
.foot-honesty .meta {
  margin: 0;
  color: var(--muted);
}

.foot-nav ul {
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}

.foot-nav a {
  color: var(--fg-2);
  text-decoration: none;
}

.foot-nav a:hover {
  color: var(--fg);
  text-decoration: underline;
}

.foot-contact a {
  color: var(--fg);
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

.foot-honesty {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-soft);
}

.foot-honesty .meta {
  max-width: 68ch;
}

/* ─── small print ─────────────────────────────────────────────────────────── */

.site .meta {
  color: var(--muted);
  font-size: var(--text-xs);
}

/* Windows High Contrast / forced-colors: make sure the steps survive. */
@media (forced-colors: active) {
  .step-node {
    border: 1px solid CanvasText;
  }

  .site .btn {
    border: 1px solid ButtonText;
  }
}

/* ─── the three app destinations ──────────────────────────────────────────────
 *
 * `/near-me`, `/requests` and `/you`. The classes below intentionally reuse the
 * vocabulary the rest of the site already has — `result__state` for a truth label,
 * `btn`/`btn-primary` for an action — so a state never acquires a second visual
 * language on a new page. Nothing here uses a shadow or a radius above the 4px the
 * design system allows, and the only new colours are existing tokens.
 */

.near-me-page,
.requests-page,
.you-page {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.location-panel {
  border: 1px solid var(--border);
  padding: var(--space-5);
  background: var(--surface);
}

.location-panel__title,
.near-me-areas__title,
.request-lifecycle__title,
.you-block__title {
  font-size: var(--text-lg);
  margin: 0 0 var(--space-2);
}

.location-panel__lead,
.location-panel__note,
.near-me-areas__lead,
.you-block__lead {
  color: var(--muted);
  margin: 0 0 var(--space-3);
  max-width: 62ch;
}

.location-panel__note {
  border-top: 1px solid var(--border-soft);
  padding-top: var(--space-3);
  font-size: var(--text-sm);
}

.location-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin: 0 0 var(--space-3);
}

.location-panel__status {
  color: var(--muted);
  font-size: var(--text-sm);
}

.area-choices,
.request-states,
.you-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.area-choice__link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  /* 44px, not 24: this is a primary choice on a phone, and the design system's own
     touch minimum is the right floor for it. */
  min-height: var(--bb-touch-min);
  padding: var(--space-3);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--fg);
  background: var(--surface);
}

.area-choice__link:hover {
  border-color: var(--fg);
}

.request-state,
.you-item {
  border-top: 1px solid var(--border-soft);
  padding: var(--space-3) 0;
  display: grid;
  gap: var(--space-1);
}

.request-state__title {
  font-weight: 600;
}

.request-state__meaning {
  color: var(--muted);
  max-width: 62ch;
}

.you-link {
  color: var(--fg);
}
/* ─── preview chip ────────────────────────────────────────────────────────────
 * Small and factual. It names the branch and the commit so a reviewer always knows
 * which build they are looking at, and it must never read as an error banner on a
 * build that is unfinished on purpose.
 */
.preview-chip {
  background: var(--fg);
  color: var(--surface);
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
  padding: 4px var(--bb-mobile-gutter);
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
 * THE SEARCH-FIRST HOMEPAGE
 *
 * WHAT THIS SECTION IS
 * --------------------
 * The homepage was rebuilt 2026-10-03 because the founder rejected its
 * information architecture, not its polish. The rejected page ran six explanatory
 * bands — "What BaliBetween does", "How it works", "Explore Bali", the eight
 * categories, the trust statement, the close — which is a document: it asks a
 * stranger to READ before they can ASK, and every one of those bands duplicated a
 * page that already carries the same content (`/how-it-works`, `/services`,
 * `/trust`, `/bali`).
 *
 * The approved direction is a search-first Bali local demand network. The page now
 * runs three things in order: the search act, a photographic field so the page
 * feels like Bali before it explains anything, and a discovery index whose every
 * entry states what it can actually do today. Nothing below describes the company.
 *
 * WHY THE CLASSES REUSE `.explore-*`
 * ----------------------------------
 * The discovery index is deliberately the SAME markup grammar as `/explore`, so a
 * change to how a truth state is rendered cannot reach one surface and miss the
 * other. Only the hero, the photographic field and the fact strip need new rules.
 * ═════════════════════════════════════════════════════════════════════════════ */

/* ─── the search act ──────────────────────────────────────────────────────── */

/* No margin override: `.hero` in `editorial.css` already owns the gap above the
   composition, and that file loads after this one. */
.hero-search__title {
  margin: 0 0 var(--space-4);
  max-width: 26ch;
}

/*
 * The chips are SEARCH SUGGESTIONS, not inventory. They are the same `.explore-chip`
 * object `/explore` uses — which now carries its own 44px target — and `need-chip` is
 * kept purely as the hook that distinguishes the hero's row from a discovery group's
 * list, so the two can be asserted separately without either owning the floor.
 */
.need-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
}

/*
 * One short sentence, not a paragraph. It exists because a row of need chips could
 * otherwise be read as a menu of things that are bookable, and today nothing is.
 */
.hero-search__state {
  margin: var(--space-4) 0 0;
  max-width: 66ch;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--muted);
}

/* ─── the photographic field ──────────────────────────────────────────────── */

/*
 * Asymmetric on purpose (Porto Rocha owns editorial composition in the lock): a
 * full-bleed 21:9 lead with an offset pair beneath it, rather than three equal
 * cards. Equal tiles are the "card soup" grammar the lock refuses.
 */
.cinema {
  margin: var(--space-10) 0 0;
}

.cinema-grid {
  display: grid;
  gap: var(--space-3);
}

.cinema-caption {
  margin: var(--space-4) 0 0;
  max-width: 62ch;
  font-size: var(--text-sm);
  color: var(--muted);
}

/*
 * Below the 12-column breakpoint the pair stacks full-width, and an aspect ratio then
 * grows with the column rather than with the design: measured at 768px, the 4:5
 * portrait became a 630x787 block — a full-screen photograph inside a discovery band
 * rather than an editorial detail beside the search.
 *
 * The cap is applied to the FRAME, so `object-fit: cover` crops the photograph instead
 * of squashing it, and the composition keeps its proportions at every width below 900.
 * The 21:9 lead never reaches the cap (270px at 768), so the asymmetric relationship
 * between the lead and the pair survives the constraint.
 */
@media (max-width: 899px) {
  .cinema-grid .bb-editorial__frame {
    max-height: 22rem;
  }
}

@media (min-width: 900px) {
  .cinema-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--space-5);
    row-gap: var(--space-5);
    align-items: start;
  }

  /* Lead spans the full measure. */
  .cinema-lead {
    grid-column: 1 / -1;
  }

  /* The pair is deliberately NOT centred: the portrait starts one column in, so the
     composition has a heavy left margin and an open right — the asymmetry is the
     point, and centring it would turn the band back into a gallery row. */
  .cinema-pair-portrait {
    grid-column: 2 / 7;
  }

  .cinema-pair-wide {
    grid-column: 7 / 13;
  }

  .cinema-grid .cinema-caption {
    grid-column: 2 / 13;
  }
}

/* ─── the compressed fact strip ───────────────────────────────────────────── */

/*
 * Four short facts, not a verification whitepaper. Long-form policy lives on
 * `/trust` and `/how-it-works`, which both already carry it; the homepage states
 * the position once and links out.
 *
 * There is deliberately no `.band--facts` rule. The band's hairline and its section
 * padding come from `.band`, and restating them here would be a second copy of the
 * same values — the class is a hook, exactly like `.band--areas`.
 */
.fact-strip {
  display: grid;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 760px) {
  .fact-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-8);
  }
}

@media (min-width: 1100px) {
  .fact-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.fact-strip__item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
}

.fact-strip__item svg {
  color: var(--accent);
  margin-top: 2px;
}

.fact-strip__item p {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--fg-2);
}

.fact-strip__item strong {
  display: block;
  margin-bottom: 2px;
  font-weight: 600;
  color: var(--fg);
}