/* =====================================================================================================================
   CAPITAL.COM AI (prefix cp): his conversation (tools/capital/src/greetings.png, ai-chat.png), the proofs of concept in
   the same grammar, and the design system chapter. Sizes in --u (one point of his 375 pt screen), measured from his
   export: screen #10101C, bubble #443A38, cards #1E1E29 16pt apart, 16pt edges, card titles 18 Medium, orb 40pt.
   Sources: tools/builder/kits/capital_ai.py, capital_ds.py; motion: assets/js/capital-ai.js; notes: tools/capital/AI-UI.md.
   ===================================================================================================================== */

/* ---------- the greeting: his ground, his warm light, his greeting in SF Light */
.cp-greet, .cp-hello-l { position: absolute; inset: 0; background: radial-gradient(80% 60% at 50% 52%, #2C2731 0%, #1E1D2B 70%); }
.cp-hello { position: absolute; left: 0; right: 0; top: 25%; text-align: center; font-family: -apple-system, 'SF Pro Display', 'InterVariable', 'Inter', system-ui, sans-serif;
  font-size: calc(var(--a-title-l) * var(--u)); line-height: 1.25; letter-spacing: -0.01em; color: #F4D9B4; font-weight: 300; }
.cp-orb { display: block; }
.cp-greet .cp-orb { position: absolute; left: 50%; top: 52%; width: 120%; aspect-ratio: 1; transform: translate(-50%, -50%); }
/* his gold question: one orb for the whole conversation, drawn on a canvas the size of the screen. It greets at the
   centre, gathers into light where it is when the question is sent, and is born again at its place in the chat (the
   row's slot). The choreography, shot by shot: tools/capital/AI-MOTION.md */
.cp-orb-fly { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 6; pointer-events: none; }
.cp-hello span { display: block; will-change: transform, filter; }
/* the hero's first paint: the greeting's lines rise in by CSS in reading order, so there is never a blank or a flash
   before the script; the script lifts them away later (tools/capital/AI-MOTION.md, the hero) */
.cp-hero-phone .cp-hello span { animation: cp-line-in 0.8s cubic-bezier(.16, 1, .3, 1) 0.15s both; }
.cp-hero-phone .cp-hello span + span { animation-delay: 0.27s; }
@keyframes cp-line-in { from { opacity: 0; transform: translateY(calc(10 * var(--u))); filter: blur(6px); } }
@media (prefers-reduced-motion: reduce) { .cp-hero-phone .cp-hello span { animation: none; } }

/* ---------- the chat chrome (one grammar for every AI screen) */
.cp-ai { position: absolute; inset: 0; background: #10101C; --up: #00AAFE; }
.cp-ai .cp-up { color: #00AAFE; }
.cp-ai-top { position: absolute; inset: 0 0 auto; height: calc(240 * var(--u)); pointer-events: none;
  background: radial-gradient(70% 90% at 88% -8%, rgba(150, 122, 100, 0.9), rgba(110, 86, 76, 0.45) 45%, transparent 78%),
              radial-gradient(80% 80% at 20% -20%, rgba(112, 72, 64, 0.75), transparent 70%); }
.cp-ai-head { position: absolute; top: calc(66 * var(--u)); left: calc(20 * var(--u)); z-index: 2; }
.cp-ai-head .cp-ava { display: block; width: calc(40 * var(--u)); height: calc(40 * var(--u)); }
/* the thread starts fully clear of its top fade (the first bubble sits at his 130pt); only a conversation that has
   grown passes under it, and it scrolls to a block's top edge, so nothing ever rests half hidden (Arash) */
.cp-thread { position: absolute; left: 0; right: 0; top: calc(104 * var(--u)); bottom: calc(150 * var(--u)); overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent calc(4 * var(--u)), #000 calc(22 * var(--u)), #000 calc(100% - 14 * var(--u)), transparent);
          mask-image: linear-gradient(to bottom, transparent calc(4 * var(--u)), #000 calc(22 * var(--u)), #000 calc(100% - 14 * var(--u)), transparent); }
.cp-thread-in { display: flex; flex-direction: column; gap: calc(16 * var(--u)); padding: calc(26 * var(--u)) calc(16 * var(--u)) calc(8 * var(--u)); will-change: transform; }
/* his gold answer rests on one screen: the move, its two reasons and the trade (a compact line under the price) */
.cp-ask .cp-pc .cp-ch { margin-top: calc(4 * var(--u)); } .cp-ask .cp-pc .cp-ch-plot { height: calc(54 * var(--u)); }
.cp-ask .cp-orb-row { margin-top: calc(4 * var(--u)); }
.cp-thread-in > [hidden] { display: none !important; }

/* the question: his warm bubble */
.cp-q { position: relative; padding: calc(14 * var(--u)); border-radius: calc(22 * var(--u)); background: #443A38; white-space: nowrap; overflow: hidden; font-size: calc(var(--a-callout) * var(--u)); line-height: 1.3; color: #fff; transform-origin: 50% 100%; }

/* the question while it is born from the input field: the field's own box, morphing into the bubble's */
.cp-q-fly { position: absolute; z-index: 8; margin: 0; display: flex; align-items: center; box-sizing: border-box; pointer-events: none; }
.cp-q-fly span { display: block; }
/* the home's AI search bar while it lifts into the assistant's input (where it lives): his bar, flown as one box */
.cp-search-fly { position: absolute; z-index: 10; box-sizing: border-box; overflow: hidden; pointer-events: none; }
.cp-search-fly::before, .cp-search-fly::after { opacity: var(--ai, 1); }
.cp-search-fly .cp-sr-i { display: block; flex: none; overflow: hidden; }
.cp-search-fly .cp-sr-ph { position: absolute; left: calc(18 * var(--u)); top: 50%; transform: translateY(-50%); font-size: calc(var(--a-callout) * var(--u)); color: rgba(255, 255, 255, 0.42); }
.cp-search-fly .cp-sr-send { position: absolute; right: calc(6 * var(--u)); top: 50%; margin-top: calc(-19 * var(--u)); }

/* the orb row: his 40pt orb on the right; thinking out loud on its left */
.cp-orb-row { display: flex; align-items: center; justify-content: flex-end; gap: calc(10 * var(--u)); height: calc(44 * var(--u)); margin: calc(8 * var(--u)) 0 0; }
.cp-orb.cp-orb-sm { width: calc(44 * var(--u)); height: calc(44 * var(--u)); margin-right: calc(-2 * var(--u)); flex: none; }
.cp-think { display: none; font-size: calc(var(--a-subhead) * var(--u)); font-weight: 500; color: transparent; white-space: nowrap;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.38) 30%, #FFF4E4 50%, rgba(255, 255, 255, 0.38) 70%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text;
  animation: cp-shim 1.8s cubic-bezier(.4, 0, .6, 1) infinite; }
@keyframes cp-shim { from { background-position: 125% 0; } to { background-position: -125% 0; } }
.cp-thought { display: flex; align-items: center; gap: calc(3 * var(--u)); font-size: calc(var(--a-footnote) * var(--u)); color: rgba(255, 255, 255, 0.46); white-space: nowrap; }
.cp-thought svg { width: calc(12 * var(--u)); height: calc(12 * var(--u)); fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cp-orb-row.thinking .cp-think { display: block; } .cp-orb-row.thinking .cp-thought { display: none; }
/* the steps it reads: a timeline hanging from the orb. Each tick sits on the orb's centre line (the orb's slot is 44pt
   wide, 2pt past the content edge, so its centre is 20pt in), and each hairline joins the node above (the orb, or the
   tick before) to its own tick, ending 2pt short of both. It turns gold as each step is done; it retracts into the orb
   once the answer starts. Rows are 32pt, so the links are 13pt (6.5pt from the orb). */
.cp-thread-in .cp-reason { display: none; list-style: none; margin: calc(-16 * var(--u)) 0 0; padding: 0; }
.cp-thread-in .cp-reason.open { display: grid; }
.cp-reason li { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: calc(10 * var(--u)); height: calc(32 * var(--u));
  padding-right: calc(12.5 * var(--u)); font-size: calc(var(--a-footnote) * var(--u)); color: rgba(255, 255, 255, 0.58); }
.cp-reason li.done { color: rgba(255, 255, 255, 0.82); }
.cp-link { position: absolute; right: calc(20 * var(--u) - 0.75px); width: 1.5px; top: calc(-6.5 * var(--u)); height: calc(13 * var(--u)); border-radius: 1px;
  background: rgba(255, 255, 255, 0.16); transform-origin: 50% 0; }
.cp-reason li:first-child .cp-link { top: 0; height: calc(6.5 * var(--u)); }
.cp-reason li.done .cp-link { background: #F2C38C; }
.cp-tick { position: relative; width: calc(15 * var(--u)); height: calc(15 * var(--u)); border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.18); }
.cp-tick::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid transparent; border-top-color: #F2C38C; animation: cp-spin 0.8s linear infinite; }
.cp-tick::after { content: ""; position: absolute; left: 32%; top: 22%; width: 26%; height: 44%; border: solid #10101C; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg) scale(0); transition: transform 0.35s cubic-bezier(.34, 1.56, .64, 1) 0.05s; }
.done .cp-tick { background: #F2C38C; box-shadow: none; transition: background 0.2s; } .done .cp-tick::before { display: none; } .done .cp-tick::after { transform: rotate(45deg) scale(1); }
@keyframes cp-spin { to { transform: rotate(360deg); } }

/* the answer cards: his card, his type */
.cp-a { position: relative; display: grid; gap: calc(8 * var(--u)); padding: calc(16 * var(--u)) calc(14 * var(--u)); border-radius: calc(18 * var(--u)); background: #1E1E29; color: #fff; }
.cp-a > b { font-size: calc(var(--a-body) * var(--u)); font-weight: 500; line-height: 1.25; letter-spacing: -0.005em; }
.cp-a > p { font-size: calc(var(--a-subhead) * var(--u)); line-height: 1.42; color: rgba(255, 255, 255, 0.66); }
.cp-w { transition: none; }
.cp-cite { display: inline-grid; place-items: center; min-width: calc(16 * var(--u)); height: calc(16 * var(--u)); margin-left: calc(4 * var(--u)); padding: 0 calc(3 * var(--u)); border-radius: 99px;
  background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.8); font-size: calc(var(--a-caption) * var(--u)); font-weight: 600; vertical-align: calc(2 * var(--u)); line-height: 1; }
.cp-cite + .cp-cite { margin-left: calc(3 * var(--u)); }

/* the price card: the move first, as a number and a line */
.cp-pc { gap: calc(4 * var(--u)); }
.cp-pc-lead { font-size: calc(var(--a-callout) * var(--u)) !important; color: #fff !important; line-height: 1.35 !important; }
.cp-pc-px { display: flex; align-items: center; gap: calc(8 * var(--u)); margin-top: calc(2 * var(--u)) !important; }
.cp-pc-px > b { font-size: calc(var(--a-title-xl) * var(--u)); font-weight: 600; color: #fff; letter-spacing: -0.015em; }
.cp-pc-px .cp-mk { width: calc(28 * var(--u)); height: calc(28 * var(--u)); }
.cp-chg { font-style: normal; font-size: calc(var(--a-footnote) * var(--u)); font-weight: 600; padding: calc(3 * var(--u)) calc(8 * var(--u)); border-radius: 99px; }
.cp-chg.up { color: #00AAFE; background: rgba(0, 170, 254, 0.14); } .cp-chg.dn { color: #FF6B74; background: rgba(235, 67, 78, 0.16); }
/* a line that draws: line and area under one clip, a dotted reference, a live end dot */
.cp-ch { margin-top: calc(8 * var(--u)); }
.cp-ch-plot { position: relative; height: calc(72 * var(--u)); }
.cp-ch-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cp-ch-line { fill: none; stroke: var(--c); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.cp-ch-ref { stroke: rgba(255, 255, 255, 0.3); stroke-width: 1; stroke-dasharray: 2 4; }
.cp-ch-reft { position: absolute; right: 0; transform: translateY(calc(-100% - 3 * var(--u))); font-size: calc(var(--a-caption) * var(--u)); color: rgba(255, 255, 255, 0.42); }
.cp-ch-dot { position: absolute; right: 0; width: calc(8 * var(--u)); height: calc(8 * var(--u)); margin: calc(-4 * var(--u)) calc(-4 * var(--u)) 0 0; border-radius: 50%; background: var(--c);
  box-shadow: 0 0 0 calc(2.5 * var(--u)) #1E1E29; }
.cp-ch-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--c); animation: cp-ping 2.4s cubic-bezier(.2, .7, .3, 1) infinite; }
@keyframes cp-ping { 0% { transform: scale(1); opacity: 0.55; } 70%, 100% { transform: scale(3.2); opacity: 0; } }
.cp-ch-x { display: flex; justify-content: space-between; margin-top: calc(6 * var(--u)) !important; font-size: calc(var(--a-caption) * var(--u)); color: rgba(255, 255, 255, 0.4); }
/* an event on the line: a pin with its time */
.cp-ch-mk { position: absolute; z-index: 1; transform: translate(-50%, calc(-100% - 12 * var(--u))); padding: calc(2 * var(--u)) calc(7 * var(--u)); border-radius: 99px; background: #fff; color: #10101C;
  font-size: calc(var(--a-caption) * var(--u)); font-weight: 600; white-space: nowrap; }
.cp-ch-mk::after { content: ""; position: absolute; left: 50%; top: calc(100% + 1 * var(--u)); width: 1px; height: calc(8 * var(--u)); background: rgba(255, 255, 255, 0.6); }
.cp-pc .cp-ch-mk { transform: translate(-50%, calc(14 * var(--u))); } .cp-pc .cp-ch-mk::after { top: auto; bottom: calc(100% + 1 * var(--u)); }

/* sources, the action, the next questions */
.cp-srcs { display: flex; align-items: center; gap: calc(8 * var(--u)); margin-top: calc(-4 * var(--u)); }
.cp-srcs > p { font-size: calc(var(--a-caption) * var(--u)); color: rgba(255, 255, 255, 0.42); }
.cp-srcs > div { display: flex; gap: calc(6 * var(--u)); min-width: 0; overflow: hidden; }
.cp-srcs span { display: flex; align-items: center; gap: calc(5 * var(--u)); flex: none; padding: calc(4 * var(--u)) calc(9 * var(--u)) calc(4 * var(--u)) calc(4 * var(--u)); border-radius: 99px; background: rgba(255, 255, 255, 0.06); font-size: calc(var(--a-caption) * var(--u)); color: rgba(255, 255, 255, 0.78); }
.cp-srcs span b { display: grid; place-items: center; width: calc(16 * var(--u)); height: calc(16 * var(--u)); border-radius: 50%; background: rgba(255, 255, 255, 0.12); font-size: calc(var(--a-caption) * var(--u)); font-weight: 600; }
.cp-act-pill { display: flex; align-items: center; gap: calc(10 * var(--u)); height: calc(60 * var(--u)); padding: 0 calc(8 * var(--u)) 0 calc(10 * var(--u)); border-radius: 99px; background: #fff; color: #10101C;
  box-shadow: 0 calc(10 * var(--u)) calc(30 * var(--u)) calc(-12 * var(--u)) rgba(242, 195, 140, 0.45); }
.cp-act-pill > p { display: grid; flex: 1; min-width: 0; }
.cp-act-pill > p b { font-size: calc(var(--a-callout) * var(--u)); font-weight: 600; letter-spacing: -0.005em; } .cp-act-pill > p small { font-size: calc(var(--a-caption) * var(--u)); color: rgba(16, 16, 28, 0.52); }
.cp-act-px { display: grid; justify-items: end; } .cp-act-px b { font-size: calc(var(--a-subhead) * var(--u)); font-weight: 600; } .cp-act-px em { font-style: normal; font-size: calc(var(--a-caption) * var(--u)); font-weight: 600; color: #0090D8 !important; }
.cp-go { display: grid; place-items: center; width: calc(42 * var(--u)); height: calc(42 * var(--u)); border-radius: 50%; background: #10101C; flex: none; }
.cp-go svg { width: calc(16 * var(--u)); fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cp-au { display: grid; place-items: center; width: calc(42 * var(--u)); height: calc(42 * var(--u)); border-radius: 50%; flex: none; font-size: calc(var(--a-subhead) * var(--u)); font-weight: 700; color: #5B3A12;
  background: radial-gradient(circle at 32% 28%, #FFF1D2 0%, #F2C38C 38%, #C9944F 72%, #9C6A2C 100%); box-shadow: inset 0 0 0 1px rgba(91, 58, 18, 0.18); }
.cp-shield { display: grid; place-items: center; width: calc(42 * var(--u)); height: calc(42 * var(--u)); border-radius: 50%; flex: none; background: #F6E6D0; }
.cp-shield svg { width: calc(22 * var(--u)); fill: none; stroke: #6B4519; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cp-follow { display: flex; gap: calc(8 * var(--u)); margin: 0 calc(-16 * var(--u)); padding: 0 calc(16 * var(--u)); overflow: hidden; }
.cp-follow span { flex: none; padding: calc(9 * var(--u)) calc(14 * var(--u)); border-radius: 99px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); font-size: calc(var(--a-subhead) * var(--u)); color: rgba(255, 255, 255, 0.88); }
.cp-na { font-size: calc(var(--a-caption) * var(--u)); color: rgba(255, 255, 255, 0.42); text-align: center; }

/* the input bar: 16pt from the edges like the cards; the send button wakes once there is a question */
.cp-input { position: absolute; left: calc(16 * var(--u)); right: calc(16 * var(--u)); bottom: calc(92 * var(--u)); z-index: 7; display: flex; align-items: center; gap: calc(8 * var(--u)); height: calc(50 * var(--u));
  padding: 0 calc(6 * var(--u)) 0 calc(18 * var(--u)); border-radius: 99px; background: #1E1E29; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 calc(10 * var(--u)) calc(24 * var(--u)) rgba(0, 0, 0, 0.35); }
.cp-in-t { flex: 1; min-width: 0; font-size: calc(var(--a-callout) * var(--u)); color: rgba(255, 255, 255, 0.42); white-space: nowrap; overflow: hidden; text-overflow: clip; }
.cp-in-t.typing { color: #fff; }
.cp-in-t.typing::after { content: ""; display: inline-block; width: calc(1.6 * var(--u)); height: calc(18 * var(--u)); margin-left: calc(1 * var(--u)); vertical-align: calc(-3 * var(--u)); background: #F2C38C; animation: cp-caret 1s steps(1) infinite; }
@keyframes cp-caret { 50% { opacity: 0; } }
.cp-send { display: grid; place-items: center; width: calc(38 * var(--u)); height: calc(38 * var(--u)); border-radius: 50%; background: rgba(255, 255, 255, 0.08); transition: background 0.3s, transform 0.3s; }
.cp-send svg { width: calc(15 * var(--u)); fill: none; stroke: rgba(255, 255, 255, 0.45); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.3s; }
.cp-input.has .cp-send { background: #F2C38C; } .cp-input.has .cp-send svg { stroke: #10101C; }
/* the greeting sits over the chat until the question is sent; the input bar floats over both */
.cp-hello-l { z-index: 6; }

/* ---------- the proofs of concept: the same chat, three jobs, each with its own way to show the money */
.cp-lev .cp-blocks { display: grid; grid-template-columns: repeat(5, 1fr); gap: calc(4 * var(--u)); height: calc(30 * var(--u)); margin-top: calc(6 * var(--u)); }
.cp-blocks i, .cp-blocks-k i { border-radius: calc(7 * var(--u)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0 calc(2 * var(--u)), transparent calc(2 * var(--u)) calc(6 * var(--u))); }
.cp-blocks i.me, .cp-blocks-k i.me { background: linear-gradient(135deg, #FBE0BA, #D59A5C); box-shadow: none; }
.cp-blocks i { display: grid; place-items: center; font-style: normal; font-size: calc(var(--a-caption) * var(--u)); font-weight: 600; color: rgba(255, 255, 255, 0.55); }
.cp-blocks i.me { color: #5B3A12; }
.cp-blocks-k { display: flex; gap: calc(14 * var(--u)); font-size: calc(var(--a-caption) * var(--u)) !important; color: rgba(255, 255, 255, 0.55) !important; }
.cp-blocks-k span { display: flex; align-items: center; gap: calc(6 * var(--u)); } .cp-blocks-k i { width: calc(10 * var(--u)); height: calc(10 * var(--u)); border-radius: calc(3 * var(--u)); }
.cp-sub { margin-top: calc(6 * var(--u)) !important; font-size: calc(var(--a-footnote) * var(--u)) !important; color: rgba(255, 255, 255, 0.5) !important; }
.cp-mv { display: grid; grid-template-columns: calc(64 * var(--u)) minmax(0, 1fr) auto; align-items: center; gap: calc(10 * var(--u)); font-size: calc(var(--a-subhead) * var(--u)); }
.cp-mv span { color: rgba(255, 255, 255, 0.75); } .cp-mv b { font-weight: 600; min-width: calc(76 * var(--u)); text-align: right; }
.cp-bar { position: relative; height: calc(8 * var(--u)); border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.cp-bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--w) * 100%); border-radius: 99px; transform: scaleX(var(--g, 1)); transform-origin: 0 50%; }
.cp-bar.up::after { background: #00AAFE; } .cp-bar.dn::after { background: #EB434E; }
.cp-mv-k { font-size: calc(var(--a-caption) * var(--u)) !important; color: rgba(255, 255, 255, 0.45) !important; }
.cp-stop-ch { position: relative; margin-top: calc(6 * var(--u)); }
.cp-stop-ch .cp-ch { margin: 0 calc(80 * var(--u)) 0 0; }
.cp-ch-flat .cp-ch-line { stroke-width: 1.8; } .cp-ch-flat .cp-ch-area { display: none; }
.cp-risk { position: absolute; left: 0; right: calc(80 * var(--u)); top: var(--entry); height: calc(var(--stop) - var(--entry)); transform-origin: 0 0;
  background: linear-gradient(180deg, rgba(235, 67, 78, 0.04), rgba(235, 67, 78, 0.2)); border-top: 1px dashed rgba(255, 255, 255, 0.4); border-bottom: 1.5px solid #EB434E; }
.cp-lvl { position: absolute; right: 0; transform: translateY(-50%); padding: calc(2 * var(--u)) calc(6 * var(--u)); border-radius: calc(5 * var(--u)); font-size: calc(var(--a-caption) * var(--u)); font-weight: 600; white-space: nowrap; }
.cp-lvl.e { top: var(--entry); background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.85); } .cp-lvl.s { top: var(--stop); background: #EB434E; color: #fff; }
.cp-row { display: flex; justify-content: space-between; gap: calc(8 * var(--u)); margin-top: calc(4 * var(--u)) !important; padding-top: calc(10 * var(--u)); border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: calc(var(--a-footnote) * var(--u)) !important; color: rgba(255, 255, 255, 0.55) !important; }
.cp-row b { color: #fff; font-weight: 600; }
.cp-zones { position: relative; }
.cp-ch-zones .cp-ch-plot { height: calc(84 * var(--u)); margin-top: calc(4 * var(--u)); border-radius: calc(8 * var(--u));
  background: linear-gradient(180deg, rgba(110, 139, 255, 0.1) 0 58.8%, rgba(245, 164, 75, 0.13) 58.8% 88.2%, rgba(235, 67, 78, 0.18) 88.2%); }
.cp-ch-zones .cp-ch-mk { transform: translate(-50%, -50%); display: grid; place-items: center; width: calc(17 * var(--u)); height: calc(17 * var(--u)); padding: 0; background: #F2C38C; box-shadow: 0 0 0 calc(2.5 * var(--u)) #1E1E29; }
.cp-ch-zones .cp-ch-mk::after { display: none; } .cp-ch-zones .cp-ch-dot { display: none; }
.cp-zl { position: absolute; right: calc(6 * var(--u)); transform: translateY(calc(-100% - 2 * var(--u))); font-size: calc(var(--a-caption) * var(--u)); font-weight: 600; color: #F5A44B; }
.cp-zl.r { color: #FF6B74; }
.cp-a .cp-steps { list-style: none; margin: calc(8 * var(--u)) 0 0; padding: 0; display: grid; gap: calc(6 * var(--u)); }
.cp-steps li { display: grid; grid-template-columns: calc(17 * var(--u)) calc(42 * var(--u)) minmax(0, 1fr); align-items: center; gap: calc(8 * var(--u)); font-size: calc(var(--a-subhead) * var(--u)); color: rgba(255, 255, 255, 0.78); }
.cp-steps i { display: grid; place-items: center; width: calc(17 * var(--u)); height: calc(17 * var(--u)); border-radius: 50%; background: rgba(242, 195, 140, 0.16); color: #F2C38C; font-style: normal; font-size: calc(var(--a-caption) * var(--u)); font-weight: 600; }
.cp-steps b { font-size: calc(var(--a-footnote) * var(--u)); font-weight: 600; color: rgba(255, 255, 255, 0.5); }
.cp-nx { display: flex; align-items: center; gap: calc(10 * var(--u)); margin-top: calc(2 * var(--u)) !important; font-size: calc(var(--a-subhead) * var(--u)) !important; line-height: 1.35 !important; color: rgba(255, 255, 255, 0.82) !important; }
.cp-nx > i { display: grid; place-items: center; width: calc(22 * var(--u)); height: calc(22 * var(--u)); flex: none; border-radius: 50%; background: rgba(242, 195, 140, 0.16); color: #F2C38C; font-style: normal; font-size: calc(var(--a-caption) * var(--u)); font-weight: 600; }
.cp-nx > span { display: grid; gap: calc(2 * var(--u)); } .cp-nx b { font-size: calc(var(--a-subhead) * var(--u)); font-weight: 500; color: #fff; }

/* the explorations on the page: three phones, large enough to read */
.cp-mini-dev { width: min(340px, 100%); margin: 0 auto 26px; }
.cp-ideas .nx-state-h .ph-name { color: #fff; }
.cp-ideas .nx-state-n { background: #F2C38C; color: #14141C; }
@media (prefers-reduced-motion: reduce) { .cp-think, .cp-tick::before, .cp-ch-dot::after, .cp-in-t.typing::after { animation: none; } .cp-think { color: #fff; } }

/* ---------- the design system on the light ground: a bento board of Night tiles, each sized by what its part needs,
   on a faded 8pt construction grid (in his points, so the parts sit on it), its frame name top left, its measure top right */
.cp-dsys .ds-ch-h { border-bottom-color: var(--ph-rule); }
.cp-dsys .ds-ch-n { color: var(--ph-muted); }
.cp-dsys .ds-ch-t { color: var(--ph-ink); } .cp-dsys .ds-ch-d { color: var(--ph-soft); }
.ph .cp-princ { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; margin: 0 0 24px; padding: 0; list-style: none; }
.cp-princ li { display: grid; gap: 6px; align-content: start; padding-top: 14px; border-top: 1.5px solid var(--ph-ink); }
.cp-princ b { font-weight: 600; color: var(--ph-ink); } .cp-princ span { color: var(--ph-soft); }

/* every mobile part shows at the phones' own scale above (a 375pt screen is 317px: 0.845px a point), never larger; a
   tile is sized to its part with room around it, and a part only shrinks (cqw) when its tile is narrower */
.cb { --cb-u: 0.845px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.cb-t { --u: var(--cb-u); --g: calc(8 * var(--u)); position: relative; isolation: isolate; overflow: hidden; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 20px;
  padding: 18px 24px 28px; border-radius: 20px; background: #0E0F17; color: #fff; }
.cb-t::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: calc(4 * var(--g)) calc(4 * var(--g)); background-position: center;
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent 85%); mask-image: radial-gradient(closest-side, #000, transparent 85%); }
.cb-h { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.ph .cb-h .ds-lab { margin: 0; color: rgba(255, 255, 255, 0.55); }
.ph .cb-h .cb-spec { color: rgba(255, 255, 255, 0.32); text-transform: none; letter-spacing: 0.04em; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cb-in { flex: 1; display: grid; place-items: center; min-width: 0; container-type: inline-size; }
/* each part runs at his points up to a cap, and scales down with its tile (cqw), so it never spills */
.cb-modui { --u: min(var(--cb-u), 100cqw / 395); } .cb-tkui, .cb-exui, .cb-thui { --u: min(var(--cb-u), 100cqw / 360); }
.cb-chui, .cb-tog .cb-pair { --u: min(var(--cb-u), 100cqw / 343); } .cb-kbui { --u: min(var(--cb-u), 100cqw / 375); } .cb-gau .cb-row { --u: min(var(--cb-u), (100cqw - 40px) / 417); gap: 20px; }   /* three gauges, 139 pt each */
.cb-t p { margin: 0; max-width: none; }
.cb-t [hidden] { display: none !important; }
.cb-ui, .cb-sp { font-family: -apple-system, 'SF Pro Text', 'InterVariable', 'Inter', system-ui, sans-serif; font-variant-numeric: tabular-nums; color: #fff; }
:where(.cb-t) :where(button) { all: unset; box-sizing: border-box; cursor: default; color: #fff; }
.cb-t .cp-sell { text-align: left; } .cb-t .cp-buy { text-align: right; }
.cb-t .ph-small { color: rgba(255, 255, 255, 0.55); }
.cb-st { display: grid; justify-items: center; gap: 10px; text-align: center; }
.cb-row { display: flex; justify-content: center; gap: 40px; }
.ph .cb-note { max-width: 34ch; text-align: center; margin-top: 16px; }

/* foundations: colour full width, then type beside icons */
.cb-pal { grid-column: 1 / -1; } .cb-typ { grid-column: span 7; } .cb-ico { grid-column: span 5; }
.cb-pal .cb-in { place-items: stretch; }
.cb-pal .cb-in { display: grid; gap: 28px; align-content: start; }
.cb-pgs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 44px; }
/* the strip sits on the token columns below: products on the grounds over Grounds and Products, then Money, then Brand */
.cb-pal-use { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 44px;
  font-family: -apple-system, 'SF Pro Text', 'InterVariable', 'Inter', system-ui, sans-serif; font-variant-numeric: tabular-nums; color: #fff; }
/* three labelled groups of colour in use, each part centred on one shared line */
.cb-pu { --u: var(--cb-u); display: grid; grid-template-rows: auto calc(80 * var(--cb-u)); gap: 10px; min-width: 0; }
.ph .cb-pu .ds-lab { margin: 0; color: rgba(255, 255, 255, 0.4); }
.cb-pu-p { display: flex; align-items: center; gap: 20px; min-width: 0; }
.cb-pu-prod { grid-column: span 2; } .cb-pu-prod .cb-pu-p { max-width: calc(359 * var(--u)); } .cb-pu-prod .cb-pu-p > * { flex: 1; min-width: 0; }
.cb-pu-money .cb-pu-p { --u: 0.7px; max-width: calc(300 * var(--u)); display: grid; align-content: center; gap: 10px; }
.cb-pu-money .cp-bs { width: 100%; }
.cb-pu-money .cb-pu-p p { display: flex; justify-content: space-between; font-size: calc(var(--a-title-s) * var(--u)); font-weight: 500; }
.cb-pu-money .cp-up { color: #00AAFE; } .cb-pu-money .cp-dn { color: #F45572; }
.cb-pu-brand .cp-gauge .cp-g-t { display: none; }
.cb-pg { display: grid; align-content: start; gap: 4px; min-width: 0; }
.cb-pg .ph-name { color: #fff; font-weight: 600; }
.cb-why { min-height: 2.6em; }
.ph .cb-sw { list-style: none; margin: 12px 0 0; padding: 0; }
.cb-sw li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 5px 0; }
.cb-sw i { width: 14px; height: 14px; border-radius: 4px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
.cb-sw b { font-weight: 500; color: #fff; } .cb-sw span { color: rgba(255, 255, 255, 0.45); text-align: right; font-variant-numeric: tabular-nums; text-transform: uppercase; line-height: 1.25; }
.cb-tg { height: auto; padding: 0; } .cb-tg .cp-tog { --u: var(--cb-u); }

.ph .cb-ramp { --u: min(var(--cb-u), 100cqw / 390); list-style: none; margin: 0; padding: 0; width: 100%; align-self: stretch; }
.cb-ramp li { display: grid; grid-template-columns: minmax(0, 1fr) 128px; align-items: baseline; gap: 20px; padding: 10px 0; }
.cb-ramp li:first-child { padding-top: 0; }
.cb-ramp .ph-small b { display: block; color: #fff; font-weight: 500; }
.cb-sp { line-height: 1.2; } .cb-bal, .cb-tb { white-space: nowrap; }
.cb-bal { font-size: calc(40 * var(--u)); font-weight: 700; letter-spacing: -0.02em; }
.cb-ct { font-size: calc(var(--a-body) * var(--u)); font-weight: 600; } .cb-bd { font-size: calc(var(--a-subhead) * var(--u)); }
.cb-lb { font-size: calc(var(--a-subhead) * var(--u)); color: rgba(255, 255, 255, 0.6) !important; } .cb-mt { font-size: calc(var(--a-footnote) * var(--u)); color: rgba(255, 255, 255, 0.6) !important; }
.cb-tb { font-size: calc(var(--a-caption) * var(--u)); font-weight: 500; letter-spacing: 0.01em; }
.ph .cb-icons { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 18px 8px; }
.cb-ico .cb-in { place-items: stretch; } .ph .cb-ico .cb-icons { align-content: space-evenly; }
.cb-icons li { display: grid; justify-items: center; gap: 8px; text-align: center; }
.cb-key { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.cb-key::before { content: ""; position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px; border: 1px dashed rgba(255, 255, 255, 0.07); border-radius: 2px; }
.cb-key .cp-i { position: relative; width: 24px; height: 24px; } .cb-key.g16 .cp-i { width: 16px; height: 16px; }

/* components: the module is the hero; each other part gets the shape it needs */
.cb-comp { grid-template-areas: "mod mod mod mod mod mod tk tk tk tk tk tk" "ext ext ext ext ext ext gau gau gau gau gau gau"
  "chp chp chp chp chp chp pct pct pct pct pct pct"; }
.cb-mod { grid-area: mod; } .cb-gau { grid-area: gau; } .cb-tog { grid-area: tog; } .cb-tk { grid-area: tk; } .cb-ext { grid-area: ext; } .cb-chp { grid-area: chp; } .cb-pct { grid-area: pct; }
.cb-modui { position: relative; width: calc(359 * var(--u)); margin-right: calc(36 * var(--u)); }
.cb-modui .cp-module { margin: 0; }
.cb-red { position: absolute; inset: 0; pointer-events: none; }
.cb-red .ds-rl.cb-gap b { top: 12px; }
.cb-pair { display: grid; gap: calc(2 * var(--u)); width: calc(343 * var(--u)); padding: calc(2 * var(--u)); border-radius: calc(26 * var(--u)); background: #0C0C16; }
.cb-pair .cp-tile:first-child { border-radius: calc(24 * var(--u)) calc(24 * var(--u)) 0 0; } .cb-pair .cp-tile:last-child { border-radius: 0 0 calc(24 * var(--u)) calc(24 * var(--u)); }
.cb-pair .cp-trow { font-size: calc(var(--a-callout) * var(--u)); }
.cb-tog .cb-in { align-content: center; }
.cb-tkui { width: calc(343 * var(--u)); }
.cb-tkui .cp-prod.bare { padding: 0; } .cb-tkui .cp-tk { margin: calc(16 * var(--u)) 0 0; }
.cb-tkui .cp-tk > :last-child { border-radius: 0 0 calc(24 * var(--u)) calc(24 * var(--u)); }
.cb-exui { width: calc(358 * var(--u)); }
.cb-exui .cp-pair { margin: 0; }
.cb-chui { width: calc(343 * var(--u)); display: grid; gap: calc(24 * var(--u)); }
.cb-kbui { width: calc(375 * var(--u)); }
.cb-kb { position: relative; visibility: visible; padding: calc(8 * var(--u)) calc(6 * var(--u)) calc(10 * var(--u)); border-radius: calc(16 * var(--u)); }

/* the AI family: the orb's four states beside one answer in his chat grammar */
.cb-srch { grid-column: 1 / -1; }
.cb-srui { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); align-items: start; gap: 28px 20px; }
.cb-sc { container-type: inline-size; display: grid; justify-items: center; }
.cb-sc .cb-st { width: calc(343 * var(--u)); }
.cb-sc .cb-st { --u: min(var(--cb-u), 100cqw / 343); }
.cb-sc .cb-ui { width: 100%; }
.cb-sc .cp-search { margin: 0; }
.cb-sc .cp-input { position: relative; left: auto; right: auto; bottom: auto; }
.cb-orb { grid-column: span 5; } .cb-thr { grid-column: span 7; }
.ph .cb-orbs { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
.cb-orbs li { display: grid; justify-items: center; gap: 4px; text-align: center; }
.cb-orbs canvas { width: 100%; max-width: 128px; aspect-ratio: 1; }
.cb-orbs .ph-small b { display: block; color: #fff; font-weight: 600; }
.cb-thui { width: calc(343 * var(--u)); display: grid; gap: calc(16 * var(--u)); }
.cb-thui .cp-orb-row { margin: 0; }
.cb-thui .cp-act-pill { color: #10101C; }

@media (max-width: 1179px) {
  .cb-comp { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-areas: "mod mod mod tk tk tk" "ext ext ext gau gau gau" "chp chp chp pct pct pct"; }
  .cb-pgs { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .cb-pal-use { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cb-pu-prod { --u: min(var(--cb-u), 100cqw / 359); }
}
@media (max-width: 860px) {
  .ph .cp-princ { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cb-typ, .cb-ico, .cb-orb, .cb-thr { grid-column: 1 / -1; }
  .cb-comp { grid-template-columns: minmax(0, 1fr); grid-template-areas: "mod" "tk" "ext" "gau" "chp" "pct"; }
}
@media (max-width: 700px) {
  .cb { --cb-u: 0.795px; grid-template-columns: minmax(0, 1fr); gap: 10px; }   /* the phones' scale at 390: 298px for 375pt */
  .cb-t { padding: 16px 16px 22px; border-radius: 18px; gap: 16px; }
  .cb-pgs, .cb-pal-use { gap: 24px 16px; }

  .cb-pg, .cb-pg:nth-child(n) { padding: 0; border: 0; }
  .cb-why { display: none; }
  .cb-sw li { grid-template-columns: 12px minmax(0, 1fr); gap: 0 8px; padding: 6px 0; }
  .cb-sw i { width: 12px; height: 12px; } .cb-sw span { grid-column: 2; text-align: left; }
  .cb-ramp li { grid-template-columns: minmax(0, 1fr) 92px; gap: 12px; }
  .ph .cb-icons { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 4px; }
  .cb-row { gap: 20px; }
  .cb-key { width: 48px; height: 48px; border-radius: 12px; }
}

/* the margin alert in the design system: only the part that changes (the foot of the card, the alert line with its icon,
   its pill and the level, and the lip), cropped under a fade at the top; the states two by two at the phones' scale */
.ph .cb-mst .cb-mstl { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 28px 32px; }
.cb-mst .cb-mstl li { justify-items: center; align-items: end; grid-template-rows: calc(100 * var(--cb-u)) auto; gap: 10px; }
.cb-mst .cb-mst-ui { --u: min(var(--cb-u), 100cqw / 358); position: relative; width: calc(358 * var(--u)); height: calc(var(--h, 100) * var(--u)); overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  -webkit-mask-image: linear-gradient(transparent, #000 calc(22 * var(--u))); mask-image: linear-gradient(transparent, #000 calc(22 * var(--u))); }
.cb-mst .cb-mst-ui.safe { --h: 46; }
.cb-mst .cb-mstl .ph-small { width: calc(358 * var(--cb-u)); max-width: 100%; }

/* the proofs of concept: the conversation is the point, so the app's tab bar steps back (Arash: too bright and distracting here only) */
.cp-ideas .cp-tabs .cp-tab { opacity: 0.32; }
.cp-ideas .cp-tabs .cp-tab.on { opacity: 0.5; }
/* Foundations opens on five ruled principles: their own rules carry the chapter, so the header's thin rule goes (Arash,
   2026-11-15: the thin line over the thick ones read as a missing row) */
.cp-dsys .ds-ch:has(.cp-princ) > .ds-ch-h { border-bottom: 0; padding-bottom: 0; margin-bottom: 32px; }
