/* css/clips-brief.css — the brief of a Clip that follows an inspiration video, on the Clips Studio's Script step
 * (js/clips/clips-brief.js). .cbf-* ONLY.
 *
 * The card mounts inside the Studio root, so the Studio's own buttons, links and type and its colours
 * (--cst-*) are used as they are. Nothing here names a Studio class (tests/clips-studio-css-namespace.test.js):
 * every rule hangs off this file's own roots, the card (.cbf) and the "Maya changes" control in Maya's box
 * (.cbf-about), and each colour falls back to the Studio's value so the card is never unstyled.
 * Phone first: one column, every target 44px or more; from 760px the level choices sit side by side.
 *
 * The quality list and the "I'll film it / AI makes it" choice are the Film step's own markup (clips-ai-video.js,
 * styled by its sheet); this file only gives them their place on the card (.cbf-q, .cbf-mk). The bar the yes rides
 * (.cbf-dock) carries the Studio's own sticky class in its markup, so the sticking is the Studio's rule, not a copy.
 */
.cbf {
  max-width: 1100px; margin: 24px auto 0; display: flex; flex-direction: column; gap: 22px; background: #fff; border-radius: 20px; padding: 18px;
  box-shadow: var(--cst-shadow, 0 1px 2px rgba(30,27,46,.04), 0 8px 28px rgba(30,27,46,.06)); text-align: left; min-width: 0;
}
.cbf .cbf-h { font: 700 17px/1.3 "Bricolage Grotesque", sans-serif; color: var(--cst-ink, #1e1b2e); margin: 0; }
.cbf .cbf-h-big { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 24px; line-height: 1.25; }
.cbf .cbf-block { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cbf .cbf-block.is-working .cbf-parts { opacity: .5; }
.cbf .cbf-line { margin: 0; font-size: 16px; line-height: 1.5; color: var(--cst-ink, #1e1b2e); }
.cbf .cbf-line.is-warn, .cbf .cbf-warn { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--cst-warn-bg, #FFF6E8); color: var(--cst-warn-ink, #5c3a0a); font-size: 15px; line-height: 1.5; }
.cbf .cbf-wait { margin: 0; padding: 12px 14px 12px 38px; position: relative; border-radius: 12px; background: var(--cst-ind-bg, #F7F6FF); border: 1px solid var(--cst-ind-ring, #E4E3FB); font-size: 15px; line-height: 1.5; }
.cbf .cbf-wait::before { content: ""; position: absolute; left: 14px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--cst-ind, #4338CA); animation: cbf-pulse 1.4s ease-in-out infinite; }
@keyframes cbf-pulse { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }

/* The video it follows: its cover, its handle, one line. */
.cbf .cbf-src { display: flex; gap: 14px; align-items: center; min-width: 0; }
.cbf .cbf-cover { flex: none; width: 54px; height: 96px; border-radius: 12px; background: #e9e5dc center / cover no-repeat; }
.cbf .cbf-src-tx { display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.cbf .cbf-src-tx b { font-size: 15px; font-weight: 600; color: var(--cst-ink-2, #5d5566); }
.cbf .cbf-src-tx a { font: 600 14px "Bricolage Grotesque", sans-serif; display: inline-flex; align-items: center; min-height: 44px; align-self: flex-start; }

/* How different: three choices, one pressed. */
.cbf .cbf-levels { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.cbf .cbf-level {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: 56px; text-align: left;
  border: 1px solid var(--cst-line, #e3ded4); background: #fff; border-radius: 14px; padding: 14px 16px;
  font: 400 15px/1.45 "Bricolage Grotesque", sans-serif; color: var(--cst-ink, #1e1b2e);
}
.cbf .cbf-level:hover:not(:disabled) { border-color: var(--cst-ind, #4338CA); }
.cbf .cbf-level[aria-checked="true"] { border-color: var(--cst-ind, #4338CA); background: var(--cst-ind-bg, #F7F6FF); box-shadow: inset 0 0 0 1px var(--cst-ind, #4338CA); }
.cbf .cbf-level:disabled { opacity: .6; }
.cbf .cbf-level[aria-checked="true"]:disabled { opacity: 1; }
.cbf .cbf-dot { flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; border: 2px solid #b9b3c4; background: #fff; }
.cbf .cbf-level[aria-checked="true"] .cbf-dot { border-color: var(--cst-ind, #4338CA); background: radial-gradient(circle, var(--cst-ind, #4338CA) 0 5px, #fff 6px); }
.cbf .cbf-level-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.cbf .cbf-level-tx b { font-weight: 600; font-size: 16px; }
.cbf .cbf-level-tx > span { color: var(--cst-ink-2, #5d5566); }
.cbf .cbf-level-tx .cbf-tag { align-self: flex-start; margin-top: 6px; background: var(--cst-ind-ring, #E4E3FB); color: var(--cst-ind-d, #3127a8); border-radius: 999px; padding: 2px 10px; font: 600 12px "Bricolage Grotesque", sans-serif; }

/* The brief, part by part: each part closed to its heading, who makes it and its place; a tap opens it. */
.cbf .cbf-hint { margin: 0; }
.cbf .cbf-parts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cbf .cbf-part { display: flex; flex-direction: column; border: 1px solid var(--cst-line-2, #ece7dd); border-radius: 14px; background: var(--cst-paper, #FCFBF8); min-width: 0; transition: background-color .6s ease, border-color .6s ease; }
.cbf .cbf-part.is-new { background: var(--cst-ind-bg, #F7F6FF); border-color: var(--cst-ind, #4338CA); }
.cbf .cbf-part-t {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 4px; align-items: start; width: 100%; min-height: 56px;
  padding: 12px 16px; border: 0; border-radius: 14px; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer;
}
.cbf .cbf-part-t:disabled { cursor: default; }
.cbf .cbf-part-t:focus-visible { outline: 2px solid var(--cst-ind, #4338CA); outline-offset: -2px; }
.cbf .cbf-part-h { grid-column: 1; display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; }
.cbf .cbf-k { font: 600 14px "Bricolage Grotesque", sans-serif; color: var(--cst-ink-3, #6b6475); }
.cbf .cbf-part-h b { font-size: 16px; font-weight: 600; color: var(--cst-ind, #4338CA); }
.cbf .cbf-who { background: var(--cst-ind-ring, #E4E3FB); color: var(--cst-ind-d, #3127a8); border-radius: 999px; padding: 2px 10px; font: 600 12px/1.5 "Bricolage Grotesque", sans-serif; white-space: nowrap; }
.cbf .cbf-who[data-cbf-who="me"] { background: var(--cst-good-bg, #EEF7F1); color: var(--cst-good, #1c6b43); }
.cbf .cbf-where { grid-column: 1; font-size: 16px; line-height: 1.45; color: var(--cst-ink, #1e1b2e); overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; }
.cbf .cbf-part.is-open .cbf-where { display: block; overflow: visible; }
.cbf .cbf-chev { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 10px; height: 10px; margin: 0 4px 6px; border-right: 2px solid var(--cst-ink-3, #6b6475); border-bottom: 2px solid var(--cst-ink-3, #6b6475); transform: rotate(45deg); }
.cbf .cbf-part.is-open .cbf-chev { transform: rotate(-135deg); margin: 6px 4px 0; }
.cbf .cbf-part-b { display: flex; flex-direction: column; gap: 8px; padding: 0 16px 14px; min-width: 0; }
.cbf .cbf-doing, .cbf .cbf-changes { margin: 0; font-size: 15px; line-height: 1.5; color: var(--cst-ink-2, #5d5566); overflow-wrap: anywhere; }
.cbf .cbf-doing span, .cbf .cbf-changes span { font-weight: 600; color: var(--cst-ink, #1e1b2e); }
/* Whose movement a part follows (the video's or the script's), under "You are seen": one quiet sentence with a rule beside it. */
.cbf .cbf-moves { margin: 0; padding-left: 10px; border-left: 3px solid var(--cst-line, #e3ded4); font-size: 15px; line-height: 1.5; color: var(--cst-ink-2, #5d5566); overflow-wrap: anywhere; }
.cbf .cbf-level-moves { margin: 0; font-size: 15px; line-height: 1.5; }
.cbf .cbf-mine { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--cst-good-bg, #EEF7F1); color: var(--cst-ink, #1e1b2e); font-size: 15px; line-height: 1.5; }
.cbf .cbf-mk { margin-top: 4px; }
.cbf .cbf-mk > * { margin: 0; max-width: 320px; }
.cbf .cbf-edit { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; }
.cbf .cbf-place { width: 100%; box-sizing: border-box; border: 1px solid var(--cst-line, #e3ded4); border-radius: 12px; padding: 12px 14px; font: 400 16px/1.5 "Bricolage Grotesque", sans-serif; color: var(--cst-ink, #1e1b2e); background: #fff; resize: vertical; min-height: 72px; }
.cbf .cbf-row-btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cbf .cbf-row-btns button { min-height: 44px; }
.cbf .cbf-ask { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cbf .cbf-ask p { margin: 0; flex: 1 1 220px; }
.cbf .cbf-ask button { min-height: 44px; }

/* The price and the one yes. */
.cbf .cbf-pay { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 16px; background: var(--cst-ground, #F5F4F0); min-width: 0; }
.cbf .cbf-pay p { margin: 0; }
.cbf .cbf-money { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 16px; color: var(--cst-ink-2, #5d5566); }
.cbf .cbf-money b { color: var(--cst-ink, #1e1b2e); font-weight: 700; font-variant-numeric: tabular-nums; }
.cbf .cbf-app { align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; }
.cbf .cbf-tap { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; }

/* The quality list (the Film step's own, in its place here), and the bar the yes rides. */
.cbf .cbf-q { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cbf .cbf-q p { margin: 0; }
.cbf .cbf-dock { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; min-width: 0; }
.cbf .cbf-dock-tx { display: flex; flex-direction: column; gap: 1px; flex: 0 0 auto; min-width: 0; }
.cbf .cbf-dock-tx b { font-size: 17px; font-weight: 700; color: var(--cst-ink, #1e1b2e); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cbf .cbf-dock-tx span { font-size: 13.5px; color: var(--cst-ink-2, #5d5566); }
.cbf .cbf-dock .cbf-go { flex: 1 1 170px; width: auto; min-height: 48px; }
/* ON A PHONE the bar sits level with Help and stops short of it, as the course guide's bar does
   (review-canvas.css, "level with Help, and short of it"). Riding above Help (--help-room, the Studio's rule for
   its sticky bars) left it floating about 75px up with the page showing under it, on top of the line it was passing
   (dev7 at 390, 30 Nov 2026). Help keeps its corner: --help-room-x is how far in from the right edge it reaches,
   and 28px of page and card padding already lie between the bar and that edge. Where Help is not mounted the
   variable is unset and the bar is full width. Layout only. */
/* 900px, not 760: at a tablet's 768 the bar still rode 84px up, over the balance line (dev7, 30 Nov 2026). */
@media (max-width: 900px) {
  .cbf .cbf-dock[data-cbf-dock] {
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    margin-right: max(0px, calc(var(--help-room-x, 0px) - 28px));
  }
  .cbf .cbf-dock .cbf-go { flex-basis: 120px; }
}
.cbf .cbf-prog .is-mine .cbf-pdot { border-style: dashed; border-color: var(--cst-good, #1c6b43); }

/* Being made, then ready. */
.cbf .cbf-making { display: flex; flex-direction: column; gap: 12px; padding: 18px 16px; border-radius: 16px; background: var(--cst-ind-bg, #F7F6FF); border: 1px solid var(--cst-ind-ring, #E4E3FB); min-width: 0; }
.cbf .cbf-making.is-made { background: var(--cst-good-bg, #EEF7F1); border-color: #cfe6d8; }
.cbf .cbf-prog { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cbf .cbf-prog li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.4; }
.cbf .cbf-prog li > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.cbf .cbf-prog b { font-weight: 600; color: var(--cst-ink, #1e1b2e); }
.cbf .cbf-prog small { font-size: 14px; color: var(--cst-ink-2, #5d5566); }
.cbf .cbf-pdot { flex: none; width: 14px; height: 14px; margin-top: 4px; border-radius: 50%; border: 2px solid #b9b3c4; background: #fff; }
.cbf .cbf-prog .is-making .cbf-pdot { border-color: var(--cst-ind, #4338CA); background: var(--cst-ind, #4338CA); animation: cbf-pulse 1.4s ease-in-out infinite; }
.cbf .cbf-prog .is-ready .cbf-pdot { border-color: var(--cst-good, #1c6b43); background: var(--cst-good, #1c6b43); }
.cbf .cbf-prog .is-failed .cbf-pdot { border-color: var(--cst-warn-ink, #5c3a0a); background: var(--cst-warn-bg, #FFF6E8); }
@media (prefers-reduced-motion: reduce) { .cbf .cbf-wait::before, .cbf .cbf-prog .is-making .cbf-pdot { animation: none; } .cbf .cbf-part { transition: none; } }

/* In Maya's box: what her one chat changes on a Clip with a brief (the words, or the video). */
.cbf-about { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; font-size: 14px; color: var(--cst-ink-2, #5d5566); }
.cbf-about > span { flex: 1 0 100%; font-weight: 600; }
.cbf-about button { flex: 1 1 0; min-height: 44px; border: 1px solid var(--cst-line, #e3ded4); background: #fff; border-radius: 999px; padding: 8px 14px; font: 600 14px "Bricolage Grotesque", sans-serif; color: var(--cst-ink, #1e1b2e); }
.cbf-about button[aria-pressed="true"] { border-color: var(--cst-ind, #4338CA); background: var(--cst-ind-bg, #F7F6FF); color: var(--cst-ind-d, #3127a8); box-shadow: inset 0 0 0 1px var(--cst-ind, #4338CA); }
.cbf-about button:disabled { opacity: .6; }

@media (min-width: 760px) {
  .cbf { padding: 28px 32px; gap: 26px; }
  .cbf .cbf-levels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cbf .cbf-cover { width: 64px; height: 114px; }
  .cbf .cbf-pay, .cbf .cbf-making { padding: 22px 24px; }
  .cbf .cbf-go { max-width: 420px; }
}

/* 🖼 A part's place as a picture (js/clips/clips-brief.js placeWaysHtml, placePicHtml; 1 Dec 2026). */
.cbf .cbf-place-ways { margin-top: 2px; }
.cbf .cbf-place-pic { display: flex; align-items: center; gap: 12px; margin: 0; font-weight: 600; }
.cbf .cbf-place-pic img { width: 56px; height: 72px; object-fit: cover; border-radius: 10px; flex: none; background: #e7e5df; }
