/* ==========================================================================
   BubbleU web tokens (Arc 290, from the Arc 286 draft)
   --------------------------------------------------------------------------
   One look for every public and signed-in web page: the homepage, /business,
   the business portal, the admin console and (by copying literal values) the
   emails. Served at /web/web-tokens.css; Arcs 291/292 reuse it.

   SOURCE OF TRUTH: mobile/src/tokens.js. Every value below carries the path
   it mirrors. A value marked "web-only" has no app twin (web needs sizes the
   phone never does: a 1440 px hero, a 2-column grid). If tokens.js changes,
   the :root block below is GENERATED from it (mobile: npm run gen:web-tokens), and a test
   fails when they differ, so web and app never drift apart. Web-only values: mobile/src/webTokens.js.

   Layers:
     1. @font-face   bundled fonts only (server/assets/fonts), no third party
     2. :root        tokens (colour, type, space, radius, shadow, motion)
     3. base         reset, body, focus, links
     4. components   wordmark, buttons, fields, cards, pills, tables, shell
   ========================================================================== */

/* 1. Fonts ----------------------------------------------------------------
   Served same-origin from /web/fonts/ (allowlisted in routes/webAssets.js), never Google Fonts.
   Arc 292 bundled Newsreader roman and the remaining weights the pages use. This list must equal
   TOKENS_FACES in server/lib/webFonts.js (a test checks it); the share pages and the warmth map
   inline their own faces from that same module. */
@font-face {
  font-family: "Newsreader";
  src: url("/web/fonts/Newsreader_400Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/web/fonts/Newsreader_400Regular_Italic.ttf") format("truetype");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/web/fonts/Newsreader_500Medium_Italic.ttf") format("truetype");
  font-weight: 500; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/web/fonts/Newsreader_600SemiBold_Italic.ttf") format("truetype");
  font-weight: 600; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/web/fonts/Newsreader_700Bold_Italic.ttf") format("truetype");
  font-weight: 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/web/fonts/Manrope_400Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/web/fonts/Manrope_500Medium.ttf") format("truetype");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/web/fonts/Manrope_600SemiBold.ttf") format("truetype");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/web/fonts/Manrope_700Bold.ttf") format("truetype");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/web/fonts/Manrope_800ExtraBold.ttf") format("truetype");
  font-weight: 800; font-style: normal; font-display: swap;
}

/* 2. Tokens ----------------------------------------------------------------- */
:root {
  /* GENERATED:START - do not edit by hand. Source: mobile/src/tokens.js + mobile/src/webTokens.js. Run `npm run gen:web-tokens` in mobile/. */
  /* Brand */
  --bu-primary:        #6043d7; /* Colors.brand.primary: twilight purple, actions, wordmark */
  --bu-primary-dim:    #5434ca; /* Colors.brand.primaryDim: pressed / hover */
  --bu-secondary:      #9c4600; /* Colors.brand.secondary: golden hour */
  --bu-tertiary:       #006a6a; /* Colors.brand.tertiary: teal, success, "live" */
  --bu-ember:          #b8532d; /* Colors.brand.gradientEnd: warm end of the brand gradient */
  --bu-sunset:         #ffb37a; /* Colors.brand.sunset: wordmark "U" on dark, ember accents */
  --bu-violet-light:   #9c7dff; /* Colors.brand.primaryLight */
  --bu-amber-light:    #ffdbc9; /* Colors.brand.amberLight */
  --bu-teal-light:     #8dedec; /* Colors.brand.tealLight */
  --bu-gradient:       linear-gradient(90deg, #6043d7, #b8532d); /* Colors.theme.day.ctaGradient */

  /* Parchment surfaces (light: every web page's ground) */
  --bu-surface:        #fff9ed; /* Colors.brand.surface: page ground */
  --bu-surface-low:    #fdf3d4; /* Colors.brand.surfaceContainerLow: alternate section */
  --bu-surface-mid:    #f8eeca; /* Colors.brand.surfaceContainer */
  --bu-surface-high:   #f3e8c0; /* Colors.brand.surfaceContainerHigh */
  --bu-surface-top:    #eee2b7; /* Colors.brand.surfaceContainerHighest */
  --bu-card:           #ffffff; /* Colors.brand.surfaceContainerLowest: cards, fields */
  --bu-paper:          #fffdf6; /* Colors.brand.illustratedMap.parchment */
  --bu-paper-deep:     #f3e4bf; /* Colors.brand.illustratedMap.parchmentDeep */
  --bu-wash:           #ecdfb6; /* Colors.keepsakeMap.landWash */

  /* Deep Night: the reopening ONLY (Trip Summary + Memory Map cover). On the
     web it appears inside the example Trip Summary and nowhere else. Never a
     page or section background (CLAUDE.md product decision, two dark surfaces). */
  --bu-night:          #1A1A2E; /* Colors.brand.night */
  --bu-night-sea:      #16162a; /* web-only: the example map's sea (Arc 361), one step under night */
  --bu-night-land:     #3a3658; /* web-only: the example map's land (Arc 361) */
  --bu-night-raise:    #24243e; /* share.js --surface: card on night */
  --bu-gloaming:       linear-gradient(180deg, #fffdf6 0%, #f3e6d6 18%, #c99a86 40%, #8d5a86 62%, #5a3f7d 80%, #1A1A2E 100%); /* Colors.brand.reopening.gloamingGradient */

  /* Text */
  --bu-ink:            #393214; /* Colors.text.primary: 12.2:1 on surface */
  --bu-ink-2:          #675f3c; /* Colors.text.secondary: 6.1:1, every small secondary text */
  --bu-ink-3:          #796e4c; /* Colors.text.muted: 4.83:1 on parchment (Arc 356), passes for small text */
  --bu-ink-4:          #bdb289; /* web-only: borders, never text (the app's Colors.text.placeholder moved to the muted colour in Arc 356 so a placeholder can pass contrast; the web keeps this lighter rule colour) */
  --bu-eyebrow:        #9c4024; /* Colors.theme.day.eyebrow: 6.3:1 */
  --bu-on-dark:        #fcf7ff; /* Colors.text.onDark */
  --bu-on-dark-strong: rgba(252,247,255,0.85); /* Colors.text.onDarkStrong: narrative on night */
  --bu-on-dark-muted:  rgba(252,247,255,0.6); /* Colors.text.onDarkMuted */
  --bu-on-dark-faint:  rgba(252,247,255,0.5); /* Colors.text.onDarkFaint */
  --bu-on-dark-dim:    rgba(252,247,255,0.3); /* Colors.text.onDarkDim: rules only */
  --bu-on-dark-ghost:  rgba(252,247,255,0.08); /* Colors.text.onDarkGhost: chip bg on night */
  --bu-on-dark-rule:   rgba(252,247,255,0.15); /* Colors.surface.onDarkChip: rules between parts on night (Arc 292) */
  --bu-photo-scrim:    rgba(26,26,46,0.75); /* Colors.surface.overlay: Deep Night under text on a picture (Arc 292) */

  /* Lines and tints */
  --bu-hairline:       rgba(57,50,20,0.08); /* Colors.surface.hairline */
  --bu-line:           rgba(57,50,20,0.14); /* web-only: field / table rule, one step above hairline */
  --bu-line-strong:    rgba(57,50,20,0.28); /* web-only: field border at rest (3:1 non-text contrast) */
  --bu-primary-tint:   rgba(96,67,215,0.10); /* Colors.surface.primaryTint */
  --bu-primary-tint-2: rgba(96,67,215,0.14); /* Colors.surface.primaryTintMed */
  --bu-ember-tint:     rgba(184,83,45,0.10); /* Colors.theme.day.expiryBg */
  --bu-teal-tint:      rgba(0,106,106,0.10); /* web-only: "live" pill ground, teal at 10% */
  --bu-error:          #ac3149; /* Colors.status.error */
  --bu-error-tint:     rgba(172,49,73,0.10); /* web-only: error pill ground */
  --bu-focus:          rgba(96,67,215,0.55); /* web-only: focus ring, primary at 55% */

  /* Member colours: palette v1, in join order. */
  --bu-member-1:  #6043d7; --bu-member-2:  #9c4600; --bu-member-3:  #006a6a;
  --bu-member-4:  #ac3149; --bu-member-5:  #4620bc; --bu-member-6:  #6a2e00;
  --bu-member-7:  #005858; --bu-member-8:  #847b56; --bu-member-9:  #5434ca;
  --bu-member-10: #873c00; --bu-member-11: #004343; --bu-member-12: #675f3c;

  /* Member colours: palette v2 (Arc 385), in join order. For design files and any surface that draws a v2 Bubble. */
  --bu-member-v2-1:  #327D4B; --bu-member-v2-2:  #693C50; --bu-member-v2-3:  #C341A0;
  --bu-member-v2-4:  #0A41A5; --bu-member-v2-5:  #A06900; --bu-member-v2-6:  #960014;
  --bu-member-v2-7:  #5F6991; --bu-member-v2-8:  #692D7D; --bu-member-v2-9:  #73782D;
  --bu-member-v2-10: #82412D; --bu-member-v2-11: #0078CD; --bu-member-v2-12: #005F69;

  /* Type families: Typography.fonts */
  --bu-font-display:   "Newsreader", Georgia, "Times New Roman", serif; /* headline: Newsreader 700 italic */
  --bu-font-body:      "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; /* body: Manrope */
  --bu-font-mono:      "Courier New", ui-monospace, monospace; /* web-only stack for codes (Typography.fonts.mono is just Courier New) */

  /* Type sizes. App sizes (Typography.sizes) are the base; the web adds a
     display ramp above heroTitle. clamp() steps each down at phone width. */
  --bu-size-display:   clamp(46px, 7.2vw, 92px); /* web-only: homepage hero */
  --bu-size-hero:      clamp(36px, 5vw, 64px); /* web-only: page hero (business) */
  --bu-size-title:     clamp(32px, 3.6vw, 48px); /* Typography.sizes.heroTitle (48) at desktop */
  --bu-size-page:      32px; /* Typography.sizes.pageTitle */
  --bu-size-card-lg:   28px; /* Typography.sizes.cardTitleMd */
  --bu-size-section:   22px; /* Typography.sizes.sectionHead */
  --bu-size-quote:     20px; /* Typography.sizes.quoteLg */
  --bu-size-lead:      clamp(18px, 1.5vw, 21px); /* Typography.sizes.subhead (18) upward */
  --bu-size-narrative: 17px; /* Typography.sizes.narrativeBody */
  --bu-size-body:      16px; /* Typography.sizes.body */
  --bu-size-small:     14px; /* Typography.sizes.bodySmall */
  --bu-size-label:     13px; /* Typography.sizes.label */
  --bu-size-meta:      11px; /* Typography.sizes.meta: eyebrows, caps */
  --bu-weight-regular: 400; /* Typography.weights.regular */
  --bu-weight-medium:  500; /* Typography.weights.medium */
  --bu-weight-bold:    700; /* Typography.weights.bold */
  --bu-lh-tight:       1.1; /* Typography.lineHeights.tight */
  --bu-lh-body:        1.6; /* Typography.lineHeights.body */
  --bu-lh-loose:       1.8; /* Typography.lineHeights.loose */
  --bu-tracking-caps:  1.8px; /* SharedResurfacing.labelLetterSpacing: caps eyebrows */

  /* Spacing: Spacing (4 px base) */
  --bu-space-xs:       4px; /* Spacing.xs */
  --bu-space-sm:       8px; /* Spacing.sm */
  --bu-space-md:       12px; /* Spacing.md */
  --bu-space-lg:       16px; /* Spacing.lg = Spacing.screenPadding: the phone gutter */
  --bu-space-xl:       20px; /* Spacing.xl */
  --bu-space-2xl:      28px; /* Spacing.xxl */
  --bu-space-3xl:      40px; /* Spacing.xxxl */
  --bu-space-4xl:      64px; /* web-only: between blocks inside a section */
  --bu-space-section:  clamp(72px, 10vw, 144px); /* web-only: between page sections */
  --bu-gutter:         clamp(16px, 4vw, 56px); /* web-only: page side gutter, 16 px at phone */
  --bu-max:            1200px; /* web-only: content max width */
  --bu-max-read:       640px; /* web-only: reading measure (~70 characters) */

  /* Radius: Radius */
  --bu-radius-xs:      4px; /* Radius.xs */
  --bu-radius-sm:      8px; /* Radius.sm */
  --bu-radius-md:      12px; /* Radius.md */
  --bu-radius-lg:      16px; /* Radius.lg */
  --bu-radius-xl:      24px; /* Radius.xl */
  --bu-radius-round:   999px; /* Radius.round */

  /* Shadows: Shadows */
  --bu-shadow-card:    0 2px 8px rgba(26,26,46,0.06); /* Shadows.card */
  --bu-shadow-lift:    0 6px 14px rgba(26,26,46,0.06); /* Shadows.editorialCard */
  --bu-shadow-modal:   0 4px 16px rgba(0,0,0,0.15); /* Shadows.modal */
  --bu-shadow-cta:     0 8px 24px rgba(96,67,215,0.28); /* Colors.theme.day.ctaShadow */
  --bu-shadow-object:  0 40px 80px -24px rgba(26,26,46,0.45), 0 12px 24px -12px rgba(26,26,46,0.30); /* web-only: the example summary as a held object */
  --bu-shadow-float:   0 2px 4px rgba(57,50,20,0.08), 0 24px 48px rgba(57,50,20,0.18); /* web-only: a card floating on parchment (D30 notification, offer card; Arc 292) */

  /* Motion: Motion */
  --bu-ease-out:       cubic-bezier(0.16, 1, 0.3, 1); /* Motion.easing.easeOut */
  --bu-ease-gentle:    cubic-bezier(0.4, 0, 0.2, 1); /* Motion.easing.gentle */
  --bu-dur-fast:       200ms; /* Motion.duration.fast */
  --bu-dur-normal:     300ms; /* Motion.duration.normal */
  /* GENERATED:END */
}

/* 3. Base ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bu-surface);
  color: var(--bu-ink);
  font-family: var(--bu-font-body);
  font-size: var(--bu-size-body);
  line-height: var(--bu-lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: var(--bu-primary); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--bu-primary-dim); }
:focus-visible { outline: 3px solid var(--bu-focus); outline-offset: 2px; border-radius: var(--bu-radius-xs); }
.bu-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bu-skip { position: absolute; left: var(--bu-space-lg); top: -48px; background: var(--bu-card); padding: var(--bu-space-sm) var(--bu-space-md); border-radius: var(--bu-radius-sm); z-index: 10; }
.bu-skip:focus { top: var(--bu-space-lg); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* 4. Components ------------------------------------------------------------- */

/* Wordmark: Newsreader 700 italic in primary; the "U" in ember (sunset on dark). */
.bu-wordmark {
  font-family: var(--bu-font-display); font-style: italic; font-weight: 700;
  font-size: 26px; letter-spacing: -0.4px; color: var(--bu-primary); text-decoration: none; line-height: 1;
}
.bu-wordmark span { color: var(--bu-ember); }
.bu-wordmark:hover { color: var(--bu-primary); }

/* Type helpers */
.bu-eyebrow {
  font-family: var(--bu-font-body); font-size: var(--bu-size-meta); font-weight: 700;
  letter-spacing: var(--bu-tracking-caps); text-transform: uppercase; color: var(--bu-eyebrow);
}
.bu-display { font-family: var(--bu-font-display); font-style: italic; font-weight: 700; line-height: 1.02; letter-spacing: -0.02em; }
.bu-serif   { font-family: var(--bu-font-display); font-style: italic; font-weight: 500; }

/* Buttons. ONE .bu-btn--primary per screen (CLAUDE.md product rule 3). */
.bu-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--bu-space-sm);
  min-height: 48px; padding: 0 var(--bu-space-2xl);
  font-family: var(--bu-font-body); font-size: var(--bu-size-body); font-weight: 700; line-height: 1;
  border-radius: var(--bu-radius-round); border: 1.5px solid transparent; cursor: pointer;
  text-decoration: none; transition: transform var(--bu-dur-fast) var(--bu-ease-out), box-shadow var(--bu-dur-fast) var(--bu-ease-out), background var(--bu-dur-fast);
}
.bu-btn--primary { background: var(--bu-gradient); color: #ffffff; box-shadow: var(--bu-shadow-cta); }
.bu-btn--primary:hover { color: #ffffff; transform: translateY(-1px); }
.bu-btn--solid { background: var(--bu-primary); color: #ffffff; }
.bu-btn--solid:hover { background: var(--bu-primary-dim); color: #ffffff; }
.bu-btn--quiet { background: transparent; color: var(--bu-ink); border-color: var(--bu-line-strong); }
.bu-btn--quiet:hover { color: var(--bu-ink); border-color: var(--bu-ink-2); background: var(--bu-card); }
.bu-btn--text { background: none; border: 0; padding: 0 var(--bu-space-xs); min-height: 44px; color: var(--bu-ink-2); font-weight: 600; }
.bu-btn--text:hover { color: var(--bu-ink); }
.bu-btn--danger { background: transparent; color: var(--bu-error); border-color: rgba(172,49,73,0.35); } /* Colors.surface.dangerBorder */
.bu-btn--sm { min-height: 36px; padding: 0 var(--bu-space-lg); font-size: var(--bu-size-small); }
.bu-btn--block { width: 100%; }

/* Fields: a visible label above every field, never placeholder-as-label. */
.bu-field { display: grid; gap: var(--bu-space-sm); align-content: start; }
.bu-field label, .bu-label { font-size: var(--bu-size-small); font-weight: 700; color: var(--bu-ink); }
.bu-hint { font-size: var(--bu-size-label); color: var(--bu-ink-2); line-height: 1.45; }
.bu-input, .bu-textarea, .bu-select {
  width: 100%; min-height: 48px; padding: var(--bu-space-md) var(--bu-space-lg);
  font: inherit; font-size: var(--bu-size-body); color: var(--bu-ink);
  background: var(--bu-card); border: 1.5px solid var(--bu-line-strong); border-radius: var(--bu-radius-md);
  transition: border-color var(--bu-dur-fast);
}
.bu-textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.bu-input::placeholder, .bu-textarea::placeholder { color: var(--bu-ink-3); }
.bu-input:hover, .bu-textarea:hover { border-color: var(--bu-ink-3); }
.bu-input:focus-visible, .bu-textarea:focus-visible, .bu-select:focus-visible { outline: 3px solid var(--bu-focus); outline-offset: 1px; border-color: var(--bu-primary); }
.bu-input[readonly], .bu-textarea[readonly] { background: var(--bu-surface-low); border-color: var(--bu-hairline); }

/* Cards */
.bu-card { background: var(--bu-card); border: 1px solid var(--bu-hairline); border-radius: var(--bu-radius-lg); box-shadow: var(--bu-shadow-card); }

/* Status pills: a word AND a colour, never colour alone. */
.bu-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px;
  border-radius: var(--bu-radius-round); font-family: var(--bu-font-body); font-style: normal; letter-spacing: 0;
  font-size: 12px; font-weight: 700; line-height: 1.5; white-space: nowrap; vertical-align: middle;
}
.bu-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.bu-pill--draft   { background: var(--bu-hairline);     color: var(--bu-ink-2); }
.bu-pill--waiting { background: var(--bu-amber-light);  color: var(--bu-eyebrow); }
.bu-pill--live    { background: var(--bu-teal-tint);    color: var(--bu-tertiary); }
.bu-pill--paused  { background: rgba(57,50,20,0.12);    color: var(--bu-ink); }
.bu-pill--paused::before { border-radius: 1px; width: 6px; height: 7px; background: none; border-left: 2px solid currentColor; border-right: 2px solid currentColor; }
.bu-pill--no      { background: var(--bu-error-tint);   color: var(--bu-error); }
.bu-pill--example { background: var(--bu-primary-tint); color: var(--bu-primary); }
.bu-pill--example::before { display: none; }

/* Tables (portal + admin). Plain tables, no charts (LAUNCH_WEB_plan "Not in this plan"). */
.bu-table { width: 100%; border-collapse: collapse; font-size: var(--bu-size-small); }
.bu-table th { text-align: left; font-size: var(--bu-size-meta); letter-spacing: 1.2px; text-transform: uppercase; color: var(--bu-ink-2); font-weight: 700; padding: var(--bu-space-md) var(--bu-space-lg); border-bottom: 1px solid var(--bu-line); }
.bu-table td { padding: var(--bu-space-lg); border-bottom: 1px solid var(--bu-hairline); vertical-align: top; }
.bu-table tr:last-child td { border-bottom: 0; }
.bu-num { font-variant-numeric: tabular-nums; }


/* ---- Signed-in shell: portal + admin ------------------------------------- */
.bu-shell {
  min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr);
  /* The sidebar is sticky and one viewport tall, so on a long page its own background stops at the
     fold. The same colour and edge are painted down the whole shell instead (Arc 291). */
  background: linear-gradient(90deg, var(--bu-surface-low) 0 247px, var(--bu-hairline) 247px 248px, transparent 248px);
}
.bu-side {
  background: var(--bu-surface-low); border-right: 1px solid var(--bu-hairline);
  padding: var(--bu-space-2xl) var(--bu-space-lg); display: flex; flex-direction: column; gap: var(--bu-space-2xl);
  position: sticky; top: 0; height: 100vh;
}
.bu-side__brand { display: grid; gap: 6px; padding: 0 var(--bu-space-md); }
.bu-side__who { font-size: var(--bu-size-label); color: var(--bu-ink-2); line-height: 1.35; }
.bu-nav { display: grid; gap: 2px; }
.bu-nav a {
  display: flex; align-items: center; justify-content: space-between; gap: var(--bu-space-sm);
  padding: 10px var(--bu-space-md); border-radius: var(--bu-radius-sm);
  color: var(--bu-ink-2); text-decoration: none; font-weight: 600; font-size: 15px;
}
.bu-nav a:hover { background: var(--bu-surface-high); color: var(--bu-ink); }
.bu-nav a[aria-current="page"] { background: var(--bu-card); color: var(--bu-ink); box-shadow: var(--bu-shadow-card); }
.bu-nav__count { font-size: 12px; font-weight: 700; color: var(--bu-ink-2); }
.bu-side__foot { margin-top: auto; padding: 0 var(--bu-space-md); display: grid; gap: var(--bu-space-xs); font-size: var(--bu-size-label); color: var(--bu-ink-2); }
.bu-side__foot a { color: var(--bu-ink-2); }
.bu-main { padding: var(--bu-space-3xl) clamp(16px, 4vw, 64px) var(--bu-space-4xl); max-width: 1120px; width: 100%; }
.bu-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--bu-space-xl); flex-wrap: wrap; margin-bottom: var(--bu-space-3xl); }
.bu-head h1 { font-family: var(--bu-font-display); font-style: italic; font-weight: 700; font-size: clamp(30px, 3vw, 40px); line-height: 1.05; letter-spacing: -0.01em; }
.bu-head p { color: var(--bu-ink-2); margin-top: var(--bu-space-sm); max-width: 560px; }

@media (max-width: 860px) {
  .bu-shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .bu-side {
    position: static; height: auto; flex-direction: column; gap: var(--bu-space-md);
    padding: var(--bu-space-lg) var(--bu-space-lg) 0; border-right: 0; border-bottom: 1px solid var(--bu-hairline);
  }
  .bu-side__brand { padding: 0; grid-template-columns: auto 1fr; align-items: baseline; gap: var(--bu-space-md); }
  .bu-side { min-width: 0; }
  .bu-nav { min-width: 0; display: flex; flex-wrap: wrap; gap: var(--bu-space-xs); padding: 0 0 var(--bu-space-md); }
  .bu-nav a { white-space: nowrap; flex: none; padding: 8px 14px; font-size: 14px; }
  .bu-nav__count { margin-left: 4px; }
  .bu-side__foot { display: none; }
  .bu-main { padding: var(--bu-space-2xl) var(--bu-space-lg) var(--bu-space-4xl); }
  .bu-head { margin-bottom: var(--bu-space-2xl); }
}

/* ---- Shared signed-in pieces --------------------------------------------- */
.bu-section-title { font-family: var(--bu-font-display); font-style: italic; font-weight: 700; font-size: var(--bu-size-section); line-height: 1.2; }
.bu-meta { font-size: var(--bu-size-label); color: var(--bu-ink-2); }

/* Stat tile: a label, one number, one line of context. Text in ink, never a series colour. */
.bu-stat { padding: var(--bu-space-xl); }
.bu-stat__label { font-size: var(--bu-size-label); font-weight: 700; color: var(--bu-ink-2); }
.bu-stat__value { margin-top: var(--bu-space-sm); font-family: var(--bu-font-display); font-style: italic; font-weight: 700; font-size: 44px; line-height: 1; color: var(--bu-ink); font-variant-numeric: tabular-nums; }
.bu-stat__value small { font-family: var(--bu-font-body); font-style: normal; font-size: 15px; font-weight: 600; color: var(--bu-ink-2); margin-left: 4px; }
.bu-stat__sub { margin-top: var(--bu-space-sm); font-size: var(--bu-size-label); color: var(--bu-ink-2); }

/* Banner: a status line at the top of a screen. */
.bu-banner { display: grid; grid-template-columns: auto 1fr; gap: var(--bu-space-md); align-items: start; padding: var(--bu-space-lg) var(--bu-space-xl); border-radius: var(--bu-radius-md); font-size: var(--bu-size-small); line-height: 1.5; }
.bu-banner b { display: block; font-size: 15px; }
.bu-banner--live { background: var(--bu-teal-tint); color: var(--bu-ink); border: 1px solid rgba(0,106,106,0.25); }
.bu-banner--waiting { background: rgba(255,219,201,0.55); border: 1px solid rgba(156,64,36,0.25); }
.bu-banner--paused { background: rgba(57,50,20,0.06); border: 1px solid var(--bu-line); }
.bu-banner--draft { background: var(--bu-card); border: 1px dashed var(--bu-line-strong); }
.bu-banner--mock { background: var(--bu-primary-tint); border: 1px dashed rgba(96,67,215,0.45); color: var(--bu-primary); font-weight: 600; }

/* Tables become cards at phone width. Each cell carries data-label. */
@media (max-width: 700px) {
  .bu-table--stack thead { display: none; }
  .bu-table--stack, .bu-table--stack tbody, .bu-table--stack tr, .bu-table--stack td { display: block; width: 100%; }
  .bu-table--stack tr { padding: var(--bu-space-md) 0; border-bottom: 1px solid var(--bu-line); }
  .bu-table--stack tr:last-child { border-bottom: 0; }
  .bu-table--stack td { border: 0; padding: 4px var(--bu-space-lg); display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: var(--bu-space-md); white-space: normal; }
  .bu-table--stack td::before { content: attr(data-label); font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--bu-ink-2); padding-top: 2px; }
  .bu-table--stack td[data-label=""] { grid-template-columns: 1fr; }
  .bu-table--stack td[data-label=""]::before { display: none; }
}
