/* "Build my campaign for me" (public/build-campaign.js; worker/build-campaign.ts). The live checklist and the plan card,
   in the chat's own look (app.css "The chat's colour, steps and question cards"): navy is structure (the band, done steps,
   outlines), coral the one action colour (the running step, the main button), grey what is not reached yet. Light and
   dark come from the theme's tokens alone. Phone first; on a computer the cards keep the chat column's width. */
.bc-card {
  box-sizing: border-box;
  max-width: 100%;
  margin: 4px 0;
  border: 1px solid var(--navy-line);
  border-radius: var(--radius-lg);
  background: var(--navy-tint);
  color: var(--text);
  overflow: hidden;
}
.bc-card [hidden] { display: none !important; }
.bc-card h3, .bc-card h4, .bc-card p { margin: 0; }

/* ---- the checklist ---- */
.bc-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; }
.bc-mark { flex: none; }
.bc-headwords { flex: 1; min-width: 0; }
.bc-title { font-size: 15px; font-weight: 700; line-height: 1.3; }
.bc-sub { font-size: 12.5px; line-height: 1.4; color: var(--text-faint); }
/* The dot opens the next phrase (no break after it), so a line never ends on a stray "·". */
.bc-subpart + .bc-subpart::before { content: '·\00a0'; }
/* A card arrives, it does not pop (the design critic, 18 Oct). */
.bc-card { animation: bc-in .24s var(--ease) both; }
@keyframes bc-in { from { opacity: 0; transform: translateY(6px); } }
.bc-time { font-variant-numeric: tabular-nums; }
.bc-stop.card-btn { flex: none; min-height: 36px; padding: 0 14px; }
.bc-bar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; padding: 0 16px 12px; }
.bc-seg { height: 4px; border-radius: 2px; background: var(--step-next); transition: background-color .3s var(--ease); }
.bc-seg.is-done { background: var(--navy-text); }
.bc-seg.is-now, .bc-seg.is-tap { background: var(--coral); }
/* While the count gate's coral button shows, the running cues go quiet: one coral thing at a time. */
.bc-card:has(.bc-gate:not([hidden])) .bc-seg.is-now { background: var(--navy-text); }
.bc-seg.is-failed, .bc-seg.is-missed { background: var(--warn); }
.bc-steps { list-style: none; margin: 0; padding: 0 16px 8px; }
.bc-step { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--navy-line); }
.bc-icon { flex: none; width: 22px; height: 22px; margin-top: 1px; display: flex; }
.bc-icon svg { display: block; }
.bc-stepbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bc-name { font-size: 14.5px; line-height: 1.35; font-weight: 600; overflow-wrap: anywhere; }
.bc-step.is-now .bc-name { font-weight: 700; }
.bc-step.is-next .bc-name, .bc-step.is-skipped .bc-name { font-weight: 500; color: var(--text-faint); }
.bc-detail { font-size: 13px; line-height: 1.45; color: var(--text-dim); overflow-wrap: anywhere; }
/* The running step's hairline: the calm waiting look's navy-to-coral, drawn by transform only. */
.bc-line { display: none; position: relative; height: 3px; margin-top: 4px; border-radius: 2px; background: var(--step-next); overflow: hidden; }
.bc-step.is-now .bc-line { display: block; }
.bc-line-fill { position: absolute; inset: 0; border-radius: 2px; background: var(--navy-text); transform-origin: left center; transform: scaleX(.35); animation: bc-fill 2.4s var(--ease) infinite alternate; }
@keyframes bc-fill { from { transform: scaleX(.18); } to { transform: scaleX(.86); } }
.bc-spin { animation: bc-spin 1.1s linear infinite; transform-origin: 50% 50%; }
@keyframes bc-spin { to { transform: rotate(360deg); } }
.bc-i-fill { fill: var(--navy-text); }
.bc-i-on { stroke: var(--navy-tint); }
.bc-i-ring { stroke: color-mix(in srgb, var(--coral) 25%, transparent); }
.bc-i-arc { stroke: var(--coral); }
.bc-i-next { stroke: var(--line-strong); }
.bc-i-dim { stroke: var(--text-faint); }
.bc-i-num { fill: var(--text-faint); font-family: inherit; }
.bc-i-warn { stroke: var(--warn); }
.bc-i-warnfill { fill: var(--warn); }
.bc-gate { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 6px; }
.bc-gatenote { font-size: 12.5px; line-height: 1.4; color: var(--text-faint); }
.bc-fold { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 10px 16px; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.bc-fold > svg:first-child { flex: none; }
.bc-fold > svg:first-child circle { fill: var(--navy-text); }
.bc-fold > svg:first-child path { stroke: var(--navy-tint); }
.bc-foldwords { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bc-foldtitle { font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.bc-foldsub { font-size: 12.5px; line-height: 1.4; color: var(--text-faint); text-wrap: balance; }
.bc-foldshow { flex: none; font-size: 13px; font-weight: 600; color: var(--navy-text); }
.bc-fold > svg:last-child { flex: none; color: var(--navy-text); transition: transform .2s var(--ease); }
.bc-fold[aria-expanded="true"] > svg:last-child { transform: rotate(180deg); }
@media (hover: hover) { .bc-fold:hover { background: color-mix(in srgb, var(--navy-text) 5%, transparent); } }
.bc-fold:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }

/* ---- the plan card ---- */
.bc-band { position: relative; padding: 18px 18px 20px; background: var(--navy-fill); color: var(--on-navy); display: flex; flex-direction: column; gap: 6px; }
/* No coral stub at the band's foot (design round 2 #9, 20 Oct 2026): on the count card's band the same still 72px bar read
   as a progress bar stuck at its end; a finished plan has nothing in progress. */
.bc-band::after { content: none; }
.bc-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--on-navy-dim); }
.bc-planname { font-size: 22px; line-height: 1.25; font-weight: 800; overflow-wrap: anywhere; }
.bc-bandline { font-size: 14px; line-height: 1.45; color: var(--on-navy-dim); text-wrap: balance; }
.bc-inner { padding: 4px 18px 18px; display: flex; flex-direction: column; }
.bc-pair { display: grid; grid-template-columns: minmax(0, 1fr); }
.bc-sec { padding: 16px 0; border-bottom: 1px solid var(--navy-line); display: flex; flex-direction: column; gap: 10px; }
/* The last section before the buttons, with or without a Price section: no line resting on the button (the critic, 9 Nov 2026). */
.bc-sec:has(+ .bc-buttons) { border-bottom: 0; padding-bottom: 14px; }
.bc-h { font-size: 15px; font-weight: 700; line-height: 1.3; }
.bc-aud { display: flex; align-items: baseline; gap: 10px; }
.bc-audwords { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bc-audname { font-size: 14.5px; line-height: 1.35; font-weight: 600; overflow-wrap: anywhere; }
.bc-audnote { font-size: 12.5px; color: var(--text-faint); }
.bc-aud.is-spare .bc-audname, .bc-aud.is-spare .bc-num { color: var(--text-faint); }
.bc-num { flex: none; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bc-num.is-locked { letter-spacing: .04em; color: var(--text-faint); }
.bc-num.is-new { animation: bc-num-in .2s var(--ease) both; }
@keyframes bc-num-in { from { opacity: 0; } }
.bc-fine { font-size: 12.5px; line-height: 1.5; color: var(--text-faint); }
/* No one-word last lines (the critic, send plan r1). */
.bc-why, .bc-fine, .bc-small { text-wrap: pretty; }
.bc-send { display: flex; gap: 12px; }
.bc-tile { flex: none; width: 48px; box-sizing: border-box; padding: 5px 0 6px; border-radius: 10px; border: 1px solid var(--navy-line); background: var(--surface); text-align: center; display: flex; flex-direction: column; }
.bc-dow { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: var(--navy-text); }
.bc-day { font-size: 19px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.bc-mon { font-size: 10.5px; color: var(--text-faint); }
.bc-sendwords { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bc-sendtitle { font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.bc-why { font-size: 13px; line-height: 1.45; color: var(--text-dim); }
.bc-mailbox { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--navy-line); background: var(--surface); }
.bc-label { font-size: 12px; color: var(--text-faint); }
.bc-subject { font-size: 15px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.bc-preview { font-size: 13.5px; line-height: 1.5; color: var(--text-dim); overflow-wrap: anywhere; }
.bc-ok, .bc-warn { position: relative; padding-left: 26px; font-size: 13.5px; line-height: 1.45; }
.bc-ok::before, .bc-warn::before { position: absolute; left: 0; top: 1px; width: 18px; height: 18px; box-sizing: border-box; border-radius: 50%; border: 1.6px solid currentColor; font-size: 12px; font-weight: 800; line-height: 15px; text-align: center; }
.bc-ok::before { content: '✓'; color: var(--ok); }
.bc-warn::before { content: '!'; color: var(--warn); }
.bc-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.bc-link { min-height: 44px; padding: 0; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--navy-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }
.bc-link:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 4px; }
.bc-price { border-bottom: 0; padding-bottom: 14px; gap: 8px; }
.bc-pricerows { display: flex; flex-direction: column; gap: 8px; }
.bc-priceline { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.bc-pricewho { color: var(--text-dim); }
.bc-priceval { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bc-priceline.is-total { padding-top: 6px; border-top: 1px solid var(--navy-line); font-size: 16px; font-weight: 800; }
.bc-priceline.is-total .bc-pricewho { color: var(--text); }
.bc-priceline.is-total .bc-priceval { font-weight: 800; }
.bc-buttons { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.bc-buttons .card-btn { min-height: 48px; font-size: 15px; padding: 0 22px; }
.bc-small { margin-top: 12px !important; font-size: 12.5px; line-height: 1.5; color: var(--text-faint); }

/* A computer: who and when side by side, the two buttons on one row. */
@media (min-width: 720px) {
  .bc-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
  .bc-buttons { flex-direction: row; flex-wrap: wrap; }
  /* Two buttons of one size, the total beside them (the design critic: the secondary was wider than the main one). */
  .bc-buttons .card-btn { flex: 1 1 0; max-width: 260px; }
  .bc-pricerows, .bc-price .bc-fine { max-width: 530px; }   /* the button row's own width: the total ends with it */
  /* The send plan's row has one button a send: its price block is that row's width. */
  .bc-sendplan .bc-pricerows, .bc-sendplan .bc-price .bc-fine { max-width: calc(var(--bc-btns, 2) * 260px + (var(--bc-btns, 2) - 1) * 10px); }
}
/* A phone: "Show steps" is said, not drawn (the chevron stays), so the folded line keeps to its title and summary. */
@media (max-width: 480px) {
  /* The last phrase on a line of its own, no dot (the critic, round 2). */
  .bc-subpart:last-child { display: block; }
  .bc-subpart:last-child::before { content: none; }
  .bc-foldshow { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  .bc-spin, .bc-line-fill, .bc-card, .bc-num.is-new { animation: none; }
  .bc-line-fill { transform: scaleX(.6); }
  .bc-seg, .bc-fold > svg:last-child { transition: none; }
}
@media (forced-colors: active) {
  .bc-card { border: 1px solid CanvasText; }
  .bc-seg { forced-color-adjust: none; background: GrayText; }
  .bc-seg.is-done, .bc-seg.is-now { background: Highlight; }
}

/* ---- the starter: the first chip of the one row of ways to start (calm design pass, 24 Oct 2026) ---- */
/* It was a full-width coral-edged bar above the others, the widest and only coloured thing on the home page, louder than
   the message box (design walk #4: "Build my campaign" vs "Plan a campaign" read as two equal first moves). Now it has
   the other chips' shape and size and goes first; its sparkle and words in coral are all that set it apart. */
/* Its place from the first paint when this browser last saw the switch on, or has never seen it (chat-state.js
   "build-on"): theme.css's [hidden] is !important, so this must be too, or the row popped in when /api/config answered
   and pushed the greeting up (first impression #4, 19 Oct 2026: the rule had never applied). */
html.build-on .starters .starter.starter-build[hidden] { display: inline-flex !important; }
/* Words in the coral that reads as text on each ground (AA): the button coral on white, the brighter coral on navy. */
.starter.starter-build { --bc-word: var(--coral-fill); color: var(--bc-word); font-weight: 600; }
html[data-theme="dark"] .starter.starter-build { --bc-word: var(--coral); }
.starter.starter-build svg, .starter.starter-build:hover svg { display: block; color: var(--bc-word); }
.starter.starter-build:hover { color: var(--bc-word); }
@media (forced-colors: active) { .starter.starter-build { border-color: ButtonText; } }
.bc-write.card-btn { align-self: flex-start; min-height: 44px; }
