/* ─────────────────────────────────────────────────────────────────────────
 * BaliBetween consumer surface stylesheet.
 *
 * EVERY value here comes from `tokens.css` (a verbatim copy of
 * design/open-design/design-systems/balibetween/tokens.css). No colour, radius,
 * shadow or type value is invented in this file, because a hand-picked hex is how
 * a design system drifts one component at a time.
 *
 * The decisions the reference lock actually constrains, and where they are applied:
 *   * primary transaction CTA is deep ink `--fg`, never `--accent`  → `.btn-primary`
 *   * botanical green is scarce and semantic only                   → selection,
 *     focus, and the Between Line's active progress
 *   * near-sharp geometry (<= 4px) and NO default shadow            → `.option`,
 *     `.manifest`, `.card`
 *   * pills are for status chips only                               → `.chip`
 *   * no gradients, no glassmorphism                                → everywhere
 *   * indeterminate work gets no progress bar and no percentage     → no such rule
 *     exists in this file on purpose
 * ───────────────────────────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
}

/* ─── layout ─────────────────────────────────────────────────────────────── */

.wrap {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-gutter-phone);
}

.site-head {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.head-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

/*
 * THE CANONICAL LOCKUP, ON THE TRANSACTIONAL SHELL.
 *
 * `brandLockup()` in `views/public/components.ts` owns this markup, and the class names
 * below are the lockup's own — the same ones `site.css` styles for the public shell. The
 * two shells share the token stylesheet and the mark and nothing else, so a lockup that
 * has to appear in both is expressed twice, off the SAME names and the SAME tokens. That
 * is the rule the BB-DS block at the foot of this file states at length.
 *
 * WHAT WAS HERE BEFORE: `.brand` was a bare text wordmark — a font, a size and a colour.
 * The shell rendered "BaliBetween" as a styled word and the public shell rendered the
 * emblem-plus-wordmark lockup, which is `SCREEN_PATTERN_CONFLICTS.md` C5: one product
 * showing two different logos, the transactional one being an approximation of the
 * canonical mark.
 *
 * THE EMBLEM IS REFERENCED, NEVER REDRAWN. The `<img>` points at the canonical file
 * served from `/brand/balibetween-mark-primary.svg`, at its intrinsic proportions, in its
 * own colours. `width`/`height` are on the element, so the box is reserved before the
 * bytes arrive and the bar cannot shift as the mark loads.
 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  /*
   * THE 44px FLOOR ON THE BRAND LINK (project policy, WCAG 2.5.8 is 24x24).
   *
   * Measured at 145x24, so it MET the AA criterion and violated the repository's own
   * 44px touch-target rule. `min-height` grows the HIT AREA only: the emblem inside stays
   * at the 24px the shell passes to `brandLockup()`, because the box is centred rather
   * than stretched. `site.css` already gives the public shell's lockup this floor
   * (`.site .brand { min-height: var(--bb-touch-min) }`), so this also removes a
   * difference between the two shells rather than adding one.
   */
  min-height: var(--bb-touch-min);
  color: var(--fg);
  text-decoration: none;
}

/*
 * The glyph slot. The public shell fills it with a bone plate on a dark tile; here it is
 * a bare box. The wrapper is presentation only — `components.ts` says so explicitly — and
 * the mark inside it is the same file either way, so a compact bar can hold the lockup
 * without the tile.
 */
.brand-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.brand-mark {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  flex: none;
}

/* Matches the `size` the shell passes to `brandLockup()`, so the reserved box and the
   rendered box are the same number rather than two numbers that can drift. */
.brand--horizontal .brand-mark {
  width: 24px;
  height: 24px;
}

/* A real element rather than a `border-left` on the wordmark, so the rule cannot be
   swallowed by the text's own line box. `aria-hidden` in the markup: a rule between two
   pieces of text is not content. */
.brand-divider {
  display: block;
  width: 1px;
  height: 1.5rem;
  flex: none;
  background: var(--bb-border-sand);
}

.brand-text {
  display: inline-flex;
  align-items: baseline;
  min-width: 0;
}

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

.brand-subline,
.bb-coord {
  display: block;
  font-family: var(--font-body);
  font-size: var(--bb-micro-floor);
  font-weight: var(--bb-micro-weight);
  letter-spacing: var(--bb-micro-tracking);
  text-transform: uppercase;
  color: var(--muted);
}

.head-meta {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--muted);
}

main.wrap {
  padding-top: var(--section-y-phone);
  padding-bottom: var(--section-y-phone);
}

.site-foot {
  border-top: 1px solid var(--border);
  padding: var(--space-6) 0;
  margin-top: var(--section-y-phone);
}

.site-foot .meta {
  max-width: 62ch;
}

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

  main.wrap {
    padding-top: var(--section-y-tablet);
    padding-bottom: var(--section-y-tablet);
  }

  .site-foot {
    margin-top: var(--section-y-tablet);
  }
}

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

  main.wrap {
    padding-top: var(--section-y-desktop);
    padding-bottom: var(--section-y-desktop);
  }

  .site-foot {
    margin-top: var(--section-y-desktop);
  }
}

/* ─── type ───────────────────────────────────────────────────────────────── */

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

.page-title {
  margin: 0 0 var(--space-4);
  font-size: var(--text-2xl);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  font-weight: 600;
}

.lead {
  margin: 0 0 var(--space-6);
  max-width: 62ch;
  color: var(--fg-2);
}

p {
  margin: 0 0 var(--space-4);
  color: var(--fg-2);
  max-width: 62ch;
}

.meta {
  font-size: var(--text-sm);
  color: var(--meta);
  margin: 0 0 var(--space-3);
}

h2,
h3 {
  margin: var(--space-8) 0 var(--space-3);
  font-size: var(--text-lg);
  line-height: var(--leading-tight);
  color: var(--fg);
}

a {
  color: var(--fg);
}

/* ─── the Between Line ───────────────────────────────────────────────────── */

.between {
  position: relative;
  margin-top: var(--space-8);
  padding-left: var(--space-6);
}

.between::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

/* Accent green appears ONLY where the rule marks real, active progress. */
.between[data-progress='active']::before {
  background: var(--accent);
}

.between-steps {
  margin: 0;
}

/* ─── the intent rail ────────────────────────────────────────────────────── */

.intent-rail {
  display: grid;
  gap: var(--space-2) var(--space-6);
  grid-template-columns: 1fr;
  margin: 0 0 var(--space-8);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.rail-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
}

.rail-row dt {
  font-size: var(--text-sm);
  color: var(--muted);
}

.rail-row dd {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

@media (min-width: 700px) {
  .intent-rail {
    grid-template-columns: repeat(3, 1fr);
    align-items: baseline;
  }

  .rail-row {
    display: block;
  }

  .rail-row dd {
    text-align: left;
    margin-top: var(--space-1);
  }
}

/* ─── forms ──────────────────────────────────────────────────────────────── */

.field-grid {
  display: grid;
  gap: var(--space-4) var(--space-6);
  grid-template-columns: 1fr;
  margin: 0 0 var(--space-6);
}

@media (min-width: 700px) {
  .field-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  margin: 0;
}

label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  color: var(--muted);
}

input,
select {
  font: inherit;
  width: 100%;
  padding: var(--space-3);
  min-height: 44px;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

input:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible,
.option:focus-within {
  outline: none;
  box-shadow: var(--focus-ring);
}

.actions {
  margin: var(--space-6) 0 0;
}

/* Primary transaction action: deep ink, per the reference lock. */
.btn {
  display: inline-block;
  font: inherit;
  font-size: var(--text-sm);
  min-height: 44px;
  padding: var(--space-3) var(--space-5);
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: none;
}

.btn-primary {
  background: var(--fg);
  color: var(--accent-on);
  border-color: var(--fg);
}

.btn-quiet {
  background: transparent;
  color: var(--muted);
}

.notice {
  border-left: 2px solid var(--success);
  padding-left: var(--space-4);
  color: var(--fg-2);
}

.error {
  border-left: 2px solid var(--danger);
  padding-left: var(--space-4);
  color: var(--fg);
}

/* ─── status chips (the only pill in the system) ─────────────────────────── */

.chip {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--muted);
}

.chip[data-semantic='success'] {
  color: var(--success);
  border-color: var(--success);
}

.chip[data-semantic='warn'] {
  color: var(--warn);
  border-color: var(--warn);
}

/* ─── the waiting surface ────────────────────────────────────────────────── */

.wait {
  margin-bottom: var(--space-6);
}

.status {
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.status-line {
  margin: 0 0 var(--space-2);
  max-width: 56ch;
  font-size: var(--text-xl);
  line-height: var(--leading-tight);
  color: var(--fg);
}

.status-count {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* State is carried by the text AND the label, never by colour alone. */
.wait[data-phase='EXHAUSTED'] .status,
.wait[data-phase='NO_PROVIDERS_REACHABLE'] .status {
  border-bottom-style: dashed;
}

/* ─── the stacked manifest ───────────────────────────────────────────────── */

.manifest {
  margin: 0;
}

.option {
  display: block;
  position: relative;
  padding: var(--space-5) 0 var(--space-5) var(--space-4);
  border-top: 1px solid var(--border);
  /* No fill, no radius, no shadow: the reference lock rejects the rounded card
     grid here because it makes non-interchangeable choices look interchangeable. */
  background: none;
  cursor: pointer;
}

.manifest .option:last-of-type {
  border-bottom: 1px solid var(--border);
}

.option-body {
  display: block;
}

.option-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
}

.option-name {
  color: var(--fg);
  font-weight: 500;
}

.option-price {
  color: var(--fg);
  font-size: var(--text-lg);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.option-what,
.option-when,
.option-note {
  display: block;
  font-size: var(--text-sm);
  color: var(--fg-2);
}

.option-what {
  margin-top: var(--space-2);
}

.option-note {
  color: var(--muted);
}

.verified {
  margin: var(--space-2) 0 0;
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* The Between Line inside a row. */
.between-rule {
  display: block;
  height: 1px;
  margin-top: var(--space-4);
  background: var(--border);
}

.between-rule[data-progress='active'] {
  background: var(--accent);
}

/* Selection: a 2px accent rule and a heavier name. Not a filled card. */
.option:has(input:checked) {
  box-shadow: inset 2px 0 0 var(--accent);
}

.option:has(input:checked) .option-name {
  font-weight: 700;
}

.manifest-hint {
  margin: var(--space-4) 0 0;
  font-size: var(--text-sm);
  color: var(--muted);
}

/* Visually hidden, still focusable and still announced. */
.vh {
  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;
}

/* ─── failure and continuations ──────────────────────────────────────────── */

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

.failure-title {
  margin-top: var(--space-4);
}

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

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

.outcomes li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: var(--text-sm);
}

.outcome-name {
  color: var(--fg);
}

.outcome-state {
  color: var(--muted);
  text-align: right;
}

/* ─── booking summary ────────────────────────────────────────────────────── */

.summary {
  margin: 0 0 var(--space-4);
}

.summary > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-soft);
}

.summary dt {
  color: var(--muted);
  font-size: var(--text-sm);
}

.summary dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.summary .total dd {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--fg);
}

.state-line {
  margin-top: var(--space-4);
}

/* A hold is time-bounded, so it is stated plainly and never styled as success. */
.hold {
  border-left: 2px solid var(--warn);
  padding-left: var(--space-4);
  color: var(--fg-2);
}

/*
 * THE SKIP LINK, AND ITS 44px FLOOR (project policy, WCAG 2.5.8 is 24x24).
 *
 * Measured at 107x26. It MET the AA criterion and violated the repository's own 44px
 * touch-target rule. The floor is added to the HIT AREA: the label keeps its size, and the
 * link keeps its off-screen resting position, so the only thing that changes is how much
 * of the row is clickable once the reader has tabbed to it.
 */
.skip-link {
  position: absolute;
  left: -9999px;
  display: inline-flex;
  align-items: center;
  min-height: var(--bb-touch-min);
}

.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
  padding: var(--space-2) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  z-index: 1;
}

/*
 * A STANDALONE TEXT LINK ON THE TASK SHELL.
 *
 * A link that is the ONLY content of its paragraph is a control, not prose: there is no
 * sentence around it to expand the target, so the anchor alone has to carry the floor.
 * This measured 123x17 on the booking page ("See all your bookings") — below the 24x24 AA
 * minimum, let alone the 44px policy. The harness exempts anchors rendered inline within
 * a sentence, and that exemption does NOT apply here, which is why it was reported.
 *
 * It is not `.bb-support__link` because that name belongs to one specific control in the
 * shared contract; this is the task shell's own general case, alongside `.task-back`.
 */
.task-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--bb-touch-min);
  color: var(--fg);
  text-decoration-line: underline;
  text-decoration-color: var(--bb-sand);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.task-link:hover {
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

/* ─── motion ─────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ── pre-opening request flow ────────────────────────────────────────────────
   The page a customer reaches when booking is closed. It carries more weight than its
   size suggests: it is the moment an honest dead end becomes a real action, so the summary
   has to read like something worth sending, and the send buttons have to be unmissable
   without pretending a booking exists. */

.field-note {
  margin: 0 0 var(--space-5);
  padding-left: var(--space-4);
  border-left: 2px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 62ch;
}

.field-wide {
  grid-column: 1 / -1;
}

.field-optional {
  color: var(--muted);
  font-weight: 400;
}

.field textarea {
  font: inherit;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  width: 100%;
  resize: vertical;
}

.handoff {
  max-width: 68ch;
}

.handoff-title {
  font-size: 1.15rem;
  margin: var(--space-7) 0 var(--space-4);
}

/* A definition list, not a card grid: this is a receipt for something the customer just
   composed, and a receipt should read top-to-bottom in one column. */
.request-summary {
  margin: 0;
  border-top: 1px solid var(--border-soft);
}

.request-summary dt {
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: var(--space-4);
}

.request-summary dd {
  margin: 0;
  padding: var(--space-1) 0 var(--space-4);
  border-bottom: 1px solid var(--border-soft);
  color: var(--fg);
}

.handoff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin-top: var(--space-6);
}

.btn-secondary {
  display: inline-block;
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  background: transparent;
  text-decoration: none;
}

.next-steps {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--fg-2);
}

.next-steps li {
  margin-bottom: var(--space-3);
}

.handoff-alt {
  margin-top: var(--space-7);
  color: var(--muted);
  font-size: 0.95rem;
}

/* ─── the shared BB-DS primitives, on the transactional shell ──────────────────
 *
 * WHY THIS BLOCK IS A COPY OF THE ONE IN `site.css`, AND WHY THAT IS CORRECT HERE.
 * The two shells share the token stylesheet and the mark and NOTHING else
 * (`views/public/shell.ts:13-14`): a transaction page links `tokens.css` +
 * `app.css`, a public page links `tokens.css` + `site.css` + `editorial.css` +
 * `stitch-home.css`. There is no stylesheet both link, and adding a third one
 * would mean editing both shells' <head>, which is not this task's scope. So a
 * primitive that both shells need is expressed twice, off the SAME class names and
 * the SAME tokens, which is exactly what the token layer is for. The class names
 * and the states are fixed once in `views/public/components.ts`
 * (`PRIMITIVE_CONTRACT`); if these two blocks ever describe different states, the
 * contract is what has been broken.
 *
 * The availability control and the support control are rendered by
 * `availabilityControl()` and `supportControl()` in `components.ts`. */

.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;
}

/* ─── the availability control (COMPONENTS.md:157-168) ──────────────────────────
 * Five states, five treatments, the word always present. See the fuller note in
 * `site.css`; the shape carriers are AVAILABLE a fill and a hairline, HELD a
 * dashed sand rule, SOLD a struck-through time, CHECKING a dashed ochre box with
 * no fill, UNAVAILABLE a dotted quiet rule. CHECKING must never be drawn as
 * AVAILABLE (COMPONENTS.md:166). The 44px floor is on the ROW, which is the
 * <label>, not on the radio. */

.bb-slots {
  margin: 0;
  padding: 0;
  border: 0;
}

.bb-slots__legend {
  padding: 0;
  font-size: var(--bb-micro-size);
  font-weight: var(--bb-micro-weight);
  letter-spacing: var(--bb-micro-tracking);
  line-height: var(--bb-micro-line);
  text-transform: uppercase;
  color: var(--muted);
}

.bb-slots__note,
.bb-slots__empty,
.bb-slots__error {
  margin: var(--space-2) 0 0;
  max-width: 68ch;
  font-size: var(--text-sm);
  line-height: var(--leading-body);
  color: var(--muted);
}

.bb-slots__error {
  color: var(--danger);
}

.bb-slots__recovery {
  margin: var(--space-4) 0 0;
}

.bb-slots__list {
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

.bb-slots__slot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "time state"
    "detail detail";
  align-items: center;
  column-gap: var(--space-4);
  row-gap: var(--space-1);
  min-height: var(--bb-touch-min);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
}

.bb-slots__slot:focus-within {
  outline: none;
  box-shadow: var(--focus-ring);
}

.bb-slots__time {
  grid-area: time;
  font-size: var(--text-base);
  font-variant-numeric: var(--bb-numeric-tabular);
  color: var(--fg);
}

.bb-slots__state {
  grid-area: state;
  font-size: var(--bb-micro-size);
  font-weight: var(--bb-micro-weight);
  letter-spacing: var(--bb-micro-tracking);
  line-height: var(--bb-micro-line);
  text-transform: uppercase;
  color: var(--bb-ink-2);
  white-space: nowrap;
}

.bb-slots__detail {
  grid-area: detail;
  font-size: var(--text-sm);
  color: var(--muted);
}

.bb-slots__slot--available {
  background: var(--surface);
}

.bb-slots__slot--available:hover {
  background: var(--surface-warm);
}

.bb-slots__slot--available:has(input:checked) {
  border-left: 2px solid var(--accent);
  padding-left: var(--space-3);
  background: var(--surface-warm);
}

.bb-slots__slot--available .bb-slots__time {
  font-weight: var(--bb-micro-weight);
}

.bb-slots__slot--held {
  border-bottom-style: dashed;
  border-bottom-color: var(--bb-sand);
  cursor: not-allowed;
}

.bb-slots__slot--held .bb-slots__time,
.bb-slots__slot--held .bb-slots__state {
  color: var(--bb-ochre);
}

.bb-slots__slot--sold {
  cursor: not-allowed;
}

.bb-slots__slot--sold .bb-slots__time {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--bb-sand);
  text-decoration-thickness: 1.5px;
}

.bb-slots__slot--sold .bb-slots__state {
  color: var(--muted);
}

.bb-slots__slot--checking {
  border: 1px dashed var(--bb-sand);
  padding-left: var(--space-3);
  padding-right: var(--space-3);
  background: none;
  cursor: progress;
}

.bb-slots__slot--checking .bb-slots__state {
  color: var(--bb-ochre);
}

.bb-slots__slot--unavailable {
  border-bottom-style: dotted;
  background: none;
  cursor: not-allowed;
}

.bb-slots__slot--unavailable .bb-slots__time,
.bb-slots__slot--unavailable .bb-slots__state {
  color: var(--muted);
}

/* ─── the support control (COMPONENTS.md:299-307) ──────────────────────────────
 * Quiet by default; `.bb-support--problematic` is the one state in which it may
 * take primary weight, and it does so by becoming `.btn-primary` rather than by
 * acquiring a colour. Never hidden behind hover, a disclosure or a timeout. */

.bb-support {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-4);
  margin: var(--space-4) 0 0;
  font-size: var(--text-sm);
  color: var(--muted);
}

.bb-support__link {
  min-height: var(--bb-touch-min);
  display: inline-flex;
  align-items: center;
  color: var(--fg);
  text-decoration-color: var(--bb-sand);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.bb-support__link:hover {
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

.bb-support__reference,
.bb-support__note {
  font-size: var(--text-sm);
  color: var(--muted);
}

.bb-support__reference-value {
  font-variant-numeric: var(--bb-numeric-tabular);
  color: var(--fg-2);
  letter-spacing: 0.04em;
}

/* ─── the consumer task shell (MOBILE.md:67-76, IA §3.2) ────────────────────────
 *
 * WHY THIS SECTION EXISTS. `apps/web/src/html.ts` used to render the public site's
 * marketing header and footer on every transactional route. IA §3.2 states the rule that
 * broke — "Marketing header and footer must not appear inside a task flow" — and
 * `PRODUCT_DESIGN_GATE.md` row 5 (mobile forms designed) was NOT-STARTED with this as its
 * cause. The shell now renders `.task-head` and an optional `.task-action` instead.
 *
 * THE PUBLIC SHELL IS UNTOUCHED. `.site-head` and `.site-foot` are still styled in
 * `site.css` and are still emitted by `views/public/shell.ts` and `views/partner/shell.ts`
 * for the surfaces that should have them. The rules for them that remain in this file's
 * layout section are now unreferenced by any view in this shell; they are left in place
 * rather than deleted, because deleting a rule is a change to the design system and this
 * section is a change to one shell.
 *
 * MOBILE.md:113-123 fixes the action area's shape: minimum 64px plus the safe-area inset,
 * a surface matching the page, a 1px top border, and no shadow or glassmorphism.
 */

.task-head {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.task-head__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  /*
   * THE ROW REFLOWS INSTEAD OF OVERFLOWING — this is the WCAG 1.4.10 fix.
   *
   * WHAT WAS WRONG. Without `flex-wrap`, the back control and the lockup are two
   * unshrinkable flex items on one line. At 200% text zoom the lockup alone is 266px
   * (`--text-lg` doubles to 36px, so "BaliBetween" in the display serif is far wider than
   * the 24px emblem beside it), and the back control takes another 149-202px. On a 390px
   * device that line cannot fit, and because no item may shrink below its min-content
   * width the lockup was pushed past the right edge: measured overflow was +25px on the
   * payment step and +78px on the booking and recovery steps, on every one of the six
   * task-shell routes.
   *
   * WHY WRAPPING IS THE RIGHT FIX AND NOT A SMALLER FONT. 1.4.10 asks for REFLOW, not for
   * text that refuses to grow. Shrinking the wordmark under zoom would trade a reflow
   * defect for a readability one, and truncating or hiding it would damage the canonical
   * lockup the brand mandate requires. Letting the second item move to its own line leaves
   * the text at the size the reader asked for, keeps the whole lockup intact, and costs a
   * taller header only in the state that needs it.
   *
   * AT 100% NOTHING CHANGES: both items still fit on one line, `space-between` still puts
   * the back control left and the lockup right, and the certified compositions are
   * untouched. The wrap is only reachable at large text sizes and very narrow widths.
   */
  flex-wrap: wrap;
  min-height: var(--bb-touch-min);
}

/*
 * The back control.
 *
 * A TEXT LINK, NOT A GLYPH. `figures.ts` has no back or chevron glyph, and adding one to
 * the shared set is a design-system change rather than a shell change — so the control's
 * accessible name is its visible word. The 44px floor is on the control itself rather
 * than on the word, so the hit area and the target are one rectangle.
 */
.task-back {
  display: inline-flex;
  align-items: center;
  min-height: var(--bb-touch-min);
  padding-right: var(--space-3);
  font-size: var(--text-sm);
  color: var(--fg-2);
  text-decoration-line: underline;
  text-decoration-color: var(--bb-sand);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.task-back:hover {
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

/*
 * The promise line, moved out of the deleted marketing footer and into the step.
 *
 * It is not marketing: it is the one sentence that says when a time becomes real, and it
 * is the reason the payment surface can say "you pay only after that". It stays on the
 * page, at the end of the step, without the rest of the footer chrome.
 */
.task-promise {
  margin-top: var(--space-7);
  max-width: 62ch;
}

/*
 * The section heading inside a task step (`booking.ts`: review, manage, recovery).
 *
 * `app.css` styles `h3` and `p` but never `h2`, because until these steps existed the
 * transactional shell had no second-level heading — every step was one `h1` followed by
 * paragraphs. These screens have real sections ("If you need to cancel", "What changed"),
 * and they need to look like what they are: a step's own label, above body size and below
 * the page title, in the display serif the page title uses.
 */
.review-title {
  margin: var(--space-7) 0 var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  line-height: 1.25;
}

/*
 * The sticky bottom action area.
 *
 * `sticky`, NOT `fixed`. A fixed bar needs a compensating body padding that goes stale the
 * moment the bar's height changes, and it covers the last paragraph — `MOBILE.md:123`
 * requires that a sticky action "must never obscure validation messages or final content".
 * A sticky element keeps its own space in the flow, so nothing is ever covered at any
 * height, any text scale or any zoom level. `z-index` is stated so its paint order against
 * the skip link cannot depend on source order.
 */
.task-action {
  position: sticky;
  bottom: 0;
  z-index: 1;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.task-action__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-4);
  min-height: 64px;
  padding-top: var(--space-3);
  padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
}

.task-action__note {
  flex: 1 1 20ch;
  min-width: 0;
  margin: 0;
  font-size: var(--text-sm);
  color: var(--muted);
}

.task-action__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-left: auto;
}

/*
 * `MOBILE.md:108` gives the preferred primary control as 48–52px high, above the 44px
 * floor `--bb-touch-min` guarantees everywhere else. The primary action is the one control
 * on the page that is allowed to take that weight.
 */
.task-action__primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding-inline: var(--space-6);
}

@media (max-width: 699px) {
  /*
   * `MOBILE.md:121`: on a narrow screen the CTA may be full-width. It is — and the note
   * moves above it rather than beside it, because a 360px row cannot hold both, and a
   * squeezed two-column row is how a tap target ends up narrower than its own label.
   */
  .task-action__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .task-action__controls {
    margin-left: 0;
  }

  .task-action__primary,
  .task-action__secondary {
    width: 100%;
  }
}
