/* =====================================================================================================================
   CAPITAL.COM (prefix cp; branch case-studies-v2). The page layer, then his screens in his points (--u is one point of a
   375 pt screen), measured from his Figma (Module/Trade 2274:19371, AccountSummary 2246:942, the tab bar 2244:12643, the
   CFD board 1:28776). Product UI type is sized in --u, the one exception to the six site sizes. Source:
   tools/builder/projects/capital.py and tools/builder/kits/capital.py.
   ===================================================================================================================== */

/* ---------- the page: night and gold, the theme contract ---------- */
.cp-page .ph, .cp-page .ph-hero, .cp-page .ph-index {
  --ph-red: #B8864F; --ph-dark: #8E6236; --ph-ink: #14141C; --ph-soft: #4B4B58; --ph-muted: #6E6E7C;
  --ph-rule: #DADAE2; --ph-ground: #EEEEF2; --ph-pink: #F6F6F9; --ph-mist: #E4E4EA; --deep-accent: #F2C38C; }
.cp-deep { background: radial-gradient(120% 80% at 80% 0%, #24222E 0%, #13131C 46%, #0E0F17 100%); color: #fff; }
.cp-deep h2 { color: #fff; }
.cp-deep .ph-intro, .cp-deep .ph-small { color: rgba(255, 255, 255, 0.66); }
.cp-deep .ph-name { color: #fff; }
.cp-deep .nx-track i { background: #F2C38C; }
.cp-deep .nx-beat .ph-small { color: rgba(255, 255, 255, 0.4); }
.cp-deep .nx-beat.on .ph-small { color: rgba(255, 255, 255, 0.76); }
.cp-deep .nx-beat.on .ph-num { color: #F2C38C; }

/* the hero: his night from the very top with the gold shine, the mark, his greeting and orb face on */
.cp-hero { background: radial-gradient(70% 60% at 72% 18%, rgba(196, 140, 88, 0.30) 0%, transparent 60%),
  radial-gradient(120% 90% at 78% 30%, #2A2632 0%, #15151E 45%, #0E0F17 100%); color: #fff; }
.cp-hero .ph-hero-lead { color: rgba(255, 255, 255, 0.76); }
.cp-hero .ph-contents a { color: #fff; }
.cp-hero-mark { position: absolute; left: 8.57%; top: 10%; width: 13%; height: auto; filter: brightness(0) invert(1); }
.cp-hero-in .cp-hero-copy { top: 25%; width: 44%; }
.cp-hero-art { position: absolute; z-index: 2; left: 61.5%; top: 10%; width: 21.5%; }   /* a touch smaller, so it stops well clear of the brief (Arash) */
.cp-hero-art::before { content: ""; position: absolute; inset: 6% -45% 8%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(242, 195, 140, 0.22), rgba(184, 134, 79, 0.10) 55%, transparent); filter: blur(30px); }
.cp-page .ph .ph-brief { padding-top: calc(var(--work-w) * 0.05 + 96px); }
@media (max-width: 700px) {
  .ph-hero-in .cp-hero-mark { position: static; order: -1; width: 150px; margin: 0 0 28px 4px; }
  .cp-hero-in .cp-hero-copy { width: auto; }
  .cp-hero-art { position: relative; left: auto; top: auto; width: 68%; margin: 8px auto -260px; }
  .cp-page .ph .ph-brief { padding-top: calc(260px + 48px); }
}
.cp-page .pr-stage .pr-dev { width: min(100%, 340px, calc((100vh - 150px) / 2.17)); }
/* the drawer's beats sit level with the account card they are about, so no empty column opens under the heading */
@media (min-width: 900px) { .cp-page [data-cp-proto="drawer"] .nx-beats { align-self: start; padding-top: 96px; } }

/* the refresh: his before and after, one slider each */
.ph .cp-cmps { display: grid; grid-template-columns: repeat(3, minmax(0, 300px)); justify-content: center; gap: clamp(28px, calc(var(--cw) * 0.05), 64px); margin: 0; padding: 0; list-style: none; }
.cp-cmp-dev { position: relative; aspect-ratio: 375 / 812; border-radius: 9% / 4.2%; overflow: hidden; background: #0E0F17; margin-bottom: 18px; touch-action: pan-y;
  box-shadow: 0 0 0 1px rgba(20, 20, 28, 0.16), 0 28px 50px -30px rgba(20, 20, 28, 0.6); cursor: ew-resize; }
.cp-cmp-dev img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; user-select: none; -webkit-user-drag: none; }
.cp-cmp-new { clip-path: inset(0 0 0 calc(var(--p) * 1%)); }
.cp-cmp-h { position: absolute; top: 0; bottom: 0; left: calc(var(--p) * 1%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 12px rgba(0, 0, 0, 0.5); }
.cp-cmp-h i { position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35); }
.cp-cmp-h i::before, .cp-cmp-h i::after { content: ""; position: absolute; top: 50%; width: 7px; height: 7px; border: solid #14141C; border-width: 0 0 2px 2px; margin-top: -4px; }
.cp-cmp-h i::before { left: 8px; transform: rotate(45deg); } .cp-cmp-h i::after { right: 8px; transform: rotate(-135deg); }
.cp-cmp-tag { position: absolute; bottom: 12px; padding: 4px 10px; border-radius: 99px; background: rgba(14, 15, 23, 0.72); color: #fff; backdrop-filter: blur(8px); }
.cp-cmp-tag.l { left: 12px; } .cp-cmp-tag.r { right: 12px; }
.cp-cmp .ph-small { margin-top: 6px; color: var(--ph-soft); }
@media (max-width: 1000px) { .ph .cp-cmps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; } }
@media (max-width: 700px) { .ph .cp-cmps.m-swipe { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; } .cp-cmp { flex: 0 0 74%; scroll-snap-align: center; } }

/* margin: his four versions, a clean cross or tick under each (sections.vmark), drawn in the reading zone */
.ph .cp-its { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(18px, calc(var(--cw) * 0.025), 32px); margin: 0; padding: 0; list-style: none; }
.cp-it-v { position: relative; border-radius: 18px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07); }
.cp-it-v img { display: block; width: 100%; height: auto; }
/* one fixed slot for the mark, so every name sits on one line whether its version was crossed, ticked or neither */
.cp-it-mk { height: 48px; margin: 22px 0 14px; }
.cp-vmk { display: block; width: 76px; height: auto; overflow: visible; }
.cp-vmk g { stroke: #fff; }   /* white on the dark board */
/* v4 live: his gauge, legend and bars redrawn over his pixels in his geometry (the SVG's own units are his 600px frame) */
.cp-v4 { position: absolute; left: 0; top: calc(340 / 690 * 100%); width: 100%; height: auto; font-family: -apple-system, 'SF Pro Text', 'InterVariable', 'Inter', system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.cp-v4 text { fill: #8A8A94; font-size: 19px; }
.cp-v4 .cp-v4-pct { fill: #fff; font-size: 25px; font-weight: 500; text-anchor: middle; }
.cp-v4 .cp-v4-sub { fill: #9A9AA3; font-size: 18px; text-anchor: middle; }
.cp-v4 .cp-v4-lab { fill: #B8B8C0; font-size: 19px; }
.cp-v4 .cp-v4-num { fill: #fff; font-size: 24px; font-weight: 700; }
.cp-v4-track { fill: none; stroke: #27272F; stroke-width: 1.5; }
.cp-v4-z { stroke-width: 2.4; stroke-linejoin: round; }
.cp-v4-needle { fill: #fff; }   /* flush with the band, as the shipped gauge */
.cp-v4-dim { opacity: 0.32; }   /* the arc past the needle steps down in tone (rule 275) */
.cp-it .ph-small { margin-top: 6px; }
@media (max-width: 1000px) { .ph .cp-its { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; } }

/* ---------- his screens, in his points ---------- */
.cp-phone .ip-scr { background: #0E0F17; }
.cp-scr { position: absolute; inset: 0; --u: calc(100cqw / 375); color: #fff; overflow: hidden;
  font-family: -apple-system, 'SF Pro Text', 'SF Pro Display', 'InterVariable', 'Inter', system-ui, sans-serif; font-size: calc(var(--a-subhead) * var(--u)); line-height: 1.25; letter-spacing: 0;
  background: #0E0F17; font-variant-numeric: tabular-nums; }
.cp-scr p { margin: 0; max-width: none; }
:where(.cp-scr) :where(button) { all: unset; box-sizing: border-box; cursor: pointer; }
.cp-scr [hidden] { display: none !important; }
.cp-scrn { position: absolute; inset: 0; overflow: hidden; background: #0E0F17; }
.cp-i { display: block; flex: none; width: calc(24 * var(--u)); height: calc(24 * var(--u)); }
.cp-up { color: #4F95FF; font-style: normal; } .cp-dn { color: #EB434E; font-style: normal; }
.cp-m small { font-size: 0.6em; }
.cp-circ { display: grid; place-items: center; width: calc(36 * var(--u)); height: calc(36 * var(--u)); border-radius: 50%; background: rgba(255, 255, 255, 0.08); flex: none; }
.cp-circ svg { width: calc(18 * var(--u)); height: calc(18 * var(--u)); fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cp-card { border-radius: calc(24 * var(--u)); background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)), #13131C; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); }

/* ---------- HOME AND DRAWER: his Capital 2.0 home (Portfolio 2246:941, header 2246:2194, tab bar 2244:12643) and the
   account drawer (Design 1:30270), measured in tools/capital/audit/home-drawer.md. His source has only two shadows: the
   drawer's front card and the tab bar. Everything here is in his points (--u). ---------- */
.cp-home { position: absolute; inset: 0; padding: calc(58 * var(--u)) calc(8.5 * var(--u)) 0; display: flex; flex-direction: column; overflow: hidden;
  background: #10101C; font-variant-numeric: normal; }
.cp-home > * { flex: none; }
.cp-shine { position: absolute; inset: 0 0 auto; height: calc(300 * var(--u)); pointer-events: none;
  background: radial-gradient(55% 45% at 0% 0%, rgba(176, 96, 66, 0.55), rgba(176, 96, 66, 0)),
    radial-gradient(55% 45% at 100% 0%, rgba(190, 150, 118, 0.5), rgba(190, 150, 118, 0)),
    linear-gradient(180deg, rgb(100, 84, 68) 0%, rgb(68, 56, 52) 20%, rgba(38, 32, 40, 0.92) 34%, rgba(34, 32, 42, 0.6) 44%, rgba(16, 16, 28, 0) 60%); }
.cp-head { position: relative; display: flex; align-items: center; height: calc(40 * var(--u)); padding: 0 calc(7.5 * var(--u)); }
.cp-ava { width: calc(40 * var(--u)); height: calc(40 * var(--u)); border-radius: 50%; overflow: hidden; flex: none; background: #535770; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.4); }
.cp-ava img { width: 100%; height: 100%; display: block; object-fit: cover; }
.cp-acct { display: flex; align-items: center; margin-left: calc(12 * var(--u)); font-size: calc(var(--a-callout) * var(--u)); line-height: calc(20 * var(--u)); font-weight: 590; color: #fff; white-space: nowrap; }
.cp-acct .cp-i { width: calc(24 * var(--u)); height: calc(24 * var(--u)); }
.cp-hc { position: relative; display: grid; place-items: center; width: calc(40 * var(--u)); height: calc(40 * var(--u)); border-radius: 50%; flex: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
.cp-mail { margin-left: auto; } .cp-find { margin-left: calc(8 * var(--u)); }
.cp-mail .cp-i { width: calc(16 * var(--u)); height: calc(16 * var(--u)); }
.cp-mail i { position: absolute; left: calc(24 * var(--u)); top: calc(10 * var(--u)); width: calc(8 * var(--u)); height: calc(8 * var(--u)); border-radius: 50%; background: #FA6464; }
.cp-find .cp-i { width: calc(20 * var(--u)); height: calc(20 * var(--u)); }
/* the card: a back panel (his AccountInfo, white 3%) holding the front card and the drawer, then his lip */
.cp-account { position: relative; margin-top: calc(32 * var(--u)); }
.cp-back { position: relative; border-radius: calc(24 * var(--u)) calc(24 * var(--u)) 0 0; background: rgba(255, 255, 255, 0.03); }
.cp-front { --lift: 0; position: relative; z-index: 1; display: flex; flex-direction: column; gap: calc(16 * var(--u)); padding: calc(16 * var(--u)); border-radius: calc(24 * var(--u));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.03)); }
/* open, the front card turns solid and casts his one shadow; the script tweens --lift so it rises with the drawer */
.cp-front::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: #13131D; opacity: var(--lift);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 0 0 0.5px rgba(255, 255, 255, 0.08); }
.cp-account.open .cp-front { --lift: 1; }
.cp-bal { display: grid; justify-items: center; gap: calc(8 * var(--u)); }
.cp-big { display: flex; align-items: center; gap: calc(4 * var(--u)); font-size: calc(40 * var(--u)); line-height: calc(44 * var(--u)); font-weight: 590; letter-spacing: calc(0.2 * var(--u)); white-space: nowrap; }
.cp-big .cp-cur { color: rgba(255, 255, 255, 0.6); }
.cp-num { display: flex; align-items: baseline; gap: calc(2 * var(--u)); color: rgba(255, 255, 255, 0.95); }
.cp-num small { font-size: calc(var(--a-body) * var(--u)); line-height: calc(24 * var(--u)); letter-spacing: 0; }
.cp-perf { display: flex; align-items: center; gap: calc(4 * var(--u)); font-size: calc(var(--a-subhead) * var(--u)); line-height: calc(16 * var(--u)); color: rgba(255, 255, 255, 0.6); white-space: nowrap; }
.cp-perf b, .cp-perf em { font-weight: 590; line-height: calc(20 * var(--u)); letter-spacing: calc(-0.23 * var(--u)); }
.cp-perf b { color: #fff; } .cp-perf em { padding-left: calc(8 * var(--u)); color: #4F95FF; } .cp-perf em.cp-dn { color: #EB434E; }
.cp-acts { display: flex; justify-content: space-between; padding: 0 calc(8 * var(--u)); }
.cp-act { display: grid; justify-items: center; gap: calc(4 * var(--u)); }
.cp-act[data-act="withdraw"] { width: calc(72 * var(--u)); }
.cp-act i { display: grid; place-items: center; width: calc(56 * var(--u)); height: calc(56 * var(--u)); border-radius: 50%; background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)); }
.cp-act b { font-size: calc(var(--a-caption) * var(--u)); line-height: calc(16 * var(--u)); font-weight: 510; white-space: nowrap; }
.cp-act .cp-i[viewBox="0 0 18 4"] { width: calc(18 * var(--u)); height: calc(4 * var(--u)); }
/* the drawer: closed it is truly zero high; the script grows it from behind the front card */
.cp-drawer { height: 0; overflow: hidden; }
.cp-account.open .cp-drawer { height: auto; }
.cp-drawer-in { padding: calc(24 * var(--u)) calc(35 * var(--u)) calc(10 * var(--u)); }
/* his v4 drawer (margin-v4.png), at the card's scale: the key and the gauge on one line, then Available against Used.
   The key is set larger than his render (Arash: balance it against the gauge), centred on the arc. */
.cp-dr-row { display: flex; align-items: center; justify-content: space-between; gap: calc(12 * var(--u)); }
.cp-scr .cp-key, .cp-key { list-style: none; margin: 0; padding: 0; display: grid; gap: calc(10 * var(--u)); }
.cp-key li { display: flex; align-items: center; gap: calc(8 * var(--u)); font-size: calc(var(--a-subhead) * var(--u)); line-height: calc(20 * var(--u)); color: #6E6E78; white-space: nowrap;
  transition: color 0.35s ease; }
.cp-key svg { width: calc(20 * var(--u)); height: calc(20 * var(--u)); flex: none; opacity: 0.5; transition: opacity 0.35s ease; }
.cp-key li.on { color: #fff; } .cp-key li.on svg { opacity: 1; }
.cp-mbars { margin-top: calc(26 * var(--u)); }
.cp-scr .cp-mlab, .cp-scr .cp-mfig, .cp-mlab, .cp-mfig { display: flex; justify-content: space-between; margin: 0; white-space: nowrap; }
.cp-mlab { font-size: calc(var(--a-subhead) * var(--u)); line-height: calc(16 * var(--u)); color: #B8B8C0; }
.cp-mbar { --gap: calc(4 * var(--u)); position: relative; height: calc(12 * var(--u)); margin: calc(8 * var(--u)) 0 calc(10 * var(--u)); }
.cp-mbar::before { content: ""; position: absolute; inset: 0; border-radius: calc(2 * var(--u)); background: rgba(255, 255, 255, 0.05); }
.cp-mbar i { position: absolute; top: 0; bottom: 0; width: calc((100% - var(--gap)) * var(--f)); border-radius: calc(2 * var(--u)); }
.cp-mbar [data-bar="a"] { left: 0; background: #6094F7; transform-origin: 0 50%; }
.cp-mbar [data-bar="u"] { right: 0; background: #925AAF; transform-origin: 100% 50%; }
.cp-mfig b { font-size: calc(var(--a-body) * var(--u)); line-height: calc(20 * var(--u)); font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }
/* the warning lives in the card's own UI: a ruled line under the figures, the lead in his gauge's own colours */
.cp-scr .cp-warn { margin: calc(16 * var(--u)) 0 0; padding: calc(12 * var(--u)) 0 calc(4 * var(--u)); border-top: 0.5px solid rgba(255, 255, 255, 0.1);
  font-size: calc(var(--a-footnote) * var(--u)); line-height: calc(18 * var(--u)); color: rgba(255, 255, 255, 0.72); }
.cp-warn b { display: block; font-weight: 590; color: #E0B57F; }   /* the lead in its zone's colour */
.cp-warn.safe b { color: #7FA8F8; }
.cp-scr .cp-warn-t { margin: 0; }
.cp-scr .cp-ctas, .cp-ctas { display: flex; gap: calc(8 * var(--u)); margin: calc(12 * var(--u)) 0 0; }
.cp-ctas[hidden] { display: none; }
/* his pill (13 pt Medium, fully round): the fix, right in the alert. Deposit is the primary, white on Night with his
   plus; Close a trade is the quiet second way back, on his glass fill */
.cp-cta { display: inline-flex; align-items: center; gap: calc(4 * var(--u)); flex: none; height: calc(32 * var(--u)); padding: 0 calc(14 * var(--u)) 0 calc(10 * var(--u));
  border-radius: 98px; background: #fff; color: #10101C; font-size: calc(var(--a-footnote) * var(--u)); line-height: calc(16 * var(--u)); font-weight: 510; white-space: nowrap; }
.cp-cta .cp-cta-i { width: calc(16 * var(--u)); height: calc(16 * var(--u)); } .cp-cta .cp-cta-i path { stroke: currentColor; }
.cp-cta.sec { padding: 0 calc(14 * var(--u)); background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.85); }   /* his .cp-pill glass, quiet beside the one white action */
/* the margin alert: out of the safe zone the drawer opens a quarter by itself (his "Margin is low" home card, in v4):
   the zone's icon from his key, the state and level, the money it leaves, the pill. Closed it is truly zero high; the
   script springs it open and nudges the lip (--nudge) every few seconds while the account is in the zone */
.cp-peek { --nudge: 0; height: 0; overflow: hidden; }
.cp-account.peek .cp-peek { height: auto; }
.cp-peek-in { display: flex; align-items: center; gap: calc(10 * var(--u)); padding: calc(14 * var(--u)) calc(14 * var(--u)) calc((10 + var(--nudge)) * var(--u)) calc(18 * var(--u));
  background: radial-gradient(56% 62% at 14% 42%, rgba(224, 181, 127, 0.16), rgba(224, 181, 127, 0)); }
.cp-peek[data-z="2"] .cp-peek-in { background: radial-gradient(56% 62% at 14% 42%, rgba(245, 120, 110, 0.18), rgba(245, 120, 110, 0)); }
.cp-zi { width: calc(20 * var(--u)); height: calc(20 * var(--u)); flex: none; }
.cp-peek[data-z="1"] .cp-zi:nth-of-type(2), .cp-peek[data-z="2"] .cp-zi:nth-of-type(1) { display: none; }
.cp-scr .cp-peek-in > p, .cp-peek-in > p { display: grid; flex: 1; min-width: 0; margin: 0; }
.cp-peek-in b { font-size: calc(var(--a-subhead) * var(--u)); line-height: calc(20 * var(--u)); font-weight: 590; color: #E0B57F; white-space: nowrap; }
.cp-peek[data-z="2"] .cp-peek-in b { color: #F5BCBB; }
.cp-peek-in small { font-size: calc(var(--a-footnote) * var(--u)); line-height: calc(16 * var(--u)); color: rgba(255, 255, 255, 0.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* his lip (pull.svg): the back panel's fill with the notch at its foot, the chevron in the notch */
.cp-pull { display: block; width: 100%; height: calc(24 * var(--u)); }
.cp-lip { display: block; width: 100%; height: 100%; overflow: visible; }
.cp-lip-f { fill: rgba(255, 255, 255, 0.03); }
.cp-chev { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transform-origin: 179px 18.5px; }
.cp-account.open .cp-chev { transform: rotate(180deg); }
.cp-pager { display: flex; justify-content: center; align-items: center; gap: calc(4 * var(--u)); height: calc(8 * var(--u)); margin-top: calc(16 * var(--u)) !important; }
.cp-pager i { width: calc(6 * var(--u)); height: calc(6 * var(--u)); border-radius: calc(6 * var(--u)); background: rgba(255, 255, 255, 0.4); }
.cp-pager i.on { width: calc(24 * var(--u)); background: #fff; }
.cp-pager b { position: relative; width: calc(8 * var(--u)); height: calc(8 * var(--u)); }
.cp-pager b::before, .cp-pager b::after { content: ""; position: absolute; border-radius: calc(1 * var(--u)); background: #727272; }
.cp-pager b::before { left: 0; top: calc(3 * var(--u)); width: calc(8 * var(--u)); height: calc(2 * var(--u)); }
.cp-pager b::after { left: calc(3 * var(--u)); top: 0; width: calc(2 * var(--u)); height: calc(8 * var(--u)); }

/* his margin gauge, the design that shipped (v4): a half arc in three zones in his 2x pixels (the viewBox), a white needle
   at the level, the level and "Margin" inside. --s is its width in points; --k one of his pixels. Each zone is a filled
   sector stroked in its own colour with round joins, for tiny rounded ends; a mask stroke draws the arc in. */
.cp-gauge { --k: calc(var(--s) / 224 * var(--u)); position: relative; width: calc(224 * var(--k)); height: calc(116 * var(--k)); flex: none; }
.cp-gauge svg { display: block; width: 100%; height: 100%; overflow: visible; font-family: inherit; }
.cp-g-track { fill: none; stroke: #27272F; stroke-width: 1.5; }
.cp-g-z { stroke-width: 4; stroke-linejoin: round; }
.cp-g-draw { fill: none; stroke: #fff; stroke-width: 40; stroke-dasharray: 1000 1000; }
.cp-g-n rect { fill: #fff; }   /* the needle is the band's own depth, flush with both edges */
.cp-g-dim { opacity: 0.32; }      /* the dial past the needle, the part left behind, steps down in tone */
.cp-g-t { text-anchor: middle; font-variant-numeric: tabular-nums; }
.cp-g-pct { fill: #fff; font-size: 25px; font-weight: 500; }
.cp-g-sub { fill: #9A9AA3; font-size: 18px; }

/* his AI search bar (1:30279), the quiet entry to the assistant, in the orb's family (shot notes and references:
   tools/capital/AI-MOTION.md, the search bar). His shape, corners, icon and copy; the craft is in the light:
   1. Glass, not grey: his 6% white fill, a faint warm glow breathing out from the AI mark, a hairline top highlight.
   2. His stroke (measured from his render) as a 1px masked ring, and over it a second ring that carries one soft arc
      of light around the pill every 7s, like light catching an edge (a conic gradient on a registered angle).
   3. The sparkle on his magnifier twinkles as that light passes it (75% of the cycle: the arc points left there).
   Reduced motion: his stroke, still, with no travelling light. */
@property --cp-sa { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.cp-search { position: relative; display: flex; align-items: center; gap: calc(8 * var(--u)); height: calc(56 * var(--u)); margin: calc(24 * var(--u)) calc(7.5 * var(--u)) 0; padding-left: calc(12 * var(--u));
  border-radius: calc(16 * var(--u)); font-size: calc(var(--a-subhead) * var(--u)); line-height: calc(16 * var(--u)); white-space: nowrap; isolation: isolate;
  background: radial-gradient(calc(70 * var(--u)) calc(40 * var(--u)) at calc(28 * var(--u)) 50%, rgba(255, 190, 150, 0.075), rgba(255, 190, 150, 0) 100%),
              linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.05));
  box-shadow: inset 0 1px 0 rgba(255, 245, 235, 0.07), 0 calc(8 * var(--u)) calc(22 * var(--u)) calc(-12 * var(--u)) rgba(0, 0, 0, 0.5); }
.cp-search::before, .cp-search::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.cp-search::before { opacity: 0.6;
  background: conic-gradient(from 0deg, #D8B6C2 0deg, #FFC496 79deg, #FEB2C8 90deg, #EA9AD8 101deg, #C27EAA 120deg, #8E5E6C 241deg, #66443F 259deg, #887299 270deg, #B0A8FE 281deg, #D8B6C2 360deg); }
.cp-search::after { opacity: 0.9; transition: opacity 0.25s;
  background: conic-gradient(from calc(var(--cp-sa) - 40deg), rgba(255, 196, 150, 0) 0deg, rgba(234, 154, 216, 0.35) 18deg, rgba(255, 228, 200, 0.95) 40deg, rgba(176, 168, 254, 0.35) 62deg, rgba(176, 168, 254, 0) 80deg, rgba(0, 0, 0, 0) 360deg);
  animation: cp-sweep 7s linear infinite; }
@keyframes cp-sweep { to { --cp-sa: 360deg; } }
.cp-search .cp-spark { transform-box: fill-box; transform-origin: 50% 50%; animation: cp-twinkle 7s ease-in-out infinite; }
@keyframes cp-twinkle { 0%, 66%, 86%, 100% { transform: scale(1); opacity: 0.9; } 75% { transform: scale(1.4) rotate(45deg); opacity: 1; } }
/* pressed (the finger in the ask stage): a soft compress and the light brightening all round */
.cp-search.press { transform: scale(0.985); transition: transform 0.18s cubic-bezier(.2, .8, .2, 1); }
.cp-search.press::before { opacity: 1; filter: brightness(1.35) saturate(1.15); }
.cp-search.press::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .cp-search::after { display: none; } .cp-search .cp-spark { animation: none; } }
.cp-sr-i .cp-i { width: calc(32 * var(--u)); height: calc(32 * var(--u)); }
/* his portfolio widget (2246:960/970): rows on a 60 pt pitch, his marks at 32 */
.cp-port { margin: calc(16 * var(--u)) calc(2 * var(--u)) 0; padding: calc(16 * var(--u)) calc(14 * var(--u)) 0; border-radius: calc(24 * var(--u)); background: #1E1E29; }
.cp-h { display: flex; align-items: center; gap: calc(6 * var(--u)); font-size: calc(var(--a-body) * var(--u)); font-weight: 600; }
.cp-port .cp-h { gap: calc(4 * var(--u)); height: calc(32 * var(--u)); font-weight: 500; line-height: calc(24 * var(--u)); }
.cp-port .cp-h .cp-i { width: calc(18 * var(--u)); height: calc(18 * var(--u)); }
.cp-port ul { list-style: none; margin: calc(16 * var(--u)) 0 0; padding: 0; display: grid; gap: calc(24 * var(--u)); }
.cp-port li { display: flex; align-items: center; gap: calc(8 * var(--u)); height: calc(36 * var(--u)); }
.cp-port li p { flex: 1; min-width: 0; display: grid; }
.cp-port li b { font-size: calc(var(--a-subhead) * var(--u)); line-height: calc(20 * var(--u)); font-weight: 600; white-space: nowrap; }
.cp-port li small { font-size: calc(var(--a-subhead) * var(--u)); line-height: calc(16 * var(--u)); color: rgba(255, 255, 255, 0.6); }
.cp-port em { font-size: calc(var(--a-body) * var(--u)); line-height: calc(16 * var(--u)); font-weight: 600; font-style: normal; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cp-pv-up { color: #00AAFE; } .cp-pv-dn { color: #EB434E; }
.cp-mk { display: grid; place-items: center; width: calc(34 * var(--u)); height: calc(34 * var(--u)); border-radius: 50%; background: var(--c); flex: none; color: #fff; font-size: calc(var(--a-caption) * var(--u)); font-weight: 700; }
.cp-mk svg { width: 60%; }
.cp-mk.cp-mk-svg { width: calc(32 * var(--u)); height: calc(32 * var(--u)); background: none; }
.cp-mk.cp-mk-svg .cp-i { width: 100%; height: 100%; }
/* his tab bar (2244:12643): 92 pt, glass over the feed, the second of his two shadows */
.cp-tabs { position: absolute; left: 0; right: 0; bottom: 0; height: calc(92 * var(--u)); box-sizing: border-box; display: flex; padding: calc(12 * var(--u)) 0 calc(38 * var(--u));
  border-radius: calc(24 * var(--u)) calc(24 * var(--u)) 0 0; background: rgba(0, 0, 0, 0.2); -webkit-backdrop-filter: blur(32px); backdrop-filter: blur(32px);
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.06); z-index: 5; }
.cp-tab { flex: 1; display: grid; justify-items: center; align-content: start; gap: calc(6 * var(--u)); }
.cp-tab b { font-family: 'InterVariable', 'Inter', -apple-system, system-ui, sans-serif; font-size: calc(var(--a-micro) * var(--u)); line-height: calc(12 * var(--u)); font-weight: 500; color: #fff; }
.cp-tab.on b { color: #FFD8AC; }
.cp-tab:not(.on) .cp-i path { stroke: #fff; }
.cp-home .cp-idx { margin-top: calc(16 * var(--u)); }
.cp-chev { transition: transform 0.26s cubic-bezier(0.32, 0.72, 0, 1) 0.2s; }   /* the chevron flips at the drawer's midpoint */
.cp-account:not(.open) .cp-chev { transition-delay: 0s; }

/* ---------- the market sheet and the deal ticket: his CFD board (Design 1:28776), Module/Trade 2274:19371 and the Deal
   ticket 1:37686, every figure in his points. Sheets stack the iOS way: the one beneath recedes and dims. Motion lives in
   assets/js/capital.js (the ticket stage); without it, nothing that rises is shown. */
.cp-scrn[data-scrn="market"], .cp-scrn[data-scrn="deal"] { background: transparent; }
.cp-veil { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); }
.cp-grab { width: calc(36 * var(--u)); height: calc(5 * var(--u)); border-radius: 3px; background: rgba(255, 255, 255, 0.3); margin: calc(6 * var(--u)) auto 0; }
.cp-mkt, .cp-deal { position: absolute; inset: calc(48 * var(--u)) 0 0; border-radius: calc(24 * var(--u)) calc(24 * var(--u)) 0 0; background: #0C0C16; overflow: hidden;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.cp-mkt::before, .cp-deal::before { content: ""; position: absolute; inset: 0 0 auto; height: calc(220 * var(--u)); background: radial-gradient(90% 100% at 70% 0%, rgba(156, 102, 74, 0.42), transparent 70%); pointer-events: none; }
.cp-mkt > * { position: relative; }
.cp-x { width: calc(32 * var(--u)); height: calc(32 * var(--u)); background: rgba(255, 255, 255, 0.06); }
.cp-x svg, .cp-shx svg { width: calc(24 * var(--u)); height: calc(24 * var(--u)); stroke: none; }
.cp-nb { display: grid; place-items: center; width: calc(32 * var(--u)); height: calc(32 * var(--u)); border-radius: 50%; background: rgba(255, 255, 255, 0.06); flex: none; }
.cp-nb .cp-i, .cp-pill .cp-i { width: calc(16 * var(--u)); height: calc(16 * var(--u)); }
.cp-mnav { display: flex; align-items: center; justify-content: flex-end; gap: calc(8 * var(--u)); padding: calc(8 * var(--u)) calc(16 * var(--u)) 0; }
.cp-pill { display: flex; align-items: center; gap: calc(8 * var(--u)); height: calc(32 * var(--u)); padding: 0 calc(12 * var(--u)) 0 calc(8 * var(--u)); border-radius: 99px; background: rgba(255, 255, 255, 0.06); font-size: calc(var(--a-footnote) * var(--u)); font-weight: 500; line-height: calc(16 * var(--u)); }
.cp-px { display: flex; align-items: center; gap: calc(12 * var(--u)); padding: calc(12 * var(--u)) calc(16 * var(--u)) 0; }
.cp-px .cp-mk { width: calc(32 * var(--u)); height: calc(32 * var(--u)); }
.cp-px p { display: grid; gap: calc(2 * var(--u)); } .cp-px b { font-size: calc(var(--a-body) * var(--u)); font-weight: 500; line-height: calc(22 * var(--u)); } .cp-px small { font-size: calc(var(--a-subhead) * var(--u)); line-height: calc(18 * var(--u)); }

/* his chart: a 375 x 280 frame, the axis at 317, the hours along the foot, the price chip at the Buy price */
.cp-chart { height: calc(280 * var(--u)); margin-top: calc(8 * var(--u)); }
.cp-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cp-grid line { stroke: rgba(255, 255, 255, 0.06); stroke-width: 1; vector-effect: non-scaling-stroke; }
.cp-cdl line { stroke-width: 1; vector-effect: non-scaling-stroke; }
.cp-cdl .up line, .cp-cdl .up rect { stroke: #3D8BFF; fill: #3D8BFF; } .cp-cdl .dn line, .cp-cdl .dn rect { stroke: #E5484D; fill: #E5484D; }
.cp-cdl rect { stroke-width: 0; }
.cp-axis, .cp-times { position: absolute; inset: 0; margin: 0; }
.cp-axis span { position: absolute; left: calc(317 * var(--u)); transform: translateY(-50%); font-size: calc(var(--a-caption) * var(--u)); line-height: 1; color: rgba(255, 255, 255, 0.55); }
.cp-times span { position: absolute; top: calc(260 * var(--u)); transform: translateX(-50%); font-size: calc(var(--a-caption) * var(--u)); line-height: calc(12 * var(--u)); color: rgba(255, 255, 255, 0.55); }
.cp-times span:first-child { transform: none; }   /* the first hour sits on the chart edge: left aligned, never cut by it */
.cp-lastp { position: absolute; left: calc(315.6 * var(--u)); width: calc(51 * var(--u)); height: calc(24 * var(--u)); display: grid; place-items: center; transform: translateY(-50%); border-radius: calc(6 * var(--u)); background: #00AAFE; font-size: calc(var(--a-caption) * var(--u)); font-weight: 600; line-height: calc(12 * var(--u)); }
.cp-indic { position: absolute; left: calc(138 * var(--u)); top: calc(228 * var(--u)); height: calc(20 * var(--u)); padding: 0 calc(8 * var(--u)); display: grid; place-items: center; border-radius: calc(6 * var(--u)); background: rgba(12, 12, 22, 0.72); font-size: calc(var(--a-caption) * var(--u)); line-height: calc(12 * var(--u)); color: rgba(255, 255, 255, 0.4); }
.cp-ranges { display: flex; align-items: center; gap: calc(8 * var(--u)); height: calc(44 * var(--u)); padding: 0 calc(8 * var(--u)); }
.cp-rtabs { flex: 1; display: flex; justify-content: space-between; padding: calc(2 * var(--u)); border-radius: 999px; background: #06060F; }
.cp-rtabs span { display: grid; place-items: center; min-width: calc(40 * var(--u)); height: calc(40 * var(--u)); padding: 0 calc(12 * var(--u)); border-radius: 999px; font-size: calc(var(--a-caption) * var(--u)); font-weight: 500; line-height: calc(16 * var(--u)); letter-spacing: 0.2px; color: rgba(255, 255, 255, 0.6); }
.cp-rtabs .on { background: rgba(255, 255, 255, 0.06); color: #fff; }
.cp-rbtn { display: grid; place-items: center; width: calc(40 * var(--u)); height: calc(40 * var(--u)); border-radius: 50%; background: rgba(255, 255, 255, 0.06); flex: none; }
.cp-rbtn .cp-i { width: calc(16 * var(--u)); height: calc(16 * var(--u)); }

/* the trade module (Module/Trade 2274:19371): 16 above the switch, 16 to the amount and to Sell and Buy, 8 to the margin */
.cp-module { margin: calc(8 * var(--u)) calc(8 * var(--u)) 0; padding: calc(16 * var(--u)); display: grid; gap: calc(16 * var(--u)); }
.cp-mod-cfd { display: grid; gap: calc(16 * var(--u)); }
.cp-module .cp-mreq { margin-top: calc(-8 * var(--u)); }
.cp-ko { text-align: center; padding: calc(10 * var(--u)) 0 calc(4 * var(--u)); display: grid; gap: calc(6 * var(--u)); }
.cp-ko b { font-size: calc(var(--a-body) * var(--u)); font-weight: 600; } .cp-ko p { color: rgba(255, 255, 255, 0.7); font-size: calc(var(--a-subhead) * var(--u)); }
.cp-ko-btn { margin-top: calc(8 * var(--u)); height: calc(48 * var(--u)); border-radius: 99px; background: #fff; color: #0E0F17; font-weight: 600; display: grid; place-items: center; font-size: calc(var(--a-callout) * var(--u)); }

/* the product switch: in a track on the module, bare and ringed in gold on the ticket; one ink is the selection */
.cp-prod { position: relative; display: flex; align-items: center; justify-content: space-between; }
.cp-seg { position: relative; display: flex; align-items: center; gap: calc(8 * var(--u)); height: calc(32 * var(--u)); padding: calc(4 * var(--u)) calc(8 * var(--u)) calc(4 * var(--u)) calc(4 * var(--u)); border-radius: 99px; background: #22222B; }
.cp-seg-ink { position: absolute; top: calc(4 * var(--u)); left: 0; width: 0; height: calc(24 * var(--u)); border-radius: 99px; background: #272730; box-shadow: 0 2px 1px rgba(0, 0, 0, 0.12); }
.cp-seg-i { position: relative; display: flex; align-items: center; gap: calc(4 * var(--u)); height: calc(24 * var(--u)); padding: 0 calc(12 * var(--u)); border-radius: 99px; font-size: calc(var(--a-footnote) * var(--u)); font-weight: 500; line-height: calc(16 * var(--u)); color: rgba(255, 255, 255, 0.6); transition: color 0.3s; white-space: nowrap; }
.cp-seg-i > i { width: calc(8 * var(--u)); height: calc(8 * var(--u)); border-radius: 50%; background: var(--d); flex: none; }
.cp-seg-i.on { color: #fff; }
.cp-seg-i .cp-lock { width: calc(17 * var(--u)); height: calc(16 * var(--u)); }
.cp-seg:not(:has(.cp-seg-ink[style])) .cp-seg-i.on { background: #272730; box-shadow: 0 2px 1px rgba(0, 0, 0, 0.12); }
.cp-prefs { width: calc(32 * var(--u)); height: calc(32 * var(--u)); background: rgba(255, 255, 255, 0.03); }
.cp-prefs svg { width: calc(16 * var(--u)); height: calc(16 * var(--u)); }
.cp-prod.bare { padding: calc(10 * var(--u)) calc(16 * var(--u)) 0; }
.cp-prod.bare .cp-seg { gap: calc(4 * var(--u)); padding: 0; background: none; }
.cp-prod.bare .cp-seg-ink { top: 0; height: calc(32 * var(--u)); background: none; box-shadow: inset 0 0 0 1px rgba(255, 216, 172, 0.25), 0 2px 2px rgba(0, 0, 0, 0.12); }
.cp-prod.bare .cp-seg-i { height: calc(32 * var(--u)); color: #fff; }
.cp-prod.bare .cp-seg:not(:has(.cp-seg-ink[style])) .cp-seg-i.on { background: none; box-shadow: inset 0 0 0 1px rgba(255, 216, 172, 0.25); }

/* the amount (dropdown_rounded--quantity-quick-trade): boxed on the ticket, bare in an exit; gold while it has focus */
.cp-amt { display: flex; align-items: center; height: calc(56 * var(--u)); padding: calc(3 * var(--u)) 0 calc(3 * var(--u)) calc(4 * var(--u)); border-radius: calc(16 * var(--u)); background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.06); transition: box-shadow 0.25s ease; }
.cp-amt.focus { box-shadow: inset 0 0 0 1px rgba(255, 216, 172, 0.7); }
.cp-amt-sw { display: grid; justify-items: center; align-content: center; padding: calc(8 * var(--u)) calc(12 * var(--u)); border-radius: calc(12 * var(--u)); background: rgba(255, 255, 255, 0.06); font-size: calc(var(--a-caption) * var(--u)); font-weight: 500; line-height: calc(16 * var(--u)); flex: none; }
.cp-amt-sw .cp-i { width: calc(16 * var(--u)); height: calc(16 * var(--u)); }
.cp-amt-v { flex: 1; text-align: right; padding: 0 calc(12 * var(--u)) 0 calc(16 * var(--u)); font-size: calc(var(--a-title-l) * var(--u)); line-height: calc(32 * var(--u)); letter-spacing: 0.5px; white-space: nowrap; overflow: hidden; }
.cp-amt.focus .cp-amt-v::after { content: ""; display: inline-block; width: 2px; height: calc(26 * var(--u)); margin: 0 0 0 calc(2 * var(--u)); vertical-align: calc(-5 * var(--u)); border-radius: 1px; background: #E8B793; animation: cp-caret 1.06s steps(1) infinite; }
@keyframes cp-caret { 50% { opacity: 0; } }
.cp-step { display: flex; gap: calc(2 * var(--u)); padding-right: calc(4 * var(--u)); }
.cp-step i { display: grid; place-items: center; width: calc(36 * var(--u)); height: calc(48 * var(--u)); background: rgba(255, 255, 255, 0.06); }
.cp-step i:first-child { border-radius: calc(12 * var(--u)) 0 0 calc(12 * var(--u)); } .cp-step i:last-child { border-radius: 0 calc(12 * var(--u)) calc(12 * var(--u)) 0; }
.cp-step .cp-i { width: calc(24 * var(--u)); height: calc(24 * var(--u)); }
.cp-amt.bare { padding: 0 calc(16 * var(--u)) 0 calc(4 * var(--u)); box-shadow: inset 0 0 0 1px rgba(255, 216, 172, 0.25); }
.cp-amt.bare .cp-amt-v { padding: 0 calc(24 * var(--u)) 0 0; }
.cp-amt.bare .cp-step { gap: calc(16 * var(--u)); padding: 0; } .cp-amt.bare .cp-step i { width: auto; height: auto; background: none; border-radius: 0; }

/* Sell and Buy: on the module (56) and on the ticket (72, the side you are not on in its colour at 20%) */
.cp-bs { display: flex; gap: calc(2 * var(--u)); }
.cp-bs button { flex: 1; display: grid; align-content: center; height: calc(56 * var(--u)); padding: 0 calc(18 * var(--u)); }
.cp-bs span { font-size: calc(var(--a-subhead) * var(--u)); font-weight: 600; line-height: calc(18 * var(--u)); } .cp-bs b { font-size: calc(var(--a-title-s) * var(--u)); font-weight: 700; line-height: calc(26 * var(--u)); letter-spacing: -0.01em; }
.cp-sell { border-radius: calc(16 * var(--u)) calc(4 * var(--u)) calc(4 * var(--u)) calc(16 * var(--u)); background: linear-gradient(90deg, #A60B16, #F26A73); }
.cp-buy { border-radius: calc(4 * var(--u)) calc(16 * var(--u)) calc(16 * var(--u)) calc(4 * var(--u)); background: linear-gradient(270deg, #0D52BF, #4481CB); text-align: right; }
.cp-bs.big button { height: calc(72 * var(--u)); padding: 0 calc(16 * var(--u)); }
.cp-bs.big span { font-size: calc(var(--a-subhead) * var(--u)); font-weight: 400; line-height: calc(16 * var(--u)); } .cp-bs.big b { margin-top: calc(5 * var(--u)); font-size: calc(var(--a-body) * var(--u)); font-weight: 500; line-height: calc(24 * var(--u)); letter-spacing: 0; }
.cp-bs.big .cp-sell { border-radius: calc(16 * var(--u)) calc(4 * var(--u)) 0 0; } .cp-bs.big .cp-buy { border-radius: calc(4 * var(--u)) calc(16 * var(--u)) 0 0; }
.cp-bs.big .cp-sell:not(.on) { background: linear-gradient(90deg, rgba(166, 11, 22, 0.2), rgba(242, 106, 115, 0.2)); color: rgba(255, 255, 255, 0.6); }
.cp-bs.big .cp-buy:not(.on) { background: linear-gradient(270deg, rgba(13, 82, 191, 0.2), rgba(68, 129, 203, 0.2)); color: rgba(255, 255, 255, 0.6); }

/* the margin: Margin required, the ring, Available; the figure in the side's colour */
.cp-mreq, .cp-mrow { display: flex; justify-content: space-between; }
.cp-mreq p, .cp-mrow p { display: grid; gap: calc(2 * var(--u)); align-content: start; }
.cp-mreq .r, .cp-mrow .r { justify-items: end; }
.cp-lab { display: flex; align-items: center; gap: calc(2 * var(--u)); height: calc(24 * var(--u)); font-size: calc(var(--a-subhead) * var(--u)); line-height: calc(16 * var(--u)); color: rgba(255, 255, 255, 0.6); white-space: nowrap; }
.cp-lab .cp-i { width: calc(16 * var(--u)); height: calc(16 * var(--u)); }
.cp-mreq b, .cp-mrow b { font-size: calc(var(--a-subhead) * var(--u)); font-weight: 400; line-height: calc(16 * var(--u)); }
.cp-mreq .r b, .cp-mrow .r b { font-size: calc(var(--a-subhead) * var(--u)); color: #fff; }
.cp-mlv { display: flex; align-items: center; gap: calc(4 * var(--u)); } .cp-mlv em { font-style: normal; } .cp-mlv i { font-style: normal; font-size: calc(var(--a-caption) * var(--u)); font-weight: 500; color: rgba(255, 255, 255, 0.8); }
.cp-mreq .cp-up, .cp-mrow .cp-up, .cp-xfoot .cp-up { color: #00AAFE; } .cp-mreq .cp-dn, .cp-mrow .cp-dn, .cp-xfoot .cp-dn { color: #F45572; }
.cp-ring { position: relative; display: grid; place-items: center; width: calc(42 * var(--u)); height: calc(42 * var(--u)); flex: none; }
.cp-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.cp-ring circle { fill: none; stroke: #A5A5A9; stroke-width: 3.3; } .cp-ring circle.v { stroke: #fff; stroke-linecap: round; }
.cp-ring b { position: relative; font-size: calc(var(--a-footnote) * var(--u)); font-weight: 500; line-height: calc(18 * var(--u)); color: #FAFAFA; }

/* the ticket: tiles on his ground with 2 pt seams, the exits as a pair, the summary fixed to the bottom */
.cp-dscroll { position: absolute; inset: 0; overflow-y: auto; scrollbar-width: none; padding-bottom: calc(164 * var(--u)); overscroll-behavior: contain; }
.cp-dscroll::-webkit-scrollbar { display: none; }
.cp-dhead { display: flex; align-items: center; gap: calc(16 * var(--u)); height: calc(56 * var(--u)); padding: 0 calc(16 * var(--u)); }
.cp-dhead p { flex: 1; display: grid; } .cp-dhead b { font-size: calc(var(--a-subhead) * var(--u)); font-weight: 600; line-height: calc(18 * var(--u)); } .cp-dhead small { font-size: calc(var(--a-callout) * var(--u)); line-height: calc(16 * var(--u)); color: #4E8EE3; }
.cp-tk { display: grid; gap: calc(2 * var(--u)); margin: calc(16 * var(--u)) calc(8 * var(--u)) 0; }
.cp-tile { background: rgba(255, 255, 255, 0.03); }
.cp-tamt { padding: calc(16 * var(--u)); }
.cp-mrow { align-items: flex-start; padding: calc(4 * var(--u)) calc(16 * var(--u)) calc(8 * var(--u)); }
.cp-mrow p { width: calc(130 * var(--u)); } .cp-mrow .cp-ring { margin-top: calc(6 * var(--u)); }
.cp-trow { display: flex; align-items: center; justify-content: space-between; gap: calc(8 * var(--u)); height: calc(56 * var(--u)); padding: 0 calc(16 * var(--u)); font-size: calc(var(--a-body) * var(--u)); font-weight: 500; line-height: calc(24 * var(--u)); }
.cp-limit { border-radius: 0 0 calc(24 * var(--u)) calc(24 * var(--u)); }
.cp-tog { position: relative; width: calc(44 * var(--u)); height: calc(24 * var(--u)); border-radius: 99px; background: #22222B; flex: none; transition: background 0.3s cubic-bezier(0.32, 0.72, 0, 1); }
.cp-tog::after { content: ""; position: absolute; top: calc(2 * var(--u)); left: calc(2 * var(--u)); width: calc(20 * var(--u)); height: calc(20 * var(--u)); border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: transform 0.42s cubic-bezier(0.34, 1.32, 0.64, 1); }
.on > .cp-tog, .cp-exit.on > .cp-trow .cp-tog { background: #BB8961; }
.on > .cp-tog::after, .cp-exit.on > .cp-trow .cp-tog::after { transform: translateX(calc(20 * var(--u))); }
.cp-pair { display: grid; gap: calc(2 * var(--u)); margin: calc(16 * var(--u)) calc(8 * var(--u)) 0; }
.cp-exit[data-exit="sl"] { border-radius: calc(24 * var(--u)) calc(24 * var(--u)) 0 0; } .cp-exit[data-exit="tp"] { border-radius: 0 0 calc(24 * var(--u)) calc(24 * var(--u)); }
.cp-exit > .cp-trow { font-size: calc(var(--a-callout) * var(--u)); }
.cp-xbody { height: 0; overflow: hidden; } .cp-exit.on .cp-xbody { height: auto; }
.cp-xin { display: grid; gap: calc(16 * var(--u)); padding: 0 calc(16 * var(--u)) calc(16 * var(--u)); }
.cp-xsel { display: flex; justify-content: space-between; }
.cp-dd { display: flex; align-items: center; gap: calc(8 * var(--u)); height: calc(32 * var(--u)); padding: 0 calc(12 * var(--u)) 0 calc(16 * var(--u)); border-radius: calc(24 * var(--u)); background: rgba(255, 255, 255, 0.06); font-size: calc(var(--a-footnote) * var(--u)); font-weight: 500; line-height: calc(16 * var(--u)); }
.cp-dd em { font-style: normal; } .cp-dd .cp-i { width: calc(24 * var(--u)); height: calc(24 * var(--u)); }
.cp-xfoot { display: flex; justify-content: space-between; margin: 0; }
.cp-xfoot > span { display: grid; gap: calc(2 * var(--u)); } .cp-xfoot .r { justify-items: end; }
.cp-xl { display: flex; align-items: center; gap: calc(2 * var(--u)); height: calc(24 * var(--u)); font-size: calc(var(--a-subhead) * var(--u)); line-height: calc(16 * var(--u)); color: rgba(255, 255, 255, 0.6); }
.cp-xl .cp-i { width: calc(16 * var(--u)); height: calc(16 * var(--u)); }
.cp-xfoot b { font-size: calc(var(--a-subhead) * var(--u)); font-weight: 400; line-height: calc(16 * var(--u)); color: #fff; }

/* the order summary (1:37808, open 1:27485): a glass panel on the bottom edge that grows upward */
.cp-dfoot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; flex-direction: column; padding: calc(16 * var(--u)) calc(16 * var(--u)) calc(32 * var(--u)); border-radius: calc(24 * var(--u)) calc(24 * var(--u)) 0 0;
  background: rgba(0, 0, 0, 0.2); -webkit-backdrop-filter: blur(calc(32 * var(--u))); backdrop-filter: blur(calc(32 * var(--u))); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.cp-sum-chip { display: inline-flex; align-items: center; gap: calc(8 * var(--u)); align-self: flex-start; height: calc(36 * var(--u)); margin-bottom: calc(16 * var(--u)); padding: calc(2 * var(--u)) calc(12 * var(--u)) calc(2 * var(--u)) calc(2 * var(--u)); border-radius: calc(24 * var(--u)); background: rgba(255, 255, 255, 0.06); font-size: calc(var(--a-caption) * var(--u)); font-weight: 500; line-height: calc(16 * var(--u)); }
.cp-sum-i { width: calc(32 * var(--u)); height: calc(32 * var(--u)); transform: rotate(180deg); }
.cp-dfoot.open .cp-sum-i { transform: none; }
.cp-sum { height: 0; overflow: hidden; margin: 0 calc(-14 * var(--u)); padding: 0 calc(14 * var(--u)); }   /* the clip sits outside the rows, so the close-out pill keeps its padding and round ends */ .cp-dfoot.open .cp-sum { height: auto; }
.cp-sum-in { display: grid; gap: calc(8 * var(--u)); padding-bottom: calc(16 * var(--u)); }
.cp-sum-id { display: flex; align-items: center; gap: calc(16 * var(--u)); }
.cp-sum-id .cp-mk { width: calc(40 * var(--u)); height: calc(40 * var(--u)); }
.cp-sum-id p { display: grid; gap: calc(4 * var(--u)); margin: 0; } .cp-sum-id b { font-size: calc(var(--a-callout) * var(--u)); font-weight: 400; line-height: calc(24 * var(--u)); } .cp-sum-id small { font-size: calc(var(--a-subhead) * var(--u)); line-height: calc(16 * var(--u)); color: rgba(255, 255, 255, 0.6); }
.cp-srow { display: flex; justify-content: space-between; align-items: center; padding: calc(6 * var(--u)) 0; }
.cp-srow span { font-size: calc(var(--a-subhead) * var(--u)); line-height: calc(16 * var(--u)); color: rgba(255, 255, 255, 0.6); } .cp-srow b { font-size: calc(var(--a-body) * var(--u)); font-weight: 400; line-height: calc(16 * var(--u)); }
.cp-srow.cp-co { margin: 0 calc(-14 * var(--u)); padding: calc(6 * var(--u)) calc(14 * var(--u)); border-radius: calc(24 * var(--u)); transition: background 0.45s ease; } .cp-srow.cp-co b { color: #F7C98B; }
.cp-srow.cp-co.hot { background: rgba(247, 201, 139, 0.12); }
.cp-buybtn { display: grid; place-items: center; height: calc(48 * var(--u)); border-radius: 98px; background: #388EE3; font-size: calc(var(--a-callout) * var(--u)); font-weight: 700; line-height: calc(24 * var(--u)); }
.cp-done { position: absolute; left: calc(16 * var(--u)); right: calc(16 * var(--u)); top: calc(54 * var(--u)); z-index: 9; display: flex; align-items: center; gap: calc(12 * var(--u)); padding: calc(12 * var(--u)) calc(14 * var(--u)); border-radius: calc(20 * var(--u));
  background: rgba(28, 35, 51, 0.92); -webkit-backdrop-filter: blur(calc(24 * var(--u))); backdrop-filter: blur(calc(24 * var(--u))); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08); font-size: calc(var(--a-subhead) * var(--u)); line-height: calc(19 * var(--u)); }
.cp-done .cp-mk { width: calc(32 * var(--u)); height: calc(32 * var(--u)); flex: none; } .cp-done p { margin: 0; color: rgba(255, 255, 255, 0.72); } .cp-done b { display: block; color: #fff; font-size: calc(var(--a-subhead) * var(--u)); font-weight: 600; }

/* over the ticket: the dim, the stop loss type (Cells Group 1:27518) and the keypad (his market-keyboard export) */
.cp-dim { position: absolute; inset: 0; z-index: 5; background: rgba(0, 0, 0, 0.4); opacity: 0; visibility: hidden; pointer-events: none; }
.cp-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; padding: calc(16 * var(--u)) calc(16 * var(--u)) calc(40 * var(--u)); border-radius: calc(24 * var(--u)) calc(24 * var(--u)) 0 0; visibility: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)), rgba(30, 30, 36, 0.62); -webkit-backdrop-filter: blur(calc(64 * var(--u))); backdrop-filter: blur(calc(64 * var(--u))); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.cp-shead { display: flex; align-items: center; justify-content: space-between; margin-bottom: calc(16 * var(--u)); }
.cp-shead b { font-size: calc(var(--a-body) * var(--u)); font-weight: 500; line-height: calc(24 * var(--u)); }
.cp-shx { display: grid; place-items: center; width: calc(32 * var(--u)); height: calc(32 * var(--u)); border-radius: 50%; background: rgba(255, 255, 255, 0.06); }
.cp-opts { list-style: none; margin: 0; padding: 0; display: grid; gap: calc(8 * var(--u)); }
.cp-opts li { display: grid; gap: calc(4 * var(--u)); padding: calc(16 * var(--u)); border-radius: calc(24 * var(--u)); background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 0.5px transparent; transition: background 0.3s ease, box-shadow 0.3s ease; }
.cp-opts li.on { background: #13131D; box-shadow: inset 0 0 0 0.5px #fff; }
.cp-opts li p { display: flex; align-items: center; gap: calc(12 * var(--u)); margin: 0; }
.cp-oi { width: calc(20 * var(--u)); height: calc(24 * var(--u)); }
.cp-opts b { font-size: calc(var(--a-body) * var(--u)); font-weight: 500; line-height: calc(24 * var(--u)); } .cp-opts span { padding-left: calc(32 * var(--u)); font-size: calc(var(--a-subhead) * var(--u)); line-height: calc(20 * var(--u)); color: rgba(255, 255, 255, 0.6); }
.cp-kb { position: absolute; left: 0; right: 0; bottom: 0; z-index: 7; padding: calc(8 * var(--u)) calc(6 * var(--u)) calc(34 * var(--u)); background: #27272D; visibility: hidden; }
.cp-pct { display: grid; grid-template-columns: repeat(5, 1fr); justify-items: center; padding-bottom: calc(12 * var(--u)); }
.cp-pct span { display: grid; place-items: center; width: calc(52 * var(--u)); height: calc(32 * var(--u)); border-radius: calc(16 * var(--u)); background: #2E2E34; font-size: calc(var(--a-subhead) * var(--u)); line-height: 1; }
.cp-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(8 * var(--u)) calc(6 * var(--u)); }
.cp-keys span { display: grid; justify-items: center; align-content: center; height: calc(46 * var(--u)); border-radius: calc(5 * var(--u)); background: #5A5A5F; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); }
.cp-keys span.fn { background: none; box-shadow: none; }
.cp-keys b { font-size: calc(var(--a-title-l) * var(--u)); font-weight: 400; line-height: calc(28 * var(--u)); } .cp-keys small { font-size: calc(var(--a-micro) * var(--u)); font-weight: 600; letter-spacing: 0.14em; line-height: calc(11 * var(--u)); }
.cp-keys .cp-sym { font-size: calc(var(--a-title-s) * var(--u)); letter-spacing: 0.12em; }
.cp-bsp { width: calc(28 * var(--u)); height: calc(20 * var(--u)); }
.cp-keys span.press { background: #8E8E93; } .cp-keys span.fn.press { background: #5A5A5F; }
/* the details that make it feel like the app: the typed amount selected on focus, the chevron turning with the panel, Buy working */
.cp-sel { background: rgba(232, 183, 147, 0.34); color: inherit; border-radius: calc(3 * var(--u)); padding: 0 calc(1 * var(--u)); }
.cp-amt.focus .cp-amt-v:has(.cp-sel)::after { display: none; }
.cp-dd em { display: inline-block; }
.cp-sum-i { transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1); }
.cp-buybtn { position: relative; transition: color 0.2s; }
.cp-buybtn.busy { color: transparent; }
.cp-buybtn.busy::after { content: ""; position: absolute; left: 50%; top: 50%; width: calc(20 * var(--u)); height: calc(20 * var(--u)); margin: calc(-10 * var(--u)) 0 0 calc(-10 * var(--u)); border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: cp-spin 0.7s linear infinite; }
@keyframes cp-spin { to { transform: rotate(360deg); } }

/* each screen is its own stacking context, so the home's tab bar never shows through a sheet above it */
.cp-scrn { isolation: isolate; }
.cp-scrn + .cp-scrn { z-index: 1; } .cp-scrn + .cp-scrn + .cp-scrn { z-index: 2; }
.cp-flows .wf-canvas .fb-fsec { padding-top: 92px; }   /* room for his pin beside the title chip, clear of the frames */

/* ---------- round two (the director's critique, 2026-11-14) ---------- */
/* home ends full: available cash and his indices */
.cp-cash { display: flex; justify-content: space-between; align-items: center; margin: calc(24 * var(--u)) calc(-14 * var(--u)) 0 !important; padding: calc(12 * var(--u)) calc(16 * var(--u)); border-radius: 0 0 calc(24 * var(--u)) calc(24 * var(--u)); background: rgba(255, 255, 255, 0.04); }
.cp-cash span { display: grid; color: rgba(255, 255, 255, 0.6); } .cp-cash small { font-size: calc(var(--a-caption) * var(--u)); } .cp-cash b { font-weight: 600; }
.cp-idx { padding: calc(16 * var(--u)); }
.cp-idx-t { display: flex; gap: calc(6 * var(--u)); margin: calc(10 * var(--u)) 0 !important; font-size: calc(var(--a-footnote) * var(--u)); color: rgba(255, 255, 255, 0.7); }
.cp-idx-t span { padding: calc(5 * var(--u)) calc(11 * var(--u)); border-radius: 99px; } .cp-idx-t .on { background: rgba(255, 255, 255, 0.1); color: #fff; }
.cp-idx ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.cp-idx li { display: grid; gap: calc(2 * var(--u)); font-size: calc(var(--a-footnote) * var(--u)); } .cp-idx li span { color: rgba(255, 255, 255, 0.6); } .cp-idx li b { font-size: calc(var(--a-callout) * var(--u)); font-weight: 500; } .cp-idx em { font-style: normal; }
/* his boards on the canvas */
.cp-canvas .fb-canvas { padding: 8px 0 24px; }
.cp-fsec { position: relative; padding: 108px 40px 44px; background: #fff; border: 1px solid rgba(20, 18, 40, 0.08); }
.cp-fsec-dark { background: #0C0C14; } .cp-fsec-dark .fb-fsec-t { background: rgba(255, 255, 255, 0.1); color: #fff; }
.cp-fsec-dark .ph-name { color: #fff; } .cp-fsec-dark .ph-small { color: rgba(255, 255, 255, 0.66); }
.cp-canvas .cp-cmps { grid-template-columns: repeat(3, minmax(0, 260px)); }
@media (max-width: 700px) { .cp-fsec { padding: 72px 16px 28px; } }
.cp-princ li { align-content: start; }
.ph .cp-sws li { align-content: start; }

/* the comparison grabs only under a press: a grab cursor, the handle lifts a touch while held */
.cp-cmp-dev { cursor: grab; } .cp-cmp.drag .cp-cmp-dev { cursor: grabbing; }
.cp-cmp-h i { transition: transform 0.25s cubic-bezier(.22, 1, .36, 1), box-shadow 0.25s ease; }
.cp-cmp.drag .cp-cmp-h i { transform: scale(1.08); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45); }
/* his pin on the dark boards: the note reads in ink on its white bubble (it inherited the board's light text) */
.cp-page .ph .cm-txt { color: #55555F; }

/* ---------- DESIGN SYSTEM: the margin alert's four states (tools/builder/kits/capital_ds.py margin_states), one tile
   across the board: the real account card in each state, two by two at a readable size, its rule beneath ---------- */
.cb-mstates { margin-top: 12px; }
.cb-mst { grid-column: 1 / -1; }
.ph .cb-mstl { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; align-items: start; }
.cb-mstl li { display: grid; gap: 14px; container-type: inline-size; }
.cb-mst-ui { --u: min(1.2px, 100cqw / 358); }   /* two by two, so the alert reads at its own size */
.cb-mst-ui .cp-account { margin: 0; }
.cb-mstl .ph-small b { display: block; color: #fff; font-weight: 600; }
@media (max-width: 640px) { .ph .cb-mstl { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

/* ---------- VALUES THAT CHANGE (capital.js odo and slide, Arash 2026-11-14: never fade an input to show a change).
   A value is one cell per character: only the characters that change roll, inside their own cell. A label slides to
   its new words inside a box that springs to fit. A focused field brightens its edge and shows the caret before its
   value changes. A toggle's knob travels with a slight squash. Figures that recalculate count in tabular figures. */
.cp-oc { display: inline-block; position: relative; white-space: pre; clip-path: inset(0 -0.06em); }
.cp-oc > .cp-og { display: inline-block; margin: 0; padding: 0; font: inherit; color: inherit; background: none; }
.cp-oc > .cp-og-in { position: absolute; left: 0; top: 0; }
.cp-sliding { position: relative; white-space: nowrap; clip-path: inset(0 -2px); }
.cp-sliding > .cp-sl { display: inline-block; white-space: nowrap; }
.cp-sliding > .cp-sl + .cp-sl { position: absolute; left: 0; top: 0; bottom: 0; display: flex; align-items: center; }
.cp-amt.bare.focus { box-shadow: inset 0 0 0 1px rgba(255, 216, 172, 0.7); }
.cp-amt-v, [data-margin], [data-ring], .cp-xfoot b, .cp-srow b, .cp-mlv, [data-eq-whole], [data-eq-cents], [data-perf], [data-perf-pct], [data-pv], [data-d="cash"] { font-variant-numeric: tabular-nums; }
.cp-exit.on > .cp-trow .cp-tog.go::after { animation: cp-knob 0.46s cubic-bezier(0.3, 0.7, 0.2, 1) both; transform-origin: 50% 50%; }
@keyframes cp-knob { 0% { transform: translateX(0) scaleX(1); } 40% { transform: translateX(calc(9 * var(--u))) scaleX(1.28) scaleY(0.92); } 100% { transform: translateX(calc(20 * var(--u))) scaleX(1); } }
.cp-snap .cp-tog, .cp-snap .cp-tog::after, .cp-snap .cp-amt, .cp-snap .cp-srow { transition: none !important; }

/* The refresh on a phone (Arash, 2026-11-27: a slider to drag inside a row to swipe was two gestures, too much
   effort): one comparison, Home, as Before and Capital 2.0 side by side. Seen at a glance, nothing to drag or swipe. */
@media (max-width: 700px) {
  body.phone-cut .ph .cp-cmps.m-swipe { display: block; overflow: visible; margin: 0; padding: 0; }
  body.phone-cut .cp-cmp:not(:first-child), body.phone-cut .cp-cmps + .m-dots { display: none; }
  body.phone-cut .cp-cmp-dev { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; aspect-ratio: auto; overflow: visible; border-radius: 0; background: none; touch-action: auto; cursor: default; }
  body.phone-cut .cp-cmp-dev img { position: static; width: 100%; height: auto; aspect-ratio: 375 / 812; border-radius: 9% / 4.2%; clip-path: none; }
  body.phone-cut .cp-cmp-h { display: none; }
  body.phone-cut .cp-cmp-tag { bottom: 10px; } body.phone-cut .cp-cmp-tag.l { left: 10px; } body.phone-cut .cp-cmp-tag.r { left: calc(50% + 16px); right: auto; }
}
