/* The Builder, on the V2 tokens (public/ds/tokens.css), in the studio's shell (public/styles.css: the sidebar,
   the top bar, the plate, the blueprint ground, buttons, notices). Its own file, not an inline block: the page
   runs under a policy that allows styles from this origin only, and no style attribute at all.
   Build mode (V2): FoloForge's workshop. The page is `mode-build` (the ember accent) on the blueprint ground
   for whoever may build, and neither for a member who only reads. */

/* A DOCUMENT THAT SCROLLS. styles.css pins html and body (`height:100%; overflow:hidden`) because the studio
   scrolls inside its own views; this page is one long column, and under those rules a draft three screens tall
   could not be moved by a wheel, a trackpad or a finger: "Create the product" was reachable only by Tab (Client
   Operations audit B1, tests/scroll-browser.test.js). So the document is what scrolls here, by wheel, by
   finger and by Home, End, Space and the arrows from wherever the keyboard is; the shell is laid around it:
   the sidebar and the top bar stay where they are while the page moves under them. */
html, body { height: auto; overflow: visible; }
body { display: block; min-block-size: 100vh; min-block-size: 100dvh; background: var(--c-surface); }
.app-shell { min-block-size: 100vh; min-block-size: 100dvh; }
.main-area { min-block-size: 100vh; min-block-size: 100dvh; }
.topbar { position: sticky; inset-block-start: 0; }
.view-builder { overflow: visible; }
@media (min-width: 1200px) {
  /* (Below 1200px the sidebar is the studio's drawer, fixed to the window by styles.css.) */
  .sidebar { position: sticky; inset-block-start: 0; block-size: 100vh; block-size: 100dvh; align-self: start; }
}
/* What the page jumps to (the skip link, a heading that takes focus) stays clear of the top bar. */
.view-builder :is(h1, h2, section, form, .notice) { scroll-margin-block-start: calc(var(--topbar-h) + var(--s-4)); }

/* The read-back is as wide as the page allows; describing, and waiting for a design, are a column to read. */
.b-wrap { max-inline-size: 1180px; margin-inline: auto; padding: var(--s-8) var(--s-6) var(--s-20); }
.b-wrap.is-narrow { max-inline-size: 880px; }
.b-wrap .page-head { margin-block-end: var(--s-5); }
.b-wrap .b-lede { font-size: var(--fs-lg); max-width: var(--reading-max); margin-block-end: 0; }
.b-stage h1 { overflow-wrap: anywhere; }
.b-stage h1:focus, .b-stage h2:focus { outline: none; }

/* A page that offers nothing to build with: who the member is could not be read, or they may not build. */
.b-gate { max-inline-size: var(--reading-max); }
.b-gate h1 { font-size: var(--fs-h1); line-height: var(--lh-head); letter-spacing: var(--tr-h1); font-weight: var(--fw-semi); margin: 0 0 var(--s-2); text-wrap: balance; overflow-wrap: anywhere; }
.b-gate .lede { margin: 0; }
.b-gate a { color: var(--accent-text); font-weight: var(--fw-medium); text-decoration: underline; text-underline-offset: 2px; }
.notice.b-gate h1 { font-size: var(--fs-h3); letter-spacing: 0; }

/* ── Where this is, of the way from a description to a product (V2 .steps-h) ── */
.b-steps { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; list-style: none; margin: 0 0 var(--s-8); padding: 0; }
.b-step { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); color: var(--c-muted); }
.b-step-n { inline-size: 22px; block-size: 22px; border-radius: var(--r-full); display: grid; place-items: center; font-size: var(--fs-xs); font-weight: var(--fw-semi); box-shadow: inset 0 0 0 1.5px var(--c-line-strong); background: var(--c-surface); flex: none; }
.b-step-n .ic { inline-size: 12px; block-size: 12px; stroke-width: 2.5; }
.b-step.is-done { color: var(--c-ink-2); }
.b-step.is-done .b-step-n { background: var(--c-ink-2); color: var(--c-surface); box-shadow: none; }
.b-step.is-now { color: var(--c-ink); font-weight: var(--fw-semi); }
.b-step.is-now .b-step-n { box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent-text); }
.b-step-sep { inline-size: 20px; block-size: 1px; background: var(--c-line-strong); }

/* ── Describe (V2 .composer): one box that takes the whole description, and the button that starts the design ── */
.b-composer {
  display: flex; flex-direction: column; margin-block-start: var(--s-6);
  background: var(--c-surface); border: 1px solid var(--c-line-strong); border-radius: var(--r-xl); box-shadow: var(--e-2);
  transition: border-color var(--t-fast) var(--ease-std), box-shadow var(--t-fast) var(--ease-std);
}
/* The box shows focus as a whole: its own edge in the focus blue, ringed, when the description is being written. */
.b-composer:has(.b-composer-input:focus-visible) { border-color: var(--c-focus); box-shadow: 0 0 0 1px var(--c-focus), var(--e-2); }
.b-composer .b-composer-input, .b-composer .b-composer-input:hover, .b-composer .b-composer-input:focus-visible {
  border: 0; box-shadow: none; outline: none; resize: vertical; inline-size: 100%; min-block-size: 140px;
  padding: var(--s-5) var(--s-6); font-size: var(--fs-lg); line-height: var(--lh-read); background: transparent; color: var(--c-ink);
  border-start-start-radius: var(--r-xl); border-start-end-radius: var(--r-xl); border-end-start-radius: 0; border-end-end-radius: 0;
}
.b-composer .b-composer-input.is-error { box-shadow: inset 0 -2px 0 var(--c-danger); }
.b-composer-error { margin: 0; padding: var(--s-2) var(--s-6) var(--s-3); font-size: var(--fs-sm); color: var(--c-danger); overflow-wrap: anywhere; }
.b-composer-more { border-block-start: 1px solid var(--c-line); padding: var(--s-3) var(--s-6); }
.b-composer-more summary { cursor: pointer; display: inline-flex; align-items: center; gap: var(--s-2); min-block-size: var(--control-h-sm); font-weight: var(--fw-medium); color: var(--c-ink-2); list-style: none; border-radius: var(--r-xs); }
.b-composer-more summary::-webkit-details-marker { display: none; }
.b-composer-more summary:hover { color: var(--c-ink); }
.b-composer-more[open] summary .ic { transform: rotate(45deg); }
.b-optional { font-weight: var(--fw-regular); color: var(--c-muted); }
.b-composer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--s-3) var(--s-4); margin-block: var(--s-3) var(--s-2); }
.b-field { display: flex; flex-direction: column; gap: var(--s-1); min-inline-size: 0; }
.b-field label { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--c-ink); }
.b-field input { inline-size: 100%; min-inline-size: 0; min-block-size: var(--control-h); }
.b-composer-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; padding: var(--s-3) var(--s-4) var(--s-3) var(--s-6); border-block-start: 1px solid var(--c-line); }
.b-for { font-size: var(--fs-sm); color: var(--c-muted); min-inline-size: 0; overflow-wrap: anywhere; }
.btn.btn-lg { min-height: var(--control-h-lg); padding-inline: var(--s-5); font-size: var(--fs-lg); }
.b-examples { display: flex; flex-direction: column; gap: var(--s-2); margin-block-start: var(--s-6); }
.b-examples-h { font-size: var(--fs-sm); color: var(--c-muted); }
.b-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
/* (Every class of this page carries its own prefix: the studio's sheet, loaded before this one, has a .composer,
   a .bp-top and more of its own, and its rules reached this page's box under the same name.) */
.b-chip {
  display: inline-flex; align-items: center; min-block-size: var(--control-h-sm); padding: var(--s-1) var(--s-3);
  border-radius: var(--r-full); border: 1px solid var(--c-line-strong); background: var(--c-surface); color: var(--c-ink-2);
  font: inherit; font-size: var(--fs-sm); text-align: start; cursor: pointer;
  transition: border-color var(--t-fast) var(--ease-std), color var(--t-fast) var(--ease-std);
}
.b-chip:hover { border-color: var(--c-ink-2); color: var(--c-ink); }
.b-kept { display: flex; align-items: center; gap: var(--s-2) var(--s-3); flex-wrap: wrap; margin: 0; padding: var(--s-2) var(--s-4); border: 1px solid var(--c-forge-line); border-radius: var(--r-md); background: var(--c-forge-tint); color: var(--c-ink-2); font-size: var(--fs-sm); overflow-wrap: anywhere; }

/* ── No draft came back: what happened, then what it will not build and what it has to know ── */
.b-nodraft { display: flex; flex-direction: column; gap: var(--s-4); margin-block-start: var(--s-6); }
.b-nodraft .notice:focus { outline: none; }
.b-nodraft .notice-title, .b-nodraft .notice-body { overflow-wrap: anywhere; }
.b-refused { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.b-card .b-refused li { display: flex; flex-direction: column; gap: var(--s-0); padding-inline-start: var(--s-3); border-inline-start: 2px solid var(--c-line-strong); overflow-wrap: anywhere; }
.b-card .b-refused li + li { margin-block-start: 0; }
.b-refused b { font-weight: var(--fw-semi); }
.b-refused span { color: var(--c-ink-2); }
.b-refused .b-instead { color: var(--c-ink); }
.b-saved { display: flex; flex-direction: column; gap: var(--s-2); margin-block-start: var(--s-3); }
.b-saved-line { margin-block: 0; margin-inline: 0; overflow-wrap: anywhere; }
.b-from-intent { margin-block: 0 var(--s-4); margin-inline: 0; overflow-wrap: anywhere; }
.b-intent-panel h1 { margin-block: 0; margin-inline: 0; overflow-wrap: anywhere; font-size: var(--fs-h2); line-height: var(--lh-head); font-weight: var(--fw-semi); }
.b-intent-note { margin-block: var(--s-3) 0; margin-inline: 0; overflow-wrap: anywhere; }
.b-intent-changed { margin-block: var(--s-2) 0; margin-inline: 0; padding-inline-start: var(--s-4); overflow-wrap: anywhere; }
.b-intent-panel .b-error { overflow-wrap: anywhere; }
.b-hint { margin: 0 0 var(--s-3); color: var(--c-ink-2); }

/* ── Designing: what was sent, where the run stands, and a way to stop it ── */
.b-quote { margin: 0; padding: var(--s-3) var(--s-4); border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-surface); color: var(--c-ink-2); font-size: var(--fs-md); line-height: var(--lh-read); white-space: pre-line; overflow-wrap: anywhere; quotes: "“" "”"; }
.b-quote::before { content: open-quote; }
.b-quote::after { content: close-quote; }
#stage-designing .b-run-slot { display: block; margin-block-start: var(--s-5); }
.b-run { display: inline-flex; align-items: center; gap: var(--s-2) var(--s-3); flex-wrap: wrap; min-inline-size: 0; font-size: var(--fs-md); color: var(--c-ink); }
.b-run-says { font-weight: var(--fw-medium); overflow-wrap: anywhere; }
.b-run-clock { color: var(--c-muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
/* (styles.css draws the spinner white, for a filled button: here it turns on the page's own ground.) */
.spinner.b-spin { inline-size: 14px; block-size: 14px; border-color: var(--c-line-strong); border-block-start-color: var(--accent); flex: none; }
.b-run-what { margin: var(--s-5) 0 0; max-width: var(--reading-max); color: var(--c-ink-2); font-size: var(--fs-sm); line-height: var(--lh-read); }
.b-run-slot:empty { display: none; }

.b-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: var(--s-5) var(--s-6); margin-block-end: var(--s-4); }
.b-card h2 { font-size: var(--fs-h3); line-height: var(--lh-head); font-weight: var(--fw-semi); margin: 0 0 var(--s-3); }
.b-card h3 { font-size: var(--fs-md); font-weight: var(--fw-semi); margin: var(--s-3) 0 var(--s-2); }
.b-card p, .b-card li { font-size: var(--fs-md); line-height: var(--lh-read); }
.b-card ul { margin: 0; padding-inline-start: var(--s-5); }
.b-card li + li { margin-block-start: var(--s-1); }
.b-card textarea {
  inline-size: 100%; box-sizing: border-box; min-block-size: 110px; font: inherit; font-size: var(--fs-lg); line-height: var(--lh-read);
  padding: var(--s-3) var(--s-4); border: 1px solid var(--c-line-input); border-radius: var(--r-sm); resize: vertical;
  background: var(--c-surface); color: var(--c-ink);
}
.b-card textarea:hover, .b-answer input:hover { border-color: var(--c-ink-2); }
.b-card textarea:focus-visible, .b-answer input:focus-visible { outline: none; border-color: var(--c-focus); box-shadow: 0 0 0 1px var(--c-focus); }
.b-row { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); align-items: center; margin-block-start: var(--s-3); }
.b-error { color: var(--c-danger); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.b-card .b-error { margin: var(--s-2) 0 0; }
.b-answer { display: grid; gap: var(--s-1); margin-block-end: var(--s-3); }
.b-answer label { font-size: var(--fs-sm); font-weight: var(--fw-medium); overflow-wrap: anywhere; }
.b-answer input { font: inherit; font-size: var(--fs-md); min-height: var(--control-h); padding: var(--s-2) var(--s-3); border: 1px solid var(--c-line-input); border-radius: var(--r-sm); background: var(--c-surface); inline-size: 100%; min-inline-size: 0; }
.b-ack { display: flex; gap: var(--s-2); align-items: flex-start; font-size: var(--fs-md); margin-block: var(--s-3); }
[hidden] { display: none !important; }

/* ══ The read-back (V2 "Builder: read-back"): the draft in the order an owner thinks in, with the platform's
      checks, the Builder's assumptions and its questions beside it, and the two ways on under both. ══ */
.b-meta { margin: var(--s-1) 0 0; font-size: var(--fs-sm); color: var(--c-muted); }
.b-stage .page-head .lede { overflow-wrap: anywhere; }
.b-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-8); align-items: start; }
.b-main { display: flex; flex-direction: column; gap: var(--s-8); min-inline-size: 0; }
.b-rail { display: flex; flex-direction: column; gap: var(--s-4); min-inline-size: 0; }
.b-rail .b-card, .b-main .b-card, .b-grid > .b-card { margin-block-end: 0; }
/* (A place a card is moved to takes no room, and no gap, while it holds nothing that is shown.) */
.b-rail > div:not(:has(> :not([hidden]))), .b-main > div:not(:has(> :not([hidden]))), .b-nodraft > div:not(:has(> :not([hidden]))) { display: none; }
@media (min-width: 1024px) {
  /* The design, and what stands beside it. A change that is being previewed stands at the head of what is
     beside the design (it is first in the page's order, and on a phone it is first on the page). */
  .b-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); }
  .b-grid > .b-main { grid-column: 1; grid-row: 1; }
  .b-grid > .b-rail { grid-column: 2; grid-row: 1; }
  .b-grid.is-previewing { grid-template-rows: auto minmax(0, 1fr); row-gap: var(--s-4); }
  .b-grid.is-previewing > .b-preview { grid-column: 2; grid-row: 1; }
  .b-grid.is-previewing > .b-main { grid-row: 1 / span 2; }
  .b-grid.is-previewing > .b-rail { grid-row: 2; }
}

/* ── A change, before it is kept (V2 "Builder: change preview"): what was asked, what it changes, what that
      means, and the two ways on. Its edge is Build's, so that it is not taken for one more card of the design. ── */
.b-preview { border-color: var(--accent-line); box-shadow: var(--e-2); min-inline-size: 0; }
.b-preview h2:focus { outline: none; }
.b-preview .b-quote { font-size: var(--fs-sm); padding: var(--s-2) var(--s-3); margin-block-end: var(--s-3); }
.b-card .b-changes, .b-card .b-people { list-style: none; margin: 0; padding: 0; }
.b-changes { display: flex; flex-direction: column; gap: var(--s-2); }
.b-card .b-changes li { display: flex; align-items: flex-start; gap: var(--s-2); margin: 0; font-size: var(--fs-sm); line-height: var(--lh-ui); min-inline-size: 0; }
.b-changes li > .ic { margin-block-start: 2px; color: var(--c-muted); }
.b-preview .notice { margin-block-start: var(--s-3); overflow-wrap: anywhere; }
.b-preview .notice-title { font-size: var(--fs-sm); }
.b-preview .notice-body { margin-block-start: var(--s-1); }
.b-people { display: flex; flex-direction: column; gap: var(--s-1); margin-block-start: var(--s-1); }
.b-card .b-people li { margin: 0; font-size: var(--fs-sm); line-height: var(--lh-ui); color: var(--c-ink); }
.b-preview .b-ack { font-size: var(--fs-sm); font-weight: var(--fw-medium); margin-block: var(--s-3) 0; }
.b-ack input { flex: none; margin-block-start: 3px; }
/* While a change waits to be kept or discarded: where the two ways on were, why they wait. */
.b-waits-for { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-4); flex-wrap: wrap; margin-block-start: var(--s-10); padding: var(--s-4) var(--s-5); border: 1px dashed var(--c-line-strong); border-radius: var(--r-lg); background: var(--c-surface); }
.b-waits-for p { margin: 0; max-width: var(--reading-max); color: var(--c-ink-2); overflow-wrap: anywhere; }

/* ── Before it is created: the dialog (public/styles.css dialog.dialog) ── */
.b-plan { margin: 0; padding-inline-start: var(--s-5); display: flex; flex-direction: column; gap: var(--s-1); color: var(--c-ink-2); overflow-wrap: anywhere; }
.b-dialog-msg { color: var(--c-danger); font-weight: var(--fw-semi); }

/* ── Created (V2 "Builder: created"): what was made, and the ways on from it ── */
.b-stamp { display: inline-flex; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-4); padding: var(--s-1) var(--s-3); border: 1px solid var(--accent-line); border-radius: var(--r-sm); background: var(--c-surface); color: var(--accent-hover); font-size: var(--fs-sm); font-weight: var(--fw-semi); }
#stage-created h1 { font-size: var(--fs-display); letter-spacing: var(--tr-display); line-height: var(--lh-tight); }
.b-made-open { margin: var(--s-6) 0; }
.b-made-open .btn { max-inline-size: 100%; }
.b-made-open .btn > span { min-inline-size: 0; overflow-wrap: anywhere; text-align: start; }
.b-card .b-next { list-style: none; margin: 0; padding: 0; }
/* A row is one link, its name's, drawn over the whole row: the row is the box it is drawn in. */
.b-card .b-next li { position: relative; display: flex; align-items: flex-start; gap: var(--s-3); margin: 0; padding: var(--s-3) var(--s-2); border-block-start: 1px solid var(--c-line); border-radius: var(--r-sm); }
.b-next li:hover { background: var(--c-hover); }
.b-next li > .ic { margin-block-start: 3px; color: var(--c-muted); }
.b-next-what { display: flex; flex-direction: column; gap: var(--s-0); flex: 1; min-inline-size: 0; overflow-wrap: anywhere; }
.b-next-what a { color: var(--c-ink); font-weight: var(--fw-semi); text-decoration: none; }
.b-next-what a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-sm); }
.b-next-what a:focus-visible { outline: none; }
.b-next-what a:focus-visible::after { box-shadow: 0 0 0 2px var(--c-focus); }
.b-next-what > span { font-size: var(--fs-sm); color: var(--c-ink-2); }
.b-next .b-next-go { align-self: center; color: var(--c-muted); }
.b-made-more { margin: var(--s-6) 0 0; }

/* What the Builder understood: its own words, set to be read (V2 .t-read, in a card). */
.b-understood { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: var(--s-5) var(--s-6); }
.b-understood h2 { margin: 0 0 var(--s-2); }
.b-read { margin: 0; font-size: var(--fs-lg); line-height: var(--lh-read); max-width: var(--reading-max); overflow-wrap: anywhere; }

/* A part of the design: its plate, then what the product does there. */
.b-sec { display: flex; flex-direction: column; gap: var(--s-3); min-inline-size: 0; }
.b-sec > h2 { margin: 0; }
.b-says { margin: 0; max-width: var(--reading-max); color: var(--c-ink-2); line-height: var(--lh-read); overflow-wrap: anywhere; }
.b-none { margin: 0; color: var(--c-ink-2); }
.b-sec > .b-hint { margin: 0; font-size: var(--fs-sm); }

/* Where an entry can stand, as its application draws it (public/ds/app.css .status): a shape, the state's own
   words and a colour, never a colour alone. A state's words can be long: a chip wraps, and never pushes the page. */
.b-st {
  --st-fg: var(--c-ink-2); --st-bg: var(--c-sunken);
  display: inline-flex; align-items: center; gap: 6px; min-block-size: 22px; padding-block: 2px; padding-inline: 10px;
  border-radius: var(--r-xs); background: var(--st-bg); color: var(--st-fg);
  font-size: var(--fs-sm); font-weight: var(--fw-medium); line-height: 1.2; max-inline-size: 100%; overflow-wrap: anywhere; vertical-align: middle;
}
.b-st[data-tone] { padding-inline: var(--s-2) 10px; }
.b-st .b-glyph { inline-size: 10px; block-size: 10px; flex: none; }
.icon-sprite .on { stroke: var(--c-surface); }
.b-st[data-tone="new"]       { --st-fg: var(--c-ink-2);   --st-bg: var(--c-sunken); }
.b-st[data-tone="active"]    { --st-fg: var(--c-info);    --st-bg: var(--c-info-tint); }
.b-st[data-tone="waiting"]   { --st-fg: var(--c-warning); --st-bg: var(--c-warning-tint); }
.b-st[data-tone="attention"] { --st-fg: var(--c-danger);  --st-bg: var(--c-danger-tint); }
.b-st[data-tone="done"]      { --st-fg: var(--c-success); --st-bg: var(--c-success-tint); }
.b-st[data-tone="stopped"]   { --st-fg: var(--c-muted);   --st-bg: var(--c-canvas); box-shadow: inset 0 0 0 1px var(--c-line); }
.b-st[data-tone="ai"]        { --st-fg: var(--c-ai-ink);  --st-bg: var(--c-ai-tint); }

/* How work moves: one block for each kind of entry that moves. Its states, each with what it means; then every
   move, from where to where. */
.b-flows { display: flex; flex-direction: column; gap: var(--s-4); }
.b-flow { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: var(--s-4) var(--s-5); min-inline-size: 0; }
.b-flow h3 { margin: 0 0 var(--s-3); font-size: var(--fs-h3); font-weight: var(--fw-semi); overflow-wrap: anywhere; }
.b-flow-field { margin: var(--s-3) 0 var(--s-1); font-size: var(--fs-sm); color: var(--c-muted); overflow-wrap: anywhere; }
.b-states { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-4); margin: 0 0 var(--s-4); }
.b-state { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-1); min-inline-size: 0; max-inline-size: 100%; }
.b-state dt, .b-state dd { margin: 0; max-inline-size: 100%; }
.b-state dd { font-size: var(--fs-xs); color: var(--c-muted); }
.b-moves { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.b-move { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: var(--s-1) var(--s-4); align-items: start; padding-block: var(--s-2); border-block-start: 1px solid var(--c-line); font-size: var(--fs-md); }
.b-move-name { display: inline-flex; align-items: center; flex-wrap: wrap; gap: var(--s-1) var(--s-2); min-inline-size: 0; overflow-wrap: anywhere; }
.b-move-name b { font-weight: var(--fw-semi); min-inline-size: 0; overflow-wrap: anywhere; }
.b-move.is-auto .b-move-name { color: var(--c-ink-2); }
.b-move-what { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); min-inline-size: 0; }
.b-path { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); min-inline-size: 0; max-inline-size: 100%; }
.b-arrow { color: var(--c-muted); }
.b-or { font-size: var(--fs-sm); color: var(--c-muted); }
.b-move-does { color: var(--c-ink-2); min-inline-size: 0; overflow-wrap: anywhere; }
.b-move-asks { flex-basis: 100%; font-size: var(--fs-sm); color: var(--c-ink-2); overflow-wrap: anywhere; }
/* The AI's mark (V2: violet belongs to the AI and to nothing else). */
.b-ai-mark { display: inline-flex; align-items: center; gap: var(--s-1); padding-inline: 6px; min-block-size: 20px; border-radius: var(--r-xs); background: var(--c-ai-tint); color: var(--c-ai-ink); font-size: var(--fs-xs); font-weight: var(--fw-semi); }
.b-ai-mark .ic { inline-size: 12px; block-size: 12px; }

/* Where AI helps, and who outside takes part: a card for each. */
.b-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--s-3); }
.b-ai, .b-ext { border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: var(--s-4) var(--s-5); background: var(--c-surface); min-inline-size: 0; overflow-wrap: anywhere; }
/* (What the AI will write is its draft until a person takes it on: the pencil edge, as in the application.) */
.b-ai { border-style: dashed; border-color: var(--c-ai-edge); background: var(--c-ai-tint); }
.b-ai h3, .b-ext h3 { display: flex; align-items: flex-start; gap: var(--s-2); margin: 0 0 var(--s-2); font-size: var(--fs-md); font-weight: var(--fw-semi); }
.b-ai h3 .ic, .b-ext h3 .ic { margin-block-start: 3px; }
.b-ai h3 { color: var(--c-ai-ink); }
.b-ai p, .b-ext p { margin: 0; font-size: var(--fs-md); line-height: var(--lh-read); }
.b-ai p + p, .b-ext p + p { margin-block-start: var(--s-1); }
.b-also { display: flex; flex-direction: column; gap: var(--s-2); }

/* A list of the design's own lines: an icon, then the words. */
.b-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.b-list > li { display: flex; align-items: flex-start; gap: var(--s-2); font-size: var(--fs-md); line-height: var(--lh-read); min-inline-size: 0; }
.b-list > li > .ic { margin-block-start: 4px; color: var(--c-muted); }
.b-line { min-inline-size: 0; overflow-wrap: anywhere; }
.b-line b { font-weight: var(--fw-semi); }
.b-line-name, .b-line .b-detail { display: block; }
.b-detail { color: var(--c-ink-2); }
.b-waits { color: var(--c-warning); }
.b-more summary { cursor: pointer; border-radius: var(--r-xs); }
.b-more ul { margin: var(--s-1) 0 0; padding-inline-start: var(--s-5); color: var(--c-ink-2); }

/* What it keeps: each kind of entry, and under it the kinds that belong to it. */
.b-tree, .b-kids { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.b-kids { margin-block-start: var(--s-3); margin-inline-start: var(--s-4); padding-inline-start: var(--s-4); border-inline-start: 2px solid var(--c-line); }
.b-keep-node { min-inline-size: 0; }
.b-keep { border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: var(--s-4) var(--s-5); background: var(--c-surface); min-inline-size: 0; overflow-wrap: anywhere; }
.b-keep h3 { margin: 0 0 var(--s-1); font-size: var(--fs-h3); font-weight: var(--fw-semi); }
.b-keep .b-about { margin: 0 0 var(--s-1); font-size: var(--fs-md); color: var(--c-ink); line-height: var(--lh-read); }
.b-keep .b-under { margin: 0 0 var(--s-1); font-size: var(--fs-sm); color: var(--c-muted); }
.b-fields { list-style: none; margin: var(--s-2) 0 0; padding: 0; }
.b-fields li { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 0 var(--s-4); padding-block: var(--s-1); border-block-start: 1px solid var(--c-line); font-size: var(--fs-sm); line-height: var(--lh-ui); }
.b-f-name { font-weight: var(--fw-medium); min-inline-size: 0; }
.b-f-is { color: var(--c-ink-2); min-inline-size: 0; }

/* Beside the design: the platform's checks, and what the Builder assumed. */
.b-checks { display: flex; flex-direction: column; gap: var(--s-2); }
.b-checks .notice { overflow-wrap: anywhere; }
.b-check { min-inline-size: 0; }
.b-checks .notice-body { margin: 0; color: var(--c-ink); }
.b-assume { list-style: none; margin: 0; padding: 0; }
.b-card .b-assume { padding-inline-start: 0; }
.b-card .b-assume li { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); padding-block: var(--s-2); margin: 0; font-size: var(--fs-sm); line-height: var(--lh-ui); color: var(--c-ink-2); }
.b-card .b-assume li + li { border-block-start: 1px solid var(--c-line); }
.b-assume li > span { min-inline-size: 0; overflow-wrap: anywhere; padding-block-start: var(--s-1); }
.b-assume .btn { flex: none; }

/* The two ways on, after everything they decide on: ask for a change, or create it. */
.b-decide { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); margin-block-start: var(--s-10); align-items: start; }
.b-decide .b-card { margin-block-end: 0; min-inline-size: 0; }
.b-create p { margin: 0; color: var(--c-ink-2); overflow-wrap: anywhere; }
@media (min-width: 1024px) {
  .b-decide { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: var(--s-8); }
}

@media (max-width: 767px) {
  /* A phone: 16px at the page's edges (V2), what a member decides with is 44px high, and a box that is typed
     in holds 16px text (smaller, and a phone zooms the page to it). */
  .b-wrap { padding: var(--s-5) var(--s-4) var(--s-16); }
  .b-steps { margin-block-end: var(--s-6); gap: var(--s-1) var(--s-3); }
  .b-step-sep { display: none; }
  .b-step { font-size: var(--fs-xs); }
  .b-composer .b-composer-input { padding: var(--s-4); }
  .b-composer-more { padding-inline: var(--s-4); }
  .b-composer-error { padding-inline: var(--s-4); }
  .b-composer-foot { padding: var(--s-3) var(--s-4); }
  .b-composer-foot .btn-lg { inline-size: 100%; }
  .b-field input, .b-answer input { font-size: var(--fs-lg); min-block-size: var(--touch); }
  .b-chip { min-block-size: var(--control-h); }
  .b-run .btn, .b-kept .btn, .b-card .btn, .b-checks .btn, .page-head-actions .btn, .b-waits-for .btn, .b-made-more .btn, #ask-create .btn { min-block-size: var(--touch); }
  .b-waits-for { margin-block-start: var(--s-8); padding: var(--s-4); }
  .b-made-open .btn { inline-size: 100%; }
  .b-next li { min-block-size: var(--touch); }
  .b-card { padding: var(--s-4); }
  /* The read-back: one column, a move's name over where it leads, a field's name over what it is. */
  .b-move, .b-fields li { grid-template-columns: minmax(0, 1fr); }
  .b-flow, .b-keep, .b-ai, .b-ext, .b-understood { padding: var(--s-4); }
  .b-kids { margin-inline-start: var(--s-1); padding-inline-start: var(--s-3); }
  .b-grid, .b-main { gap: var(--s-6); }
  .b-decide { margin-block-start: var(--s-8); }
}
