/* Cashflows workshop — visual system. Ink + purple accent, IBM Plex type. */
:root {
  --ink: #161D24;
  --ink-2: #444A4F;
  --bg: #F0ECF8;
  --card: #ffffff;
  --line: #E2DAF1;
  --accent: #7248BD;
  --accent-d: #400080;
  --accent-tint: #F1ECFA;
  --good: #2f9e44;
  --bad: #DA6254;
  --warn: #f08c00;
  --code-bg: #161D24;
  --shadow: 0 1px 3px rgba(22, 29, 36, 0.08), 0 8px 24px rgba(22, 29, 36, 0.06);
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

h1, h2, h3, .display {
  font-family: "Space Grotesk", system-ui, sans-serif;
  letter-spacing: -0.01em;
}

code, pre, .mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }

a { color: var(--accent-d); }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(1200px 600px at 70% -10%, #7248BD1a, transparent),
              linear-gradient(180deg, #fbfdfe, var(--bg));
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  text-align: center;
}
.login-card .logo {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 26px;
}
.login-card .logo .dot { color: var(--accent); }
.login-card p { color: var(--ink-2); margin: 6px 0 22px; }
.login-card input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 12px;
}
.login-card input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.login-card button {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--accent-d);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}
.login-card button:hover { background: var(--accent); }
.login-err { color: var(--bad); min-height: 20px; margin-top: 10px; font-size: 14px; }

/* ---------- reveal.js overrides ---------- */
.reveal { font-size: 26px; }
.reveal .slides { text-align: left; }
/* Every slide is a flex column the full height of the 1280x800 canvas. Short
   slides centre vertically; slides taller than the canvas top-align and scroll.
   Centring is done with auto margins on the first/last child (not justify-content:
   center) so it degrades to top-align on overflow without the unreliable `safe`
   keyword. `display:flex !important` is required: reveal sets an inline
   display:block on the present slide, so without it the visible slide is never a
   flex container and none of this applies (content pins to the top-left). */
.reveal .slides section {
  min-height: 800px; /* = configured Reveal canvas height */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px;
}
.reveal .slides > section.present { display: flex !important; }
.reveal .slides section > :first-child { margin-top: auto; }
.reveal .slides section > :last-child { margin-bottom: auto; }
.reveal h1 { font-size: 2.0em; color: var(--ink); }
.reveal h2 { font-size: 1.3em; color: var(--ink); margin: 0 0 0.3em; }
.reveal h3 { font-size: 1.02em; color: var(--accent-d); margin: 0.3em 0; }
/* section / theme-break dividers */
.reveal section.divider { align-items: flex-start; }
.divider-eyebrow { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.8em;
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent-d); }
.reveal .divider-h { font-size: 2.7em; line-height: 1.04; margin: 0.14em 0 0.2em; color: var(--ink); }
.divider-sub { font-size: 1.05em; color: var(--ink-2); max-width: 32ch; margin: 0; }
.divider-bar { width: 56px; height: 5px; background: var(--accent); border-radius: 3px; margin-top: 0.7em; }
.reveal h2.termprompt { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 1.15em; }
.reveal .termprompt .termdim { color: var(--accent); font-weight: 400; }
.caret { display: inline-block; width: 0.55ch; height: 1.05em; background: var(--accent);
  margin-left: 3px; vertical-align: -0.16em; animation: blink 1.05s step-end infinite; }
@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* ── Slide-entry micro-interactions · same restrained tier as the whoami caret.
   CSS-only, no API; fire on Reveal's .present so they replay on each arrival, not page load. ── */
@keyframes dvUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes dvBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* Section dividers: stagger eyebrow → heading → sub upward, then grow the hero bar from the left. */
.reveal section.divider.present .divider-eyebrow { animation: dvUp .45s ease both; }
.reveal section.divider.present .divider-h { animation: dvUp .45s ease .10s both; }
.reveal section.divider.present .divider-sub { animation: dvUp .45s ease .20s both; }
.reveal section.divider.present .divider-bar { transform-origin: left; animation: dvBar .5s ease .32s both; }
/* Cost worked example: reveal the arithmetic one line at a time so the ×1,000 punchline lands last. */
.calc-line { display: block; }
.reveal section.present .calc-line { animation: dvUp .3s ease both; }
.reveal section.present .calc-line:nth-child(1) { animation-delay: .15s; }
.reveal section.present .calc-line:nth-child(2) { animation-delay: .40s; }
.reveal section.present .calc-line:nth-child(3) { animation-delay: .65s; }
.reveal section.present .calc-line:nth-child(4) { animation-delay: .90s; }
.reveal section.present .calc-line:nth-child(5) { animation-delay: 1.15s; }
/* Cowork 'Try live' snippets read as a shell command to type into Claude Desktop (static, no motion). */
.termcmd::before { content: "\203A\00A0\00A0"; color: var(--accent); font-weight: 600; }
.reveal p, .reveal li { color: #14304a; line-height: 1.3; margin: 0.4em 0; }
.reveal .lead { font-size: 1.08em; color: var(--ink-2); }
.reveal .muted { color: var(--ink-2); }
.reveal ul { margin: 0.3em 0 0.3em 0.5em; }
.reveal li { margin: 0.2em 0; }
.reveal section .kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.5em;
  font-weight: 600;
  color: var(--accent-d);
  font-family: "IBM Plex Mono", monospace;
}
.reveal .pill {
  display: inline-block;
  background: #7248BD1a;
  color: var(--accent-d);
  border-radius: 999px;
  padding: 2px 12px;
  font-size: 0.5em;
  font-family: "IBM Plex Mono", monospace;
}
.reveal .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.reveal .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 13px 16px;
}
.reveal .diagram { text-align: center; }
.reveal .diagram img { max-height: 300px; background: #fff; border-radius: 12px; padding: 8px; }
.reveal .fintech {
  border-left: 4px solid var(--accent);
  background: #7248BD10;
  padding: 8px 14px;
  border-radius: 0 10px 10px 0;
  font-size: 0.8em;
}
.reveal .fintech b { color: var(--accent-d); }
.reveal pre { box-shadow: var(--shadow); width: 100%; }
.reveal pre code { background: var(--code-bg); border-radius: 10px; padding: 14px; font-size: 0.62em; }

/* top bar */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 42px; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  padding: 0 16px; background: var(--ink); color: #fff;
  font-family: "Space Grotesk", sans-serif;
}
.topbar .brand { font-weight: 700; }
.topbar .brand .dot { color: var(--accent); }
.topbar .spacer { flex: 1; }
.topbar a { color: var(--line); text-decoration: none; font-size: 13px; }
.topbar a:hover { color: #fff; }

/* ---------- Widgets ---------- */
.q-widget, [data-widget], [data-board] { font-size: 16px; }
.q-ta, .q-inp {
  width: 100%;
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  resize: vertical;
}
.q-ta:focus, .q-inp:focus { outline: 2px solid var(--accent); border-color: transparent; }
.q-btn {
  margin-top: 10px;
  padding: 9px 18px;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  background: var(--accent-d);
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}
.q-btn:hover { background: var(--accent); }
.q-btn:disabled { opacity: 0.5; cursor: wait; }
/* Prominent outbound link - reads as a button from the back of the room. */
.q-biglink {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 2px;
  padding: 13px 22px;
  font-weight: 700;
  font-size: 19px;
  color: #fff;
  background: var(--accent-d);
  border-radius: 11px;
  text-decoration: none;
}
.reveal .q-biglink { color: #fff; }
.q-biglink:hover { background: var(--accent); }
.q-biglink .q-biglink-url {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  font-size: 0.66em;
  opacity: 0.85;
  word-break: break-all;
}
.q-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 14px; }
.q-range { flex: 1; max-width: 280px; accent-color: var(--accent-d); }
.q-range-val { font-family: "IBM Plex Mono", monospace; font-weight: 600; }
.q-out {
  margin-top: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  min-height: 18px;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}
.q-stream { font-family: "IBM Plex Sans", sans-serif; line-height: 1.45; }
.q-hint { color: var(--ink-2); font-size: 13px; margin-top: 10px; }
.q-note { color: var(--ink-2); font-size: 12px; margin-top: 8px; font-style: italic; }
.q-err { color: var(--bad); font-weight: 600; }
.temp-name { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.95em;
  padding: 4px 8px; border-left: 3px solid var(--accent); margin-bottom: 4px;
  background: rgba(114,72,189,0.06); border-radius: 0 4px 4px 0; }

/* example chips */
.q-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.q-chips-l { font-size: 0.78em; color: var(--ink-2); margin-right: 2px; }
.q-chip { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.78em;
  padding: 4px 9px; border: 1px solid var(--line); border-radius: 14px; background: #fff;
  color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; }
.q-chip:hover { border-color: var(--accent); background: rgba(114,72,189,0.07); }

/* prompt-injection worked example — interactive: send to Haiku, then highlight the hidden footer */
.injw { display: flex; flex-direction: column; gap: 12px; margin: 8px 0; }
.injw-stage { display: flex; gap: 14px; align-items: stretch; flex-wrap: wrap; }
.injw-mail { flex: 1 1 320px; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: #fff; font-size: 0.78em; max-height: 300px; overflow-y: auto; }
.injw-mail-h { font-family: "IBM Plex Mono", monospace; font-size: 0.78em; color: var(--ink-2); border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 8px; position: sticky; top: 0; background: #fff; }
.injw-mail p { margin: 6px 0; }
.injw-inj { margin: 6px 0; }
.injw-foot { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #e5e7eb; min-height: 2.6em; }
/* The injection: white-on-white, invisible to the eye but fully selectable. Drag to highlight, or hit "Reveal". */
.injw-secret { color: #fff; line-height: 1.4; cursor: text; transition: color .2s, background .2s; white-space: pre-wrap; font-family: "IBM Plex Mono", monospace; font-size: 0.82em; }
.injw-secret.shown { color: var(--bad); background: #fff3f0; }
.injw-right { flex: 1 1 300px; display: flex; flex-direction: column; gap: 8px; }
.q-btn.ghost { background: transparent; color: var(--bad); border: 1px solid var(--bad); }
.injw-respwrap { display: none; flex-direction: column; gap: 4px; }
.injw-respwrap.on { display: flex; }
.injw-lbl { font-size: 0.74em; color: var(--ink-2); font-family: "IBM Plex Mono", monospace; }
.injw-resp { background: #0d1117; color: #e6edf3; border-radius: 8px; padding: 10px 12px; font-size: 0.82em; line-height: 1.5; white-space: pre-wrap; min-height: 3em; max-height: 230px; overflow: auto; }
.injw-reveal { display: none; gap: 12px; flex-wrap: wrap; }
.injw-reveal.on { display: flex; animation: injFade .5s ease both; }
.injw-reveal .card { flex: 1 1 280px; }
.injw-hl { font-size: 0.9em; }
@keyframes injFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* pipeline flow diagram */
.flow { margin: 8px 0 4px; }
.fl-stages { display: flex; align-items: stretch; gap: 5px; }
.fl-stage { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.fl-stage.fl-md { flex: 0 0 74px; }
.fl-stage.fl-nm { flex: 0 0 auto; } /* hug the vectors so no gap before the LLM */
.fl-stage.fl-nm .fl-cap { text-align: center; }
.fl-cap { font-size: 0.62em; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; min-height: 1em; white-space: nowrap; }
.fl-arrow { align-self: center; color: var(--ink-2); font-size: 1.15em; padding: 18px 0 0; }
.fl-sent { border: 1px solid var(--line); border-radius: 8px; padding: 8px; min-height: 96px; font-size: 0.8em; background: #fff; line-height: 1.5; }
.fl-w.hot { background: rgba(114,72,189,.20); border-radius: 3px; }
.fl-tok { display: flex; flex-wrap: wrap; gap: 4px; align-content: flex-start; min-height: 96px; }
.fl-chip { font-family: "IBM Plex Mono", monospace; font-size: 0.7em; padding: 2px 6px; background: var(--accent-tint);
  border: 1px solid var(--line); border-radius: 4px; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; height: fit-content; }
.fl-chip.in { opacity: 1; transform: none; }
.fl-ell { color: var(--ink-2); align-self: center; }
.fl-vec { display: flex; gap: 6px; min-height: 96px; }
.fl-col { display: flex; flex-direction: column; gap: 2px; align-items: center; opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s; }
.fl-col.in { opacity: 1; transform: none; }
.fl-col-l { font-size: 0.58em; color: var(--ink-2); font-family: "IBM Plex Mono", monospace; }
.fl-cell { width: 26px; height: 15px; display: flex; align-items: center; justify-content: center; font-size: 0.58em; font-family: "IBM Plex Mono", monospace; border-radius: 3px; color: #fff; }
.fl-cell.p { background: #400080; } .fl-cell.n { background: #DA6254; } .fl-cell.z { background: #adb5bd; }
.fl-llm { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 96px; border-radius: 10px;
  font-weight: 700; letter-spacing: .04em; color: #fff; background: linear-gradient(160deg, #3b5bdb, #400080); transition: transform .2s, box-shadow .2s; }
.fl-llm.on { transform: scale(1.05); box-shadow: 0 0 0 4px rgba(114,72,189,.25); }
.fl-llm-s { font-size: 0.62em; font-weight: 600; opacity: .85; letter-spacing: .06em; }
.fl-role { font-family: "IBM Plex Mono", monospace; font-size: 0.82em; color: var(--accent-d); font-weight: 600; }
.fl-role.asst { color: #DA6254; }
.fl-caret { display: inline-block; width: 0.5ch; color: var(--accent-d); animation: flBlink 1s steps(1) infinite; }
@keyframes flBlink { 50% { opacity: 0; } }
.fl-out { display: flex; flex-direction: column; gap: 3px; min-height: 96px; justify-content: center; }
.fl-orow { display: flex; align-items: center; gap: 5px; font-size: 0.68em; }
.fl-orow.pick .fl-ow { font-weight: 700; color: var(--accent-d); }
.fl-ow { flex: 0 0 50px; font-family: "IBM Plex Mono", monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-btrack { flex: 1; height: 9px; background: var(--line); border-radius: 5px; overflow: hidden; }
.fl-bar { height: 100%; width: 0; background: #adb5bd; transition: width .5s ease; }
.fl-orow.pick .fl-bar { background: var(--accent); }
.fl-op { flex: 0 0 28px; text-align: right; font-size: 0.9em; color: var(--ink-2); font-family: "IBM Plex Mono", monospace; }
.fl-loop { margin-top: 9px; text-align: center; font-size: 0.78em; color: var(--accent-d); }

/* context widget — quality/compaction meter rows (the bar UI below the chat). */
.ctx-row { display: flex; align-items: center; gap: 9px; }
.ctx-k { flex: 0 0 100px; color: var(--ink-2); font-size: 0.85em; }
.ctx-q { font-weight: 600; } .ctx-q.good { color: var(--good); } .ctx-q.warn { color: var(--warn); } .ctx-q.bad { color: var(--bad); }
.ctx-status { font-size: 0.78em; color: var(--ink-2); min-height: 1.4em; font-family: "IBM Plex Mono", monospace; }
/* Context — chat-bubble illustration: the whole conversation re-read by the GPU each turn */
.cbx { display: flex; flex-direction: column; align-items: center; gap: 11px; margin: 10px auto 6px; }
.cbx-cap { font-size: 0.72em; color: var(--ink-2); font-family: "IBM Plex Mono", monospace; }
.cbx-stage { position: relative; display: flex; align-items: center; justify-content: center; gap: 32px; }
.cbx-ctxcol { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cbx-barlbl { font-size: 0.6em; color: var(--ink-2); font-family: "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: .6px; }
.cbx-bar { width: 34px; height: 200px; background: var(--line); border-radius: 9px; position: relative; overflow: hidden; }
.cbx-barfill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--accent-d); transition: height .45s ease, background .3s ease; }
.cbx-barfill.warm { background: #f59f00; }
.cbx-barfill.hot { background: var(--bad); }
.cbx-bartok { font-size: 0.58em; color: var(--ink-2); font-family: "IBM Plex Mono", monospace; }
.cbx-packet { position: absolute; top: 0; left: 0; padding: 4px 9px; border-radius: 7px; background: var(--accent-d); color: #fff; font-size: 0.58em; font-family: "IBM Plex Mono", monospace; white-space: nowrap; box-shadow: 0 3px 10px rgba(0, 0, 0, .2); opacity: 0; transition: left .55s cubic-bezier(.45, 0, .2, 1), opacity .25s ease; pointer-events: none; z-index: 6; }
.cbx-packet.on { opacity: 1; }
.cbx-packet.snap { transition: none; }
.cbx-out { position: absolute; top: 0; left: 0; padding: 6px 11px; border-radius: 15px; border-bottom-left-radius: 4px; background: #e4e6eb; color: var(--ink); font-size: 0.74em; white-space: nowrap; box-shadow: 0 3px 10px rgba(0, 0, 0, .18); opacity: 0; transition: left .58s cubic-bezier(.45, 0, .2, 1), opacity .25s ease; pointer-events: none; z-index: 6; }
.cbx-out.on { opacity: 1; }
.cbx-out.snap { transition: none; }
.cbx-chat { width: 300px; height: 232px; overflow: hidden; border: 2px solid var(--line); border-radius: 16px;
  background: #f6f7f9; padding: 10px; display: flex; flex-direction: column; gap: 6px;
  transition: box-shadow .2s ease, border-color .2s ease; }
.cbx-banner { align-self: stretch; text-align: center; color: #fff; font-size: 0.66em; padding: 3px 6px;
  border-radius: 6px; font-family: "IBM Plex Mono", monospace; flex: none; }
.cbx-sys { background: #3b5bdb; } .cbx-tool { background: #400080; }
.cbx-b { display: flex; flex: none; }
.cbx-me { justify-content: flex-end; } .cbx-them { justify-content: flex-start; }
.cbx-bub { max-width: 78%; padding: 6px 10px; border-radius: 15px; font-size: 0.74em; line-height: 1.25; }
.cbx-me .cbx-bub { background: #2563eb; color: #fff; border-bottom-right-radius: 4px; }
.cbx-them .cbx-bub { background: #e4e6eb; color: var(--ink); border-bottom-left-radius: 4px; }
.cbx-sum { align-self: center; color: #fff; font-size: 0.64em; padding: 4px 9px; border-radius: 10px; text-align: center; flex: none;
  background: repeating-linear-gradient(45deg, #f59f00, #f59f00 6px, #DA6254 6px, #DA6254 12px); }
.cbx-bub.fresh { animation: cbxPop .6s ease; }
@keyframes cbxPop { 0% { box-shadow: 0 0 0 3px rgba(64, 0, 128, .4); } 100% { box-shadow: 0 0 0 0 rgba(64, 0, 128, 0); } }
.cbx-gpu { width: 86px; height: 86px; border-radius: 16px; background: var(--ink); color: #fff; flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease; }
.cbx-gpu.hot { background: var(--accent-d); transform: scale(1.06); box-shadow: 0 0 0 4px rgba(64, 0, 128, .22); }
.cbx-gpu-l { font-weight: 700; font-size: 0.95em; } .cbx-gpu-s { font-size: 0.62em; opacity: .8; }
.cbx-meter { width: 100%; max-width: 470px; display: flex; flex-direction: column; gap: 10px; }
.cbx-note { max-width: 580px; text-align: center; font-size: 0.7em; color: var(--ink-2); font-style: italic; line-height: 1.4; }

/* Slide 10 - the whole loop: your device <-> internet/API <-> a GPU with the weights.
   Step-built diagram (buildLoop). Reuses .cbx-gpu / .cbx-packet / .cbx-out and the .fl-* chips/bars. */
.lp { display: flex; flex-direction: column; gap: 12px; margin: 6px 0; }
.lp-status { font-size: 0.82em; color: var(--ink-2); font-family: "IBM Plex Mono", monospace; min-height: 1.4em; text-align: center; }
.lp-stage { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 188px; }
.lp-zone { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 0 0 auto; }
.lp-zl { font-size: 0.62em; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-family: "IBM Plex Mono", monospace; }
.lp-you { flex: 0 0 300px; }
.lp-chat { width: 280px; min-height: 116px; border: 2px solid var(--line); border-radius: 14px; background: #f6f7f9; padding: 10px; display: flex; flex-direction: column; gap: 7px; }
.lp-b { display: flex; } .lp-me { justify-content: flex-end; } .lp-them { justify-content: flex-start; }
.lp-bub { max-width: 82%; padding: 7px 11px; border-radius: 14px; font-size: 0.8em; line-height: 1.3; }
.lp-me .lp-bub { background: #2563eb; color: #fff; border-bottom-right-radius: 4px; transition: box-shadow .2s ease; }
.lp-me .lp-bub.hot { box-shadow: 0 0 0 3px rgba(114, 72, 189, .35); }
.lp-them .lp-bub { background: #e4e6eb; color: var(--ink); border-bottom-left-radius: 4px; }
.lp-bub.fresh { animation: injFade .45s ease both; }
.lp-wire { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 120px; }
.lp-wire-line { width: 100%; height: 0; border-top: 2px dashed #b9c6d2; transition: border-color .25s ease; }
.lp-wire.lit .lp-wire-line { border-top-color: var(--accent); }
.lp-wire-l { font-size: 0.6em; color: var(--ink-2); font-family: "IBM Plex Mono", monospace; text-align: center; transition: color .25s ease; }
.lp-wire.lit .lp-wire-l { color: var(--accent-d); }
.lp-weights { font-size: 0.56em; font-family: "IBM Plex Mono", monospace; color: var(--accent-d); background: #7248BD14; border: 1px solid #7248BD4d; border-radius: 999px; padding: 2px 9px; }
.lp-rank { width: 170px; display: flex; flex-direction: column; gap: 3px; }
.lp-ctx { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; justify-content: center; min-height: 28px; }
.lp-ctx-l { font-size: 0.66em; color: var(--ink-2); font-family: "IBM Plex Mono", monospace; }
.lp-ctx-x { color: var(--ink-2); }
.lp-toks, .lp-nums { display: flex; gap: 4px; flex-wrap: wrap; }
.lp-packet, .lp-out { transition: left .55s cubic-bezier(.45, 0, .2, 1), top .55s cubic-bezier(.45, 0, .2, 1), opacity .25s ease; }
.lp-punch { background: linear-gradient(160deg, #fff, var(--accent-tint)); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; padding: 9px 14px; font-size: 0.82em; line-height: 1.4; color: var(--ink); }
.lp-loop { margin-top: 5px; color: var(--accent-d); font-family: "IBM Plex Mono", monospace; font-size: 0.92em; }
.lp-ctrls { display: flex; gap: 8px; }
.lp-ctrls .q-btn { margin-top: 0; }
/* staged reveals - parts appear one Step at a time */
.lp-server, .lp-weights, .lp-rank, .lp-ctx, .lp-punch { opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease; }
.lp-server.in, .lp-weights.in, .lp-rank.in, .lp-ctx.in, .lp-punch.in { opacity: 1; transform: none; }
/* RCCF colour coding — Role / Context / Command / Format, consistent across legend, example & structured prompt */
.rc-role { color: #3b5bdb; font-weight: 600; } .rc-ctx { color: #400080; font-weight: 600; }
.rc-cmd { color: #DA6254; font-weight: 600; } .rc-fmt { color: #7048e8; font-weight: 600; }
.rc-prompt { font-family: "IBM Plex Mono", monospace; font-size: 0.82em; line-height: 1.7; background: #fafcfd;
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; }
.rc-line { display: block; }
.rc-tag { display: inline-block; font-size: 0.7em; font-weight: 700; padding: 1px 6px; border-radius: 5px; color: #fff;
  margin-right: 7px; vertical-align: 1px; font-family: "IBM Plex Mono", monospace; }
.rc-tag.role { background: #3b5bdb; } .rc-tag.ctx { background: #400080; }
.rc-tag.cmd { background: #DA6254; } .rc-tag.fmt { background: #7048e8; }
.chain { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin: 12px 0; font-family: "IBM Plex Mono", monospace; font-size: 0.82em; }
.chain-c { background: #eef2f7; border: 1px solid var(--line); border-radius: 14px; padding: 3px 11px; }
.chain-c.imp { background: var(--accent-tint); border-color: var(--accent-d); color: var(--accent-d); font-weight: 600; }
.chain-c.act { background: #fff3e8; border-color: #DA6254; color: #c2410c; font-weight: 600; }
.chain-x { color: var(--ink-2); }
.rt-out { margin-top: 10px; max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.rt-turn { font-size: 0.84em; line-height: 1.4; background: #f6f7f9; border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; }
.rt-who { font-weight: 700; color: var(--accent-d); }
.rt-chair { background: var(--accent-tint); border-color: var(--accent-d); }
.rt-chair .rt-who { color: var(--ink); }
.rag-table { border-collapse: collapse; width: 100%; font-size: 0.78em; }
.rag-table th, .rag-table td { border: 1px solid var(--line); padding: 5px 9px; text-align: left; }
.rag-table th { background: var(--accent-tint); color: var(--ink); }
.rag-r { background: #ffe3e0; color: #b42318; font-weight: 600; }
.rag-y { background: #fff4d6; color: #9a6a00; font-weight: 600; }
.rag-g { background: #def7ec; color: #1f7a4d; font-weight: 600; }
.q-stat { font-size: 18px; }
.q-stat b { color: var(--accent-d); }

.q-chips { margin-top: 10px; line-height: 2; }
.q-chip { border-radius: 5px; padding: 1px 4px; margin: 0 1px; font-family: "IBM Plex Mono", monospace; font-size: 13px; }
.q-chip.c0 { background: #d0ebff; } .q-chip.c1 { background: #d3f9d8; }
.q-chip.c2 { background: #ffec99; } .q-chip.c3 { background: #ffd8a8; }
.q-chip.c4 { background: #eebefa; }

.q-bar-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.q-bar-label { width: 90px; text-align: right; font-family: "IBM Plex Mono", monospace; font-size: 13px; }
.q-bar { height: 16px; background: var(--accent); border-radius: 4px; min-width: 2px; }
.q-bar-ct { font-size: 12px; color: var(--ink-2); }

.predict-text { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 16px; min-height: 28px; line-height: 1.5; }
.predict-cand { cursor: pointer; border-radius: 6px; padding: 2px 4px; }
.predict-cand:hover { background: #7248BD18; }
.q-btn-2 { background: #fff; color: var(--accent-d); border: 1px solid var(--accent-d); }
.q-btn-2:hover { background: #7248BD14; }

.persona-pick { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 0; font-size: 14px; }
.persona-opt { cursor: pointer; user-select: none; }
.persona-opt[title] { border-bottom: 1px dotted var(--ink-2); }
.persona-opt.must { color: var(--accent-d); font-weight: 600; }
.rt-turns { width: 56px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; font-family: "IBM Plex Mono", monospace; }
.rt-turns-l { color: var(--ink-2); font-size: 0.92em; }
.persona-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.persona-grid .q-card-h { font-size: 14px; margin-bottom: 6px; }
.persona-grid .q-stream { font-size: 13.5px; }

.anim-box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.anim-text { font-size: 20px; line-height: 1.5; min-height: 62px; }
.anim-new { background: #7248BD26; border-radius: 4px; padding: 0 3px; }
.anim-cands { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; min-height: 28px; }
.anim-cand { font-family: "IBM Plex Mono", monospace; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; color: var(--ink-2); transition: all 0.25s; }
.anim-cand.win { background: var(--accent); color: #fff; border-color: var(--accent); }
.anim-cand.fade { opacity: 0.25; }

.q-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.q-col-h { font-weight: 600; font-size: 13px; margin: 8px 0 4px; }
.q-col-h.q-bad { color: var(--bad); } .q-col-h.q-good { color: var(--good); }

.q-think {
  background: #f1f3f5; border: 1px dashed #ced4da; border-radius: 10px;
  padding: 10px 12px; font-family: "IBM Plex Mono", monospace; font-size: 12.5px;
  color: #495057; white-space: pre-wrap; max-height: 200px; overflow: auto;
}
.q-think-h { font-weight: 600; font-size: 12px; color: var(--ink-2); margin: 6px 0 3px; }

.q-tool { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.q-card { border-radius: 10px; padding: 10px 12px; border: 1px solid var(--line); }
.q-card-h { font-weight: 600; font-size: 13px; margin-bottom: 3px; }
.q-card-b { font-family: "IBM Plex Mono", monospace; font-size: 13px; white-space: pre-wrap; }
.q-card.k-a { background: #fff; }
.q-card.k-u { background: #fff4e6; border-color: #ffd8a8; }
.q-card.k-r { background: #ebfbee; border-color: #b2f2bb; }

.q-matrix-wrap { overflow-x: auto; }
.q-matrix { border-collapse: collapse; font-size: 12px; }
.q-matrix th, .q-matrix td { border: 1px solid #fff; padding: 6px 8px; text-align: center; }
.q-matrix th { background: #f1f3f5; color: var(--ink-2); }
.q-matrix .q-matrix-lab { font-family: "IBM Plex Mono", monospace; }
.q-docs { margin: 4px 0 8px; display: flex; flex-direction: column; gap: 3px; }
.q-doc { background: #f8f9fa; border: 1px solid var(--line); border-radius: 8px; padding: 3px 9px; font-size: 12px; }

/* ---------- Board ---------- */
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.board-col {
  background: #eef2f6; border: 1px solid var(--line); border-radius: 14px;
  padding: 12px; display: flex; flex-direction: column; min-height: 320px;
}
.board-col.drop { outline: 2px dashed var(--accent); background: var(--accent-tint); }
.board-col-h { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 16px; margin-bottom: 10px; }
.board-list { flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 60px; }
.note {
  position: relative; border-radius: 8px; padding: 12px 28px 10px 12px;
  box-shadow: 0 2px 6px rgba(22, 29, 36, 0.14); font-size: 14px; cursor: grab;
  transform: rotate(-0.6deg);
}
.note:nth-child(even) { transform: rotate(0.7deg); }
.note.dragging { opacity: 0.4; }
.note-body { white-space: pre-wrap; word-break: break-word; }
.note-meta { margin-top: 6px; font-size: 12px; color: #5c5c5c; font-style: italic; }
.note-del {
  position: absolute; top: 4px; right: 6px; border: 0; background: transparent;
  font-size: 18px; line-height: 1; cursor: pointer; color: #00000066;
}
.note-del:hover { color: #000; }
.board-add { margin-top: 10px; }
.board-add-ta { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px; font-size: 13px; resize: vertical; }
.board-add-row { display: flex; gap: 6px; margin-top: 6px; }
.board-add-name { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 12px; }
.board-add-btn { margin-top: 0; padding: 6px 14px; font-size: 13px; }
