/* clankford.ie home page only (loaded by lib/clankford-site.js for "/"), round 14.
 * The whole page Michal picked on 14 Oct 2026: round 12 "Ask on Monday" on top (the week,
 * the tally, the pinned chat screen, "Learned from you") and round 13 B2 "Build your plan"
 * below (the plan you tick, "From the first day", the footer). Ported from the mockup at
 * /home/studio/clankford-ie-samples/round13/b2-build-your-plan (scripts/parts/*.css); each
 * block keeps its source note. site.css stays the base: header, buttons, bands and type.
 * Round 40 (C4): the greeting, the chat window and the house rules on top are home-chat.css,
 * loaded after this file; the week below them keeps its rules here.
 * Front door: vault/Workspaces/clank-websmith/projects/clankford-ie/PROJECT.md */

/* ── what the mockup's base.css had that site.css does not ───────────────────── */
:root {
  --head-h: 72px;                        /* .site-head__row min-height in site.css */
  --pin-top: calc(var(--head-h) + 16px);
}
html { scroll-padding-top: calc(var(--head-h) + 16px); }
/* the mockup's type scale for this page (same specificity as site.css, which loads first) */
h1 { font-size: clamp(2.8rem, 4.6vw, 4.4rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3.2rem); }
p { text-wrap: pretty; }
.lead { font-size: clamp(1.08rem, 1.3vw, 1.18rem); }
.btn-row { gap: 12px 16px; }
/* the icon sprite the week and the plan draw from */
.home-icons { position: absolute; width: 0; height: 0; overflow: hidden; }


/* ══ NEW: THE WEEK, TICKED OFF, TAUGHT ONCE ══════════════════════════════════════
   Since round 40 (C4) the week sits under the greeting and the house rules (home-chat.css), so its
   opening words are an H2 head (the line you know), no longer the page's H1 and its buttons.
   One grid holds the opening words, the six days (Monday to Friday, then next Monday),
   their six chat screens and the running tally, in reading order: words, Monday, its
   chat, Tuesday, its chat, and so on, then the tally, which is also the week's summary
   for screen readers and phones.
   Phones and tablets (the default): that order, one under the other. Every chat after
   Monday's shows its finished result, with a button for the whole chat.
   Wide screens (.js, 1100px wide and 640px tall or more): the left column is the week.
   The tally pins at the top of it, level with the top of the screen. Each day pins under
   the one before it and, once the next day reaches it, folds to one ticked row, so the
   week builds up as you scroll. The six screens sit in one sticky cell on the right and
   the one for the day in hand is shown. Two loops in the margin show the jobs that came
   back: Tuesday to Thursday (Sarah's follow-up) and Monday to next Monday. */
.day {
  --tick-line: #7d95a8;
  padding: clamp(48px, 6vw, 80px) 0 clamp(64px, 8vw, 104px); border-top: 1px solid var(--hud-faint);
}
.intro { min-width: 0; }
.intro .kicker { margin-bottom: 10px; }
.intro h2 { max-width: 11em; font-size: clamp(2.2rem, 4.2vw, 3.4rem); }
.intro__line2 { display: block; color: var(--hud-dim); }
.intro .lead { margin-top: 18px; max-width: 46ch; }

/* a day: its box, the big day name, one line, what it learned or already knew, where it stands */
.moment { position: relative; min-width: 0; margin-top: clamp(64px, 12vw, 96px); }
.moment:focus { outline: none; }
.moment:focus-visible { outline: 2px solid var(--hud); outline-offset: 8px; }
.moment__in { position: relative; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); align-items: start; }
.moment__in > :not(.tick):not(.loop) { grid-column: 2; min-width: 0; }
.moment__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin: 0; line-height: 1; }
.moment__name { font-size: clamp(2.6rem, 9vw, 3.2rem); line-height: 1; letter-spacing: 0.01em; }
.moment__at { font-family: var(--body); font-size: 1rem; font-weight: 600; letter-spacing: 0.04em; color: var(--hud); font-variant-numeric: tabular-nums; }
.moment__what { margin-top: 14px; font-size: 1.1rem; line-height: 1.55; color: var(--hud-dim); max-width: 31ch; }
/* next Monday: the headline comes true, so its first line is the promise, in white */
.moment__payoff { margin-top: 14px; font-size: 1.3rem; font-weight: 600; line-height: 1.35; color: var(--hud-text); }
.moment__payoff + .moment__what { margin-top: 6px; }

/* what it learned, or already knew: the same family as the learned card in the chat */
.moment__learn {
  display: none; align-items: flex-start; gap: 9px; margin-top: 14px; padding: 7px 12px 8px 10px; max-width: 34ch;
  border: 1px solid var(--hud-soft); border-left: 3px solid var(--hud); border-radius: 8px; background: var(--hud-wash);
  font-size: 0.95rem; line-height: 1.4; color: var(--hud-text);
}
.moment__learn .ic { width: 15px; height: 15px; margin-top: 2px; color: var(--hud); }
.moment__learn b { font-weight: 600; color: var(--hud); }
.moment[data-chip="off"] .moment__learn { visibility: hidden; }

/* where it stands: the words for each state in one place, one shown at a time, so nothing moves */
.moment__tag { display: grid; margin-top: 14px; font-size: 0.95rem; font-weight: 600; line-height: 1.35; color: var(--hud-text); }
.moment__tag .st { grid-area: 1 / 1; display: flex; align-items: flex-start; gap: 9px; visibility: hidden; }
.moment__tag .ic { width: 16px; height: 16px; margin-top: 1px; color: var(--hud); }
.moment__tag .dot { width: 9px; height: 9px; margin-top: 6px; }
.moment__tag .dot.is-wait { background: var(--state-wait); }
.moment__tag .dot.is-ok { background: var(--state-ok); }
.moment[data-state="working"] .st--working,
.moment[data-state="asking"] .st--asking,
.moment[data-state="final"] .st--final { visibility: visible; }
.st--working { color: var(--hud); }
.moment__short { display: none; }

/* the box: empty, lit while Clankford works, amber while a card waits for your yes, then
   ticked. Green when it is done, amber when it still waits (the dashboard's own state colours) */
.tick {
  grid-column: 1; grid-row: 1; align-self: center; position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 6px;
  border: 2px solid var(--tick-line); background: var(--hud-bg);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.tick svg { width: 14px; height: 14px; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tick path { stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset 0.28s var(--ease); }
.moment[data-state="working"] .tick { border-color: var(--hud); box-shadow: 0 0 0 4px var(--hud-faint); }
.moment[data-state="asking"] .tick { border-color: var(--state-wait); }
.moment[data-state="final"] .tick { border-color: var(--state-ok); background: var(--state-ok); }
.moment[data-state="final"][data-final="wait"] .tick { border-color: var(--state-wait); background: var(--state-wait); }
.moment[data-state="final"] .tick path { stroke-dashoffset: 0; transition-delay: 0.08s; }

/* the running tally: what it has learned from you, what went out with your yes, what runs by itself */
.tally { min-width: 0; margin-top: clamp(56px, 10vw, 80px); }
.tally__in { padding-top: 14px; border-top: 1px solid var(--hud-soft); background: var(--hud-bg); }
.tally__when { margin: 0 0 10px; font-size: 0.75rem; font-weight: 700; line-height: 1.4; letter-spacing: 0.2em; text-transform: uppercase; color: var(--hud); }
.tally__list { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.tally__list li { display: flex; align-items: center; gap: 11px; font-size: 1.02rem; line-height: 1.4; color: var(--hud-dim); }
.tally__list b { font-weight: 600; color: var(--hud-text); font-variant-numeric: tabular-nums; }
.tally__list .ic { width: 16px; height: 16px; color: var(--hud); }
.tally__list .dot { width: 9px; height: 9px; margin: 0 3.5px; background: var(--state-wait); }
.tally__list .dot.is-ok { background: var(--state-ok); }
.tally__learned { border-radius: 4px; }
.js .tally__learned.is-bump { animation: tally-bump 1.4s var(--ease) both; }
@keyframes tally-bump { from { background: rgba(47, 193, 255, 0.24); box-shadow: 0 0 0 4px rgba(47, 193, 255, 0.24); } to { background: transparent; box-shadow: 0 0 0 4px transparent; } }
.tally__wait { font-weight: 600; }
.tally__wait span:last-child { color: var(--hud-text); }

/* a chat screen, with its honest label */
.shot { container: demo / inline-size; min-width: 0; margin: 22px 0 0; }
.shot__cap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 18px; margin-top: 10px; font-size: 0.95rem; color: var(--hud-dim); }
.shot__again {
  min-height: 40px; padding: 0 2px; border: 0; background: none;
  color: var(--hud-text); font: 500 0.95rem/1.2 var(--body);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--hud-soft); cursor: pointer;
}
.shot__again:hover { text-decoration-color: var(--hud); }
html:not(.js) .shot__again { display: none; }
/* phones: the days after Monday show the finished result; "Show the whole chat" brings back every line */
.js .shot.is-brief .is-step,
.js .shot.is-brief .cfv2-panel__tab:not(.is-active) { display: none; }
.loop { display: none; }

/* wide screens: the week builds up on the left beside the pinned screen */
@media (min-width: 1100px) and (min-height: 640px) {
  .js .day {
    --tally-h: 9.6rem;
    --tally-row: calc(var(--tally-h) + 0.75rem);
    --row-c: 3rem;
    --node-y: 42px;                        /* the middle of the big day name, from the top of a day */
    --step: max(60svh, 460px);
    --step-last: max(97svh, 680px);
  }
  .js .day__grid {
    display: grid;
    grid-template-columns: minmax(0, 23.5rem) minmax(0, 1fr);
    grid-template-rows: auto var(--tally-row) repeat(5, var(--step)) var(--step-last);
    column-gap: clamp(40px, 4vw, 64px);
    align-items: start;
  }
  /* the week's head and the first screen start level under the house rules */
  .js .day { padding-top: 64px; }
  .js .intro { grid-column: 1; grid-row: 1; padding-bottom: 28px; }
  .js .intro h2 { font-size: clamp(2.4rem, 3.3vw, 3.2rem); }

  /* the tally and each day span from their own row to the end of the week, so they can stay
     pinned to the end; the script sets their bottom padding so the whole column leaves
     together with the screen */
  .js .tally { grid-column: 1; grid-row: 2 / -1; align-self: stretch; margin: 0; pointer-events: none; }
  .js .tally__in { position: sticky; top: var(--pin-top); z-index: 2; height: var(--tally-h); pointer-events: auto; }
  .js .moment { grid-column: 1; grid-row: var(--row) / -1; align-self: stretch; margin: 0; pointer-events: none; }
  .js .moment--1 { --row: 3; --i: 0; }
  .js .moment--2 { --row: 4; --i: 1; }
  .js .moment--3 { --row: 5; --i: 2; }
  .js .moment--4 { --row: 6; --i: 3; }
  .js .moment--5 { --row: 7; --i: 4; }
  .js .moment--6 { --row: 8; --i: 5; }
  .js .moment__in {
    position: sticky; top: calc(var(--pin-top) + var(--tally-row) + var(--i) * var(--row-c));
    padding: 14px 0 20px; pointer-events: auto;
  }
  .js .moment__name { font-size: 3.5rem; }
  .js .moment__what { margin-top: 12px; font-size: 1.12rem; }
  .js .moment__learn { display: flex; }
  /* grid-area auto: placed from the top of the day's box, not from its first grid row, so the
     box sits on the middle of the day name and the loops and the week line meet it there */
  .js .tick { position: absolute; grid-area: auto; left: 0; top: calc(var(--node-y) - 11px); }

  /* the week line: a rule down the boxes, dashed over the weekend */
  .js .moment__in::before, .js .moment__in::after { content: ''; position: absolute; left: 10.5px; border-left: 1px solid var(--hud-soft); }
  .js .moment__in::before { top: 0; height: calc(var(--node-y) - 15px); }
  .js .moment__in::after { top: calc(var(--node-y) + 15px); bottom: 0; }
  .js .moment--1 .moment__in::before, .js .moment--6 .moment__in::after { display: none; }
  .js .moment--5 .moment__in::after, .js .moment--6 .moment__in::before { border-left-style: dashed; }
  .js .moment[data-state="working"] .tick { box-shadow: 0 0 0 4px var(--hud-faint), 0 0 14px var(--hud-glow); }

  /* a day behind you folds to one row: box, day, what happened, a mark if it learned something, Done */
  .js .moment.is-past .moment__in {
    --node-y: calc(var(--row-c) / 2);
    grid-template-columns: 2.25rem auto minmax(0, 1fr); column-gap: 0;
    align-items: center; height: var(--row-c); padding: 0;
    border-bottom: 1px solid var(--hud-faint);
  }
  .js .moment.is-past .moment__head { grid-column: 2; grid-row: 1; padding-right: 14px; }
  .js .moment.is-past .moment__name { font-size: 1.35rem; }
  .js .moment.is-past .moment__at,
  .js .moment.is-past .moment__payoff,
  .js .moment.is-past .moment__what,
  .js .moment.is-past .moment__learn,
  .js .moment.is-past .moment__tag {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .js .moment.is-past .moment__short {
    display: flex; align-items: center; gap: 10px; grid-column: 3; grid-row: 1; min-width: 0;
  }
  .moment__did { flex: 1 1 auto; min-width: 0; font-size: 0.92rem; color: var(--hud-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .moment__short .ic { width: 14px; height: 14px; color: var(--hud); }
  .moment__st { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--state-ok); }

  /* the loops: a job booked on one day and coming back on a later one, drawn from the box it
     was booked in to the box it came back in, once the later day has settled into place */
  .js .loop {
    display: block; position: absolute; pointer-events: none;
    bottom: calc(100% - var(--node-y));
    height: calc(var(--node-y) + (var(--span) - 0.5) * var(--row-c));
    border: 1px solid var(--hud); border-right: 0; border-radius: 10px 0 0 10px;
    opacity: 0; transition: opacity 0.3s var(--ease);
  }
  .js .loop--back { --span: 2; left: -16px; width: 14px; }
  .js .loop--week { --span: 5; left: -34px; width: 32px; }
  .js .moment.is-back .loop { opacity: 1; }
  .js .loop::after {                        /* the arrowhead, pointing into the box it came back to */
    content: ''; position: absolute; right: -6px; bottom: -5px;
    border: 4.5px solid transparent; border-left: 6px solid var(--hud); border-right: 0;
  }

  .js .shot {
    --shot-h: clamp(480px, calc(100svh - var(--pin-top) - 56px), 790px);
    grid-column: 2; grid-row: 1 / -1; align-self: start;
    position: sticky; top: var(--pin-top);
    margin: 0;
    opacity: 0; pointer-events: none; z-index: 0;
    transition: opacity 0.18s var(--ease);
  }
  .js .shot.is-active { opacity: 1; pointer-events: auto; z-index: 2; }
  .js .shot.was-active { opacity: 1; z-index: 1; transition: none; }
  .js .shot .demo { height: var(--shot-h); }
  .js .shot .cfv2-chat--voices { overflow-y: auto; }
  /* a narrow screen beside the week (windows 1100 to about 1250 wide): Monday's screen drops
     the phone strip over its chat too, so the chat keeps its height */
  @container demo (max-width: 700px) {
    .js .shot--1 .cgf-pop__rail { display: none; }
    .js .shot--1 .cgf-pop__chat { padding-top: 6px; }
  }
}
/* a shorter wide window: the same week, a little tighter, so all six days fit */
@media (min-width: 1100px) and (min-height: 640px) and (max-height: 859px) {
  .js .day { --tally-h: 8.4rem; --row-c: 2.6rem; --node-y: 34px; padding-top: 56px; }
  .js .intro h2 { font-size: clamp(2.3rem, 3vw, 2.9rem); }
  .js .moment__in { padding: 10px 0 14px; }
  .js .moment__name { font-size: 2.9rem; }
  .js .moment__what { margin-top: 8px; font-size: 1rem; }
  .js .moment__payoff { margin-top: 8px; font-size: 1.15rem; }
  .js .moment__learn { margin-top: 10px; font-size: 0.9rem; padding-top: 5px; padding-bottom: 6px; }
  .js .moment__tag { margin-top: 10px; font-size: 0.9rem; }
  .js .tally__list { gap: 2px; }
  .js .tally__list li { font-size: 0.95rem; }
  .js .tally__when { margin-bottom: 6px; }
  .js .moment.is-past .moment__name { font-size: 1.2rem; }
}
/* a short wide window (a laptop with the browser's bars, 640 to 739 tall): tighter again, so
   next Monday still ends inside the window */
@media (min-width: 1100px) and (min-height: 640px) and (max-height: 739px) {
  .js .day { --tally-h: 7.3rem; --tally-row: calc(var(--tally-h) + 0.5rem); --row-c: 2.3rem; --node-y: 28px; }
  .js .intro { padding-bottom: 18px; }
  .js .intro .kicker { margin-bottom: 6px; }
  .js .intro .lead { margin-top: 12px; }
  .js .intro h2 { font-size: clamp(2.2rem, 2.8vw, 2.7rem); }
  .js .moment__in { padding: 8px 0 10px; }
  .js .moment__name { font-size: 2.5rem; }
  .js .moment__what { margin-top: 6px; font-size: 0.97rem; line-height: 1.5; }
  .js .moment__payoff { margin-top: 6px; font-size: 1.08rem; }
  .js .moment__learn, .js .moment__tag { margin-top: 8px; }
  .js .tally__in { padding-top: 10px; }
  .js .tally__list li { font-size: 0.9rem; line-height: 1.3; }
  .js .tally__when { margin-bottom: 4px; }
  .js .moment.is-past .moment__name { font-size: 1.1rem; }
}

/* ══ THE CHAT SCREEN (round 9, unchanged in look) ═══════════════════════════════
   A working copy of Clankford's card on the Clank Floor (our dashboard), from:
   clank-game-floor.css (the card, its rail, head, kicker, portrait, managers list),
   clank-desk-home.css (.cfv2-railwork, "Currently working on"),
   clank-studio-desks.css (.cfv2-panel tabs, .cfv2-cc composer),
   clank-desk-back.css (.cfv2-desk__back), clank-chat-voices.css (the two voices),
   clank-workflow-asks.css (.cfv2-askbox, here .cfv2-yes), clank-chat-cards.css
   (.cfv2-handoff, here the automation line, the report card and the client record).
   Card tokens: clank-game-floor-layout.js blueCardTokens(). */
.demo {
  --hud-shell: #0d1b2b;                   /* blueCardTokens ground, rgb(13,27,43) */
  --hud-shell-far: #08121e;               /* blueCardTokens far, rgb(8,18,30) */
  --hud-soft: rgba(47, 193, 255, 0.55);
  --hud-faint: rgba(47, 193, 255, 0.28);
  --hud-wash: rgba(47, 193, 255, 0.08);
  --hud-ok: #35e08d;
  --hud-warn: #ffb454;
  --cgf-ring-haze: rgba(47, 193, 255, 0.34);
  --voice-text: #f0ece1;
  --voice-agent-wash: var(--cgf-ring-haze);
  --voice-agent-line: var(--hud-faint);
  --voice-you-wash: rgba(53, 224, 141, 0.16);
  --voice-you-line: rgba(53, 224, 141, 0.5);
  position: relative;
  margin: 0;
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  border: 1px solid rgba(47, 193, 255, 0.3);
  border-radius: 10px;
  background: var(--hud-shell);
  box-shadow: 0 0 0 1px rgba(47, 193, 255, 0.07), 0 30px 80px rgba(4, 10, 18, 0.6);
  overflow: hidden;
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
}
.demo .bot { display: block; --bot-alpha: 1; --bot-lit: #7cc6f0; --bot-eye: #e6f7ff; }  /* --hud-chief-head and -eye, clankford-v2-theme.css */ /* design-check-ignore: V2 HUD colour, as site.css */

/* the rail (.cgf-pop__rail on .is-team) */
.cgf-pop__rail { min-width: 0; min-height: 0; padding: 16px 14px 14px; border-right: 1px solid var(--hud-faint); overflow: hidden; }
.cgf-pop__head {
  position: relative; display: flex; align-items: center; gap: 12px;
  margin: 0 0 6px; padding: 10px; border: 1px solid var(--hud-faint); border-radius: 4px; background: var(--hud-wash);
}
.cgf-pop__portrait-slot {
  position: relative; flex: none; width: 58px; height: 58px; display: grid; place-items: center;
  border-radius: 6px; background: var(--hud-shell-far); border: 1px solid var(--hud-faint);
}
.cgf-pop__portrait-slot.is-working {
  border-color: #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55), 0 0 12px rgba(255, 255, 255, 0.45);
  animation: cgf-live-white 1.6s ease-in-out infinite;
}
@keyframes cgf-live-white {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3), 0 0 4px rgba(255, 255, 255, 0.2); }
  50% { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 0 18px rgba(255, 255, 255, 0.65); }
}
.cgf-pop__head-txt { min-width: 0; flex: 1 1 auto; }
.cgf-pop__kicker { margin: 0 0 3px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hud); }
.cgf-pop__kicker.is-idle { color: var(--hud-dim); }
.cgf-pop__name { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.15; letter-spacing: 0.01em; color: var(--hud-text); }
.cgf-pop__chats {
  position: absolute; top: -7px; right: -7px;
  min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center;
  border-radius: 9px; background: var(--hud); color: var(--hud-shell-far);
  font-size: 10px; font-weight: 700; line-height: 1; box-shadow: 0 0 0 2px var(--hud-shell-far);
}
.cgf-pop__railtuck {
  position: absolute; right: 8px; bottom: 6px; width: 22px; height: 22px; display: grid; place-items: center;
  border: 1px solid var(--hud-faint); border-radius: 6px; background: var(--hud-shell-far); color: var(--hud-dim);
}
.cgf-pop__railtuck .ic { width: 12px; height: 12px; }

/* "Currently working on" (clank-desk-home.css .cfv2-railwork) */
.cfv2-railwork { margin: 10px 0 0; }
.cfv2-railwork__row {
  display: flex; flex-direction: column; align-items: stretch; gap: 5px;
  padding: 9px 11px 10px; border: 1px solid var(--hud-faint); background: var(--hud-wash);
}
.cfv2-railwork__row:first-child { border-radius: 7px 7px 0 0; }
.cfv2-railwork__row:last-child { border-radius: 0 0 7px 7px; }
.cfv2-railwork__row:only-child { border-radius: 7px; }
.cfv2-railwork__row + .cfv2-railwork__row { border-top: 0; padding: 8px 11px 9px; }
.cfv2-railwork__workhead { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hud-dim); }
.cfv2-railwork__line { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--hud-text); }
.cfv2-railwork__line .ic { width: 13px; height: 13px; color: var(--hud); }
.dot.is-live { background: var(--hud-ok); box-shadow: 0 0 6px var(--hud-ok); }
/* a rail row lit while the chat uses it: the weekly job when it runs, a lesson when it is used */
.cfv2-railwork__row, .cfv2-known__row { transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.cfv2-railwork__row.is-lit, .cfv2-known__row.is-lit { background: rgba(47, 193, 255, 0.16); box-shadow: inset 2px 0 0 var(--hud); }
.dot.is-wait { background: var(--hud-warn, #ffb454); }

/* Managers, one quiet band per area (clank-game-floor.css .cgf-pop__team--managers) */
.cgf-pop__team { margin-top: 14px; }
.cgf-pop__team-h {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0; padding: 7px 11px; border: 1px solid var(--hud-faint); border-radius: 7px 7px 0 0; background: var(--hud-wash);
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hud-dim);
}
.cgf-pop__crew-sum { font-weight: 500; letter-spacing: 0.1em; color: var(--hud-dim); }
.cgf-pop__team-areas { margin: 0; padding: 0; list-style: none; }
.cgf-pop__team-area {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 11px; border: 1px solid var(--hud-faint); border-top: 0; background: var(--hud-shell-far);
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--hud-dim);
}
.cgf-pop__team-area:last-child { border-radius: 0 0 7px 7px; }
.cgf-pop__team-area-name { flex: 1 1 auto; min-width: 0; }
.cgf-pop__team-area-busy { font-style: normal; font-weight: 500; letter-spacing: 0.06em; color: var(--hud-ok); }
.cgf-pop__team-area-n { font-weight: 500; letter-spacing: 0.06em; color: var(--hud-text); }

/* the chat column (.cgf-pop__chat on .is-team) and its box (.cfv2-panel) */
.cgf-pop__chat { min-width: 0; min-height: 0; padding: 6px; display: flex; }
.cfv2-panel {
  flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column;
  border: 1px solid var(--hud-soft); border-radius: 8px; background: var(--hud-shell-far); overflow: hidden;
}
.cfv2-panel__tabs {
  flex: none; display: flex; align-items: flex-end; gap: 3px;
  padding: 8px 8px 0; border-bottom: 1px solid var(--hud-faint); background: var(--hud-wash); overflow: hidden;
}
.cfv2-panel__tab {
  display: flex; align-items: center; gap: 2px; min-width: 0; max-width: 220px;
  padding: 0 4px 0 10px; border: 1px solid var(--hud-faint); border-bottom: 0; border-radius: 6px 6px 0 0;
  color: var(--hud-dim); cursor: pointer;
}
.cfv2-panel__tab:hover { color: var(--hud-text); }
.cfv2-panel__tab.is-active { flex-shrink: 0; color: var(--hud-text); background: var(--hud-shell-far); border-color: var(--hud-soft); margin-bottom: -1px; padding-bottom: 1px; cursor: default; }
.cfv2-panel__tab-name { min-width: 0; padding: 9px 4px 9px 0; font-size: 12.5px; font-weight: 600; line-height: 1; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cfv2-panel__tab-x, .cfv2-panel__add, .cfv2-panel__split { flex: none; display: grid; place-items: center; padding: 6px 6px; border-radius: 4px; color: var(--hud-dim); }
.cfv2-panel__tab-x .ic { width: 11px; height: 11px; }
.cfv2-panel__add, .cfv2-panel__split { align-self: center; margin-bottom: 4px; }
.cfv2-panel__split { margin-left: auto; }
.cfv2-panel__dot { flex: none; width: 7px; height: 7px; margin: 0 5px 0 0; border-radius: 50%; background: var(--hud-ok); }
.cfv2-panel__dot.is-wait { background: var(--hud-warn); }
.cfv2-panel__dot.is-working { background: var(--hud-warn); animation: cfv2-dot-pulse 1.4s ease-in-out infinite; }
@keyframes cfv2-dot-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.7); } }

/* the line under the tabs: the way back, what this chat is, the chat's own buttons */
.cfv2-chat__head { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--hud-faint); }
.cfv2-desk__back {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px 0 8px;
  border-radius: 999px; border: 1px solid var(--hud-faint); color: var(--hud-text);
  font-size: 12px; font-weight: 600; letter-spacing: 0.2px; white-space: nowrap;
}
.cfv2-desk__back .ic { width: 12px; height: 12px; color: var(--hud-dim); }
.cfv2-desk__desc { flex: 1 1 auto; min-width: 0; font-size: 12.5px; letter-spacing: 0.01em; color: var(--hud-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cfv2-chat__acts { flex: none; display: flex; align-items: center; gap: 22px; padding-right: 6px; color: var(--hud-dim); }
.cfv2-chat__acts .ic { width: 13px; height: 13px; }

/* the conversation (clank-chat-voices.css, .cfv2-chat--voices).
   It never traps the page's scroll: on phones it is as tall as its words; on the pinned
   screen the chats are written to fit, and no overscroll containment is set. */
.cfv2-chat--voices {
  position: relative;
  flex: 1 1 auto; min-height: 0; overflow: visible;
  padding: 20px 22px 8px; color: var(--voice-text); font-size: 14.5px; line-height: 1.62;
  scrollbar-width: thin; scrollbar-color: var(--hud-steel) transparent;
}
.cfv2-chat--voices:focus-visible { outline: 2px solid var(--hud); outline-offset: -2px; }
.cfv2-chat__thread { display: flex; flex-direction: column; }
.cfv2-chat__msg { position: relative; width: 100%; margin: 0 0 16px; display: flex; flex-direction: column; align-items: flex-start; }
.cfv2-chat__msg:last-child { margin-bottom: 8px; }
.cfv2-chat__msg p { margin: 0; max-width: none; }
.cfv2-chat__msg.is-you { align-items: flex-end; padding-left: 46px; }
.cfv2-chat__msg.has-face { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 10px; justify-items: start; align-items: start; }
.cfv2-chat__msg.has-face > * { grid-column: 2; }
.cfv2-chat__msg.has-face > .cfv2-chat__who-av { grid-column: 1; grid-row: 1 / span 4; }
.cfv2-chat__who-av {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 9px; background: var(--hud-shell-far); border: 1px solid var(--voice-agent-line); overflow: hidden;
}
.cfv2-chat__msg.is-working > .cfv2-chat__who-av {
  border-color: var(--hud);
  box-shadow: 0 0 0 1px var(--hud-soft), 0 0 12px var(--hud-glow);
  animation: cgf-voice-glow 1.6s ease-in-out infinite;
}
@keyframes cgf-voice-glow {
  0%, 100% { box-shadow: 0 0 0 1px var(--hud-faint), 0 0 8px var(--hud-glow); }
  50% { box-shadow: 0 0 0 1px var(--hud-soft), 0 0 16px rgba(234, 246, 255, 0.5); }
}
/* his voice: green, on the right, hugging its words */
.cfv2-chat__msg.is-you > p {
  max-width: max(50%, min(100%, 68ch)); margin: 0 0 0 auto; padding: 10px 15px;
  border: 1px solid var(--voice-you-line); border-radius: 14px 14px 4px 14px; background: var(--voice-you-wash);
  color: #ffffff; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere;
}
/* the agent's voice: one blue box per reply, the full column, its tail nearest his face */
.cfv2-chat__say {
  position: relative; width: 100%; padding: 11px 46px 11px 16px;
  border: 1px solid var(--voice-agent-line); border-radius: 4px 14px 14px 14px; background: var(--voice-agent-wash);
  color: #ffffff; font-size: 14.5px; line-height: 1.58;
}
.cfv2-chat__say p + p { margin-top: 6px; }
.cfv2-chat__copy, .cfv2-chat__speak { position: absolute; right: 14px; color: var(--hud-dim); line-height: 0; }
.cfv2-chat__copy { top: 12px; }
.cfv2-chat__speak { bottom: 10px; }
.cfv2-chat__copy .ic, .cfv2-chat__speak .ic { width: 12px; height: 12px; }
/* "Working..." sits over the space the reply will fill, so nothing below moves */
.cfv2-chat__typing { position: absolute; left: 0; top: 7px; margin: 0; font-size: 13px; color: var(--hud-dim); }
.cfv2-chat__msg.has-face > .cfv2-chat__typing { grid-column: 2; grid-row: 1; }
.cfv2-chat__msg:not(.is-working) > .cfv2-chat__typing { display: none; }

/* cards in the chat: one family, three uses.
   .cfv2-yes           the approval card (clank-workflow-asks.css .cfv2-askbox), amber while it waits, green once sent
   .cfv2-yes.is-report a card for you, nothing to approve (clank-chat-cards.css .cfv2-handoff, accent rule on the left)
   .cfv2-rec           the client record, in either of the two looks above */
.cfv2-yes {
  width: 100%; margin-top: 10px; border: 1px solid var(--hud-warn); border-radius: 10px; background: var(--hud-wash);
  font-size: 13px; line-height: 1.4; color: var(--hud-text); overflow: hidden;
}
.cfv2-yes.is-done { border-color: var(--hud-ok); }
.cfv2-yes.is-report { border: 1px solid var(--hud-faint); border-left: 2px solid var(--hud); }
.cfv2-yes__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; padding: 8px 12px; border-bottom: 1px solid var(--hud-faint); }
.cfv2-yes__head b { font-weight: 600; }
.cfv2-yes__sum { font-weight: 600; font-variant-numeric: tabular-nums; }
.cfv2-yes__rows { margin: 0; padding: 0; list-style: none; }
.cfv2-yes__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 6.2rem) minmax(0, 6.4rem) minmax(0, 7.6rem); align-items: baseline; gap: 2px 14px; padding: 5px 12px; }
.cfv2-yes__row + .cfv2-yes__row { border-top: 1px solid var(--hud-faint); }
.cfv2-yes__row b { font-weight: 600; }
.cfv2-yes__row > span { color: var(--hud-dim); font-variant-numeric: tabular-nums; }
.cfv2-yes__num { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cfv2-yes__row > span.cfv2-yes__num { color: var(--hud-text); }
.cfv2-yes__st { font-style: normal; text-align: right; color: var(--hud-text); }
.cfv2-yes__st.is-open { color: var(--hud-dim); }
.cfv2-yes__row.is-done .cfv2-yes__st .is-sent { color: var(--hud-ok); }
.cfv2-yes__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 7px 12px 8px; border-top: 1px solid var(--hud-faint); }
.cfv2-yes__state { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--hud-warn); }
.cfv2-yes__state .is-sent { color: var(--hud-ok); }
.cfv2-yes__acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-left: auto; }
.cfv2-yes__btn { display: inline-flex; align-items: center; padding: 7px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1; }
.cfv2-yes__btn.is-quiet { border: 1px solid var(--hud-soft); color: var(--hud-text); }
.cfv2-yes__btn.is-go { padding: 7px 14px; border: 1px solid var(--hud); background: var(--hud); color: var(--hud-shell-far); }
.cfv2-yes.is-done .cfv2-yes__acts { visibility: hidden; }

/* the client record: name, stage, the fields that matter, kept up to date by the chat */
.cfv2-rec__head { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--hud-faint); }
.cfv2-rec__init {
  flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%;
  background: var(--hud-shell-far); border: 1px solid var(--hud-soft); font-size: 12px; font-weight: 700; color: var(--hud-text);
}
.cfv2-rec__name { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 600; }
.cfv2-rec__stage {
  flex: none; padding: 3px 9px; border: 1px solid var(--hud-soft); border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hud);
}
.cfv2-rec__stage .is-sent { color: var(--hud-ok); }
.cfv2-yes.is-done .cfv2-rec__stage { border-color: rgba(53, 224, 141, 0.6); }
.cfv2-rec__rows { margin: 0; padding: 4px 0; }
.cfv2-rec__rows > div { display: grid; grid-template-columns: 6.6rem minmax(0, 1fr); gap: 12px; padding: 4px 12px; }
.cfv2-rec__rows dt { color: var(--hud-dim); }
.cfv2-rec__rows dd { margin: 0; color: var(--hud-text); }
.cfv2-rec__raise { padding: 8px 12px 10px; border-top: 1px solid var(--hud-faint); }
.cfv2-rec__raise p { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--hud); }
.cfv2-rec__raise ol { margin: 5px 0 0; padding-left: 18px; }
.cfv2-rec__raise li { padding-left: 2px; }
.cfv2-rec__raise li + li { margin-top: 2px; }
.cfv2-rec__raise li::marker { color: var(--hud-dim); font-variant-numeric: tabular-nums; }

/* the automation line, under the reply that made it (the .cfv2-handoff family) */
.cfv2-auto {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 10px; padding: 7px 12px;
  border: 1px solid var(--hud-faint); border-left: 2px solid var(--hud); border-radius: 8px; background: var(--hud-wash);
  font-size: 13px; line-height: 1.4; color: var(--hud-text);
}
.cfv2-auto .ic { color: var(--hud); }
.cfv2-auto b { font-weight: 600; }
.cfv2-auto span { color: var(--hud-dim); }

/* a day line inside a chat, where the same conversation picks up on a later day */
.cfv2-chat__day {
  display: flex; align-items: center; gap: 12px; margin: 2px 0 16px; max-width: none;
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--hud-dim);
}
.cfv2-chat__day::before, .cfv2-chat__day::after { content: ''; flex: 1 1 auto; border-top: 1px solid var(--hud-faint); }
/* Monday's six check-ins: rows a pixel tighter, so the first chat fits a 1440x900 window whole */
.cfv2-yes--tight .cfv2-yes__head { padding-top: 7px; padding-bottom: 7px; }
.cfv2-yes--tight .cfv2-yes__row { padding-top: 4px; padding-bottom: 4px; }
.cfv2-yes--tight .cfv2-yes__foot { padding-top: 6px; padding-bottom: 7px; }
/* Friday's list says why a quote is not being chased, so its last column is wider */
.cfv2-yes--quotes .cfv2-yes__row { grid-template-columns: minmax(0, 1fr) minmax(0, 6.2rem) minmax(0, 4.6rem) minmax(0, 9rem); }

/* the message box (clank-studio-desks.css .cfv2-cc) */
.cfv2-cc { flex: none; position: relative; margin: 8px 14px 12px; border: 1px solid var(--hud-soft); border-radius: 10px; background: var(--hud-shell-far); }
.cfv2-cc:focus-within, .cfv2-cc.is-typing { border-color: var(--hud); box-shadow: 0 0 0 1px var(--hud-faint); }
.cfv2-cc__input {
  display: flex; align-items: center; gap: 6px; width: 100%; min-height: 40px; padding: 10px 12px 4px 12px;
  border: 0; border-radius: 10px 10px 0 0; background: none; color: var(--hud-dim);
  font: 13px/1.5 var(--body); text-align: left; cursor: text;
}
.cfv2-cc__input:focus-visible { outline: 2px solid var(--hud); outline-offset: -2px; }
.cfv2-cc__ph, .cfv2-cc__typed { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cfv2-cc__typed { display: none; color: var(--hud-text); }
.cfv2-cc.is-typing .cfv2-cc__ph { display: none; }
.cfv2-cc.is-typing .cfv2-cc__typed { display: block; }
.cfv2-cc.is-typing .cfv2-cc__typed::after { content: ''; display: inline-block; width: 1px; height: 1.05em; margin-left: 1px; vertical-align: -2px; background: var(--hud-text); }
.cfv2-cc__input .ic { color: var(--hud-dim); }
.cfv2-cc__bar { display: flex; align-items: center; gap: 4px; padding: 2px 8px 8px; color: var(--hud-dim); }
.cfv2-cc__icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; }
.cfv2-cc__talk { width: 30px; height: 30px; margin-left: auto; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--hud-soft); background: var(--hud-wash); color: var(--hud); }

/* playback: a line not said yet keeps its place but is not drawn, so nothing jumps;
   screen readers always get the whole conversation */
.js .cfv2-chat__msg.is-pending { opacity: 0; }
.js .cfv2-chat__msg.is-working > :not(.cfv2-chat__who-av):not(.cfv2-chat__typing) { opacity: 0; }
.js .cfv2-chat__msg.is-in,
.js .cfv2-chat__msg.is-said > .cfv2-chat__say,
.js .cfv2-chat__msg.is-said > .cfv2-yes,
.js .cfv2-chat__msg.is-said > .cfv2-auto { animation: demo-snap 0.22s var(--ease) both; }
.js .cfv2-chat__msg.is-said > .cfv2-yes { animation-delay: 0.2s; }
.js .cfv2-chat__msg.is-said > .cfv2-auto { animation-delay: 0.3s; }
@keyframes demo-snap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* the record keeping itself up to date: a changed field flashes once */
.js .cfv2-yes.is-flash .swap > .is-sent { animation: rec-flash 1.4s var(--ease) both; }
@keyframes rec-flash { from { background: rgba(53, 224, 141, 0.32); } to { background: transparent; } }


/* ══ NEW IN THE SCREEN: TEACH IT ONCE ═══════════════════════════════════════════
   .cfv2-learn          the "Learned from you" card: what you taught it, in its own words,
                        with the day it learned it. The .cfv2-handoff family (wash, cyan rule
                        on the left, caps kicker), with a brighter edge so it reads as its own thing.
   .cfv2-learn--used    the same card, pointing back: a later chat using what it was taught.
   .cfv2-draft          one message as it will go out, inside an approval card.
   .v1 / .v2            a card before and after you taught it (the script adds .is-v2).
   .cfv2-known          "Learned from you" in the rail: everything it has been taught, the row
                        in use lit. */
.cfv2-learn {
  position: relative; width: 100%; margin-top: 10px; padding: 8px 12px 9px;
  border: 1px solid var(--hud-soft); border-left: 3px solid var(--hud); border-radius: 10px; background: var(--hud-wash);
  font-size: 13px; line-height: 1.4; color: var(--hud-text);
}
.cfv2-learn__head { display: flex; align-items: center; gap: 8px; margin: 0; max-width: none; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; line-height: 1.4; text-transform: uppercase; color: var(--hud); }
.cfv2-learn__head .ic { width: 13px; height: 13px; }
.cfv2-learn__when { margin-left: auto; font-weight: 600; letter-spacing: 0.08em; color: var(--hud-dim); }
.cfv2-learn__rule { margin-top: 3px; font-size: 14.5px; font-weight: 600; line-height: 1.4; color: #ffffff; }
.cfv2-learn__note { margin-top: 1px; color: var(--hud-dim); }
.cfv2-learn--used { display: flex; align-items: flex-start; gap: 8px; padding: 6px 12px 7px; }
.cfv2-learn--used .ic { width: 13px; height: 13px; margin-top: 2px; color: var(--hud); }
.cfv2-learn--used b { font-weight: 600; color: var(--hud); }
.cfv2-learn--used + .cfv2-yes { margin-top: 8px; }

/* a message as it will go out */
.cfv2-draft { margin: 0; padding: 8px 12px 9px; border-bottom: 1px solid var(--hud-faint); }
.cfv2-draft p { margin: 0; max-width: none; padding-left: 10px; border-left: 2px solid var(--hud-faint); color: #ffffff; font-size: 13px; line-height: 1.45; }
.cfv2-yes__names { min-width: 0; color: var(--hud-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* before and after you taught it: one shown at a time */
.v2 { display: none; }
.is-v2 .v1 { display: none; }
.is-v2 span.v2 { display: inline; }
.is-v2 div.v2, .is-v2 dl.v2, .is-v2 ol.v2 { display: block; }
.js .is-flash2 .v2 { animation: rec-flash-blue 1.4s var(--ease) both; }
@keyframes rec-flash-blue { from { background: rgba(47, 193, 255, 0.3); } to { background: transparent; } }
.cfv2-rec__rows .is-owed dt, .cfv2-rec__rows .is-owed dd { font-weight: 600; color: var(--hud-text); }

/* next Monday's check-ins: who, and the booking each message mentions */
.cfv2-yes--payoff .cfv2-yes__row,
.cfv2-yes--payoff .cfv2-yes__head { display: grid; grid-template-columns: minmax(0, 5.6rem) minmax(0, 1fr); column-gap: 14px; }
.cfv2-yes--payoff:not(.is-done) .cfv2-yes__btn.is-go { box-shadow: 0 0 0 3px rgba(47, 193, 255, 0.28), 0 0 16px rgba(47, 193, 255, 0.4); }

/* one tap: the button you would press, pressed */
.cfv2-yes__btn { transition: background-color 0.12s var(--ease), transform 0.12s var(--ease), box-shadow 0.12s var(--ease); }
.cfv2-yes__btn.is-go.is-pressed { background: var(--hud-bright); border-color: var(--hud-bright); transform: scale(0.94); box-shadow: 0 0 0 4px rgba(47, 193, 255, 0.35); }

/* "Learned from you" in the rail */
.cfv2-known { margin-top: 14px; }
.cfv2-known__h {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0; padding: 7px 11px; border: 1px solid var(--hud-faint); border-radius: 7px 7px 0 0; background: var(--hud-wash);
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hud);
}
.cfv2-known__n { font-weight: 600; letter-spacing: 0.06em; color: var(--hud-text); font-variant-numeric: tabular-nums; }
.cfv2-known__list { margin: 0; padding: 0; list-style: none; border-radius: 0 0 7px 7px; overflow: hidden; }
.cfv2-known__row {
  display: flex; align-items: flex-start; gap: 8px; padding: 7px 11px 8px;
  border: 1px solid var(--hud-faint); border-top: 0; background: var(--hud-shell-far);
  font-size: 12px; font-weight: 500; line-height: 1.35; color: var(--hud-text);
}
.cfv2-known__row .ic { width: 12px; height: 12px; margin-top: 2px; color: var(--hud); }
.js .cfv2-known__row.is-new { animation: rec-flash-blue 1.4s var(--ease) both; }

/* playback for the new pieces: the learned card arrives with one ring, once */
.js .cfv2-chat__msg.is-said > .cfv2-learn { animation: learn-in 1.3s var(--ease) 0.15s both; }
.js .cfv2-chat__msg.is-said > .cfv2-learn--used { animation: demo-snap 0.22s var(--ease) 0.1s both; }
@keyframes learn-in {
  0% { opacity: 0; transform: translateY(6px); box-shadow: 0 0 0 0 rgba(47, 193, 255, 0); }
  20% { opacity: 1; transform: none; box-shadow: 0 0 0 5px rgba(47, 193, 255, 0.32); }
  100% { opacity: 1; transform: none; box-shadow: 0 0 0 5px rgba(47, 193, 255, 0); }
}

/* the screen at its widths (container queries on .shot) */
@container demo (max-width: 980px) {
  .demo { grid-template-columns: 250px minmax(0, 1fr); }
  .cgf-pop__rail { padding: 14px 12px 12px; }
  .cgf-pop__portrait-slot { width: 50px; height: 50px; }
}
@container demo (max-width: 820px) {
  .demo { grid-template-columns: 228px minmax(0, 1fr); }
  .cfv2-yes__row, .cfv2-yes--quotes .cfv2-yes__row, .cfv2-yes--payoff .cfv2-yes__row { grid-template-columns: minmax(0, 1fr) auto; }
  .cfv2-yes__row > span:not(.cfv2-yes__num) { grid-column: 1; grid-row: 2; }
  .cfv2-yes__st { grid-column: 2; grid-row: 2; }
  /* next Monday's rows are a name and a booking: they stay on one line */
  .cfv2-yes--payoff .cfv2-yes__row, .cfv2-yes--payoff .cfv2-yes__head { grid-template-columns: minmax(0, 4.4rem) minmax(0, 1fr); }
  .cfv2-yes--payoff .cfv2-yes__row > span:not(.cfv2-yes__num) { grid-column: 2; grid-row: 1; }
}
/* a phone: the rail becomes a strip over the chat, the way the Floor does it on a phone,
   and only the first screen keeps it (the others are the same card, a few hours later) */
@container demo (max-width: 700px) {
  .demo { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; }
  .cgf-pop__rail { display: grid; grid-template-columns: minmax(0, 1fr); padding: 10px 10px 0; border-right: 0; }
  .shot:not(.shot--1) .cgf-pop__rail { display: none; }
  .cgf-pop__head { margin: 0; padding: 7px 8px; gap: 10px; }
  .cgf-pop__portrait-slot { width: 36px; height: 36px; border-radius: 5px; }
  .cgf-pop__portrait-slot .bot { width: 26px; height: 26px; }
  .cgf-pop__name { font-size: 15px; }
  .cgf-pop__railtuck, .cgf-pop__team, .cfv2-known { display: none; }
  .cgf-pop__chats { top: 50%; right: 10px; margin-top: -9px; }
  .cfv2-railwork { margin-top: 8px; }
  .cgf-pop__chat { padding: 8px 6px 6px; }
  .shot:not(.shot--1) .cgf-pop__chat { padding-top: 6px; }
  .cfv2-desk__back { padding: 0 8px; }
  .cfv2-desk__back > span { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cfv2-chat__acts { gap: 16px; padding-right: 0; }
  .cfv2-chat__acts .ic:nth-child(n+3) { display: none; }
  .cfv2-chat--voices { padding: 16px 12px 6px; }
  .cfv2-chat__msg.has-face { grid-template-columns: 30px minmax(0, 1fr); column-gap: 8px; }
  .cfv2-chat__who-av { width: 30px; height: 30px; border-radius: 8px; }
  .cfv2-chat__who-av .bot { width: 22px; height: 22px; }
  .cfv2-chat__typing { top: 4px; }
  .cfv2-chat__msg.is-you { padding-left: 24px; }
  .cfv2-chat__msg.is-you > p { max-width: 100%; }
  .cfv2-chat__say { padding: 10px 34px 10px 13px; }
  .cfv2-chat__copy, .cfv2-chat__speak { right: 11px; }
  .cfv2-rec__rows > div { grid-template-columns: 6rem minmax(0, 1fr); gap: 10px; }
  .cfv2-yes__foot { justify-content: flex-start; }
  .cfv2-yes__acts { width: 100%; margin-left: 0; }
  .cfv2-yes__btn { flex: 1 1 auto; justify-content: center; padding-top: 9px; padding-bottom: 9px; }
  .cfv2-yes.is-done .cfv2-yes__acts { display: none; }
  .cfv2-cc { margin: 6px 8px 8px; }
  .cfv2-panel__tabs { padding: 6px 6px 0; -webkit-mask-image: linear-gradient(90deg, #000 80%, transparent); mask-image: linear-gradient(90deg, #000 80%, transparent); }
  .cfv2-panel__tab { flex-shrink: 0; max-width: 150px; }
  .cfv2-panel__tab:not(.is-active) .cfv2-panel__tab-x, .cfv2-panel__add, .cfv2-panel__split { display: none; }
  .cfv2-panel__tab:not(.is-active) { padding-right: 8px; }
}

/* ══ NEW (round 13 B2): build your plan ═══════════════════════════════════════════
 * Left: the jobs as a tick list (the week's tick box, in cyan for "picked"). Right: the plan,
 * in the chat screen's card (far ground, cyan line, caps title), pinned while you tick. */
.plan { padding: clamp(64px, 8vw, 112px) 0; border-top: 1px solid var(--hud-faint); }
.plan__grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); grid-template-areas: "intro bill" "pick bill";
  gap: 0 clamp(40px, 5.5vw, 96px); align-items: start;
}
.plan__intro { grid-area: intro; padding-bottom: 40px; }
.plan__intro h2 { max-width: 15em; }
.plan__note { margin-top: 16px; color: var(--hud-dim); font-size: clamp(1.08rem, 1.3vw, 1.18rem); }
.pick { grid-area: pick; min-width: 0; }
.pick__set { margin: 0; padding: 0; border: 0; min-width: 0; }
.pick__head, .pick__row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 7.5rem 7.5rem; column-gap: 20px; }
.pick__head { padding: 0 12px 10px; border-bottom: 1px solid var(--hud-soft); }
.pick__head span { font-size: 0.75rem; font-weight: 700; line-height: 1.4; letter-spacing: 0.2em; text-transform: uppercase; color: var(--hud); text-align: right; }
.pick__head span:first-child { grid-column: 3; }
.pick__row {
  position: relative; grid-template-areas: "box name setup month" ". what setup month";
  align-items: baseline; padding: 14px 12px; border-bottom: 1px solid var(--hud-faint);
  cursor: pointer; transition: background-color 0.15s var(--ease);
}
.pick__row:hover { background: var(--hud-wash); }
.pick__row--core { cursor: default; background: transparent !important; }
.pick__input { position: absolute; left: 12px; top: 17px; width: 22px; height: 22px; margin: 0; opacity: 0; cursor: pointer; }
.pick__box {
  grid-area: box; align-self: start; margin-top: 3px; display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 6px; border: 2px solid #7d95a8; background: var(--hud-bg);
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.pick__box svg { width: 14px; height: 14px; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset 0.22s var(--ease); }
.pick__input:checked + .pick__box, .pick__row--core .pick__box { background: var(--hud); border-color: var(--hud); }
.pick__input:checked + .pick__box svg, .pick__row--core .pick__box svg { stroke-dashoffset: 0; }
.pick__row--core .pick__box { opacity: 0.75; }
.pick__input:focus-visible + .pick__box { outline: 2px solid var(--hud); outline-offset: 3px; }
.pick__row:has(.pick__input:focus-visible) { background: var(--hud-wash); }
.pick__name { grid-area: name; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 1.1rem; font-weight: 600; line-height: 1.35; }
.pick__tag {
  align-self: center; padding: 2px 8px; border: 1px solid var(--hud-soft); border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; line-height: 1.3; letter-spacing: 0.02em; color: var(--hud-text);
}
.pick__what { grid-area: what; margin-top: 2px; font-size: 0.95rem; line-height: 1.45; color: var(--hud-dim); }
.pick__setup { grid-area: setup; }
.pick__month { grid-area: month; }
.fig { margin: 0; text-align: right; font-size: 1.08rem; font-weight: 600; line-height: 1.35; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fig small { font-size: 0.85rem; font-weight: 500; color: var(--hud-dim); }
.fig--word { font-size: 0.95rem; font-weight: 500; color: var(--hud-dim); }
.pick__row:not(.pick__row--core):not(:has(:checked)) .fig { color: var(--hud-dim); font-weight: 500; }
.fig__unit { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.plan__bar { display: none; }

.bill {
  grid-area: bill; position: sticky; top: calc(var(--head-h) + 16px);
  padding: 18px 22px 20px; border: 1px solid rgba(47, 193, 255, 0.55); border-radius: 10px;
  background: #08121e; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.bill__head { display: flex; align-items: baseline; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--hud-soft); }
.bill__title { font-size: 0.75rem; font-weight: 700; line-height: 1.4; letter-spacing: 0.2em; text-transform: uppercase; color: var(--hud); }
.bill__vat { margin-left: auto; font-size: 0.9rem; color: var(--hud-dim); }
.bill__count { font-size: 0.95rem; font-weight: 600; color: var(--hud-text); font-variant-numeric: tabular-nums; }
.bill__lines { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.bill__lines th, .bill__lines td { padding: 7px 0; border-bottom: 1px solid var(--hud-faint); vertical-align: baseline; }
.bill__lines thead th { padding: 10px 0 6px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--hud-dim); text-align: right; }
.bill__lines tbody th { padding-right: 12px; font-variant-numeric: normal; text-align: left; font-size: 0.98rem; font-weight: 500; line-height: 1.35; }
.bill__lines td { width: 8.4rem; text-align: right; font-weight: 600; white-space: nowrap; }
.bill__lines td + td { padding-left: 12px; }
.bill__lines s { margin-right: 6px; font-size: 0.85em; font-weight: 400; color: var(--hud-dim); text-decoration-thickness: 1px; }
.bill__lines small, .bill__word { font-size: 0.85em; font-weight: 500; color: var(--hud-dim); }
.meter { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px 4px; margin-top: 16px; }
.meter i { grid-row: 1; height: 6px; border-radius: 2px; background: var(--hud-steel); transition: background-color 0.2s var(--ease); }
.meter i.is-on { background: var(--hud); }
.meter b { grid-row: 2; padding-left: 6px; border-left: 1px solid var(--hud-soft); font-size: 0.75rem; font-weight: 600; line-height: 1.2; color: var(--hud-dim); white-space: nowrap; }
.bill__hint { margin-top: 12px; font-size: 0.95rem; line-height: 1.5; color: var(--hud-dim); }
.bill__hint b { color: var(--hud-text); font-weight: 600; }
.bill__totals { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hud-soft); }
.bill__sum { display: flex; flex-direction: column; gap: 4px; }
.bill__label { font-size: 0.75rem; font-weight: 700; line-height: 1.4; letter-spacing: 0.2em; text-transform: uppercase; color: var(--hud); }
.bill__sum b { font-family: var(--display); font-size: clamp(2.2rem, 2.9vw, 2.7rem); font-weight: 600; line-height: 1; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; transition: color 0.4s var(--ease); }
.bill__sum b small { font-family: var(--body); font-size: 0.95rem; font-weight: 500; letter-spacing: 0; color: var(--hud-dim); }
.bill.is-bump .bill__sum b { color: var(--hud-bright); transition-duration: 0.05s; }
.bill__plus { font-size: 0.9rem; line-height: 1.4; color: var(--hud-dim); }
.bill__plus:empty { display: none; }
.bill__acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.bill__acts .btn--primary { flex: 1 1 auto; }
html:not(.js) .bill, html:not(.js) .pick__box, html:not(.js) .pick__input, html:not(.js) .plan__note { display: none; }
html:not(.js) .pick__row { grid-template-areas: "name name setup month" "what what setup month"; cursor: default; }

@media (max-width: 1099px) {
  .plan__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "pick" "bill"; }
  .bill { position: static; margin-top: 40px; max-width: 34rem; }
}
@media (max-width: 640px) {
  .pick__head { display: none; }
  .pick__row { grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "box name name" ". what what" ". setup month"; column-gap: 14px; padding: 14px 4px; }
  .pick__input { left: 4px; }
  .fig { margin-top: 6px; text-align: left; font-size: 1rem; white-space: normal; }
  .fig__unit { position: static !important; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal; font-size: 0.88rem; font-weight: 500; color: var(--hud-dim); }
  .pick__row--core .pick__month { grid-column: 3; }
  .js .plan__bar {
    display: flex; justify-content: space-between; gap: 12px; position: sticky; bottom: 0; z-index: 5; max-width: none;
    margin: 0 calc(-1 * var(--gutter)); padding: 12px var(--gutter); background: #08121e; border-top: 1px solid rgba(47, 193, 255, 0.55);
    font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap;
  }
  .plan__bar small { font-size: 0.85rem; font-weight: 500; color: var(--hud-dim); }
  .fig--word, .fig--word .fig__unit { font-size: 0.95rem; }
  html { scroll-padding-bottom: 72px; }
  .bill { padding: 18px 16px 20px; }
  .bill__lines thead th { letter-spacing: 0.08em; }
  .bill__lines td { width: auto; }
  .bill__lines s { display: block; margin: 0; }
}

/* ══ From the first day, and who sets it up (round 13 B2, reshaped in round 26) ═════════
   The promise on the left as plain sentences (two since round 40: "Nothing goes out in your name
   without your yes" is now a house rule, home-chat.css), the people on the right as three small
   faces and one short note. No icon squares, no rules, no stat card (round 20 copy). */
.sure__grid {
  display: grid; grid-template-columns: minmax(0, 36rem) minmax(0, 31rem); justify-content: space-between;
  gap: 44px clamp(48px, 6vw, 112px); align-items: start;
}
.sure h2 { max-width: 12em; }
.sure__lines { margin: 30px 0 0; padding: 0; list-style: none; max-width: 44ch; }
.sure__lines li { margin: 0; font-size: 1.12rem; line-height: 1.5; color: var(--hud-dim); text-wrap: pretty; }
.sure__lines li + li { margin-top: 10px; }
.who { padding-top: 6px; }
.who__h { margin-bottom: 18px; }
.who__faces { display: flex; gap: 16px; margin: 0; padding: 0; list-style: none; }
.who__faces li { display: grid; gap: 8px; margin: 0; }
.who__pic { display: block; width: 152px; aspect-ratio: 1 / 1; border: 1px solid var(--hud-soft); background: var(--hud-shell-far); }
.who__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.who__name { font-size: 0.98rem; font-weight: 600; color: var(--hud-text); }
.who__note { margin: 22px 0 0; max-width: 42ch; font-size: 1.02rem; line-height: 1.55; color: var(--hud-dim); }
@media (max-width: 1100px) { .who__pic { width: 120px; } }
@media (max-width: 900px) { .sure__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; } }
@media (max-width: 480px) { .who__faces { gap: 10px; } .who__pic { width: 92px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .shot__again:not(.is-reveal) { display: none; }
}
