/* ---------------------------------------------------------------
   Wealth platform case loop. An advisor's workspace at a design
   size of 1440x900 inside .cw-fit, scaled to the frame width.
   Only .cw-cam moves (scale + translate) for the camera pushes.
   Transforms and opacity only. Every colour and face is a token.
   The frame is wider than the home page loops (about 1325px on
   the case page), so anything meant to be read is 16px or more
   at design size; labels and ticks are the only smaller type.
   --------------------------------------------------------------- */
.demo[data-demo="case-wealth"] { background: var(--ink-0); }

.cw-fit {
  position: absolute; top: 0; left: 0; width: 1440px; height: 900px;
  transform-origin: 0 0; background: var(--ink-0);
}
.cw-fit * { box-sizing: border-box; }
.cw-fit p, .cw-fit h4 { margin: 0; }
.cw-fit svg { display: block; }

.cw-cam {
  position: absolute; top: 0; left: 0; width: 1440px; height: 900px;
  transform-origin: 0 0; overflow: hidden;
  font-family: var(--font-body); font-size: 16px; line-height: 1.5;
  font-weight: 400; color: var(--text-on-ink);
  -webkit-font-smoothing: antialiased;
}
.cw-app { position: absolute; inset: 0; background: var(--ink-0); }

/* kicker labels, the only type allowed under 16px on the screen */
.cw-k {
  font-family: var(--font-display); font-size: 11px; font-weight: 500; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--text-on-ink-faint);
}
.cw-mono { font-family: var(--font-mono); letter-spacing: 0.04em; }
.cw-panel { background: var(--ink-2); border: 1px solid var(--ink-line); border-radius: 6px; }

/* ---------- rail ---------- */
.cw-rail {
  position: absolute; top: 0; left: 0; bottom: 0; width: 232px;
  background: var(--ink-1); border-right: 1px solid var(--ink-line); padding: 28px 0 0;
}
.cw-brand {
  padding: 0 28px; font-family: var(--font-display); font-size: 16px; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-on-ink); line-height: 1.3;
}
.cw-brand b { color: var(--accent); font-weight: 400; }
.cw-brand__s { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--text-on-ink-faint); text-transform: none; }
.cw-nav { position: relative; margin-top: 36px; }
.cw-nav__i {
  position: relative; display: flex; align-items: center; height: 48px; padding: 0 28px;
  font-size: 16px; color: var(--text-on-ink-muted);
}
.cw-nav__i em { margin-left: auto; font-style: normal; font-family: var(--font-mono); font-size: 12px; color: var(--text-on-ink-faint); }
.cw-nav__ind {
  position: absolute; left: 0; top: 0; width: 232px; height: 48px;
  background: rgba(233, 230, 223, 0.05); border-left: 2px solid var(--accent); pointer-events: none;
}
.cw-rail__foot {
  position: absolute; left: 28px; right: 28px; bottom: 28px; padding-top: 16px;
  border-top: 1px solid var(--ink-line); font-size: 12px; color: var(--text-on-ink-faint); line-height: 1.6;
}
.cw-rail__foot b { display: block; font-size: 16px; color: var(--text-on-ink-muted); font-weight: 400; }

/* ---------- top bar ---------- */
.cw-top {
  position: absolute; top: 0; left: 232px; right: 0; height: 60px;
  display: flex; align-items: center; gap: 18px; padding: 0 36px;
  background: var(--ink-1); border-bottom: 1px solid var(--ink-line);
}
.cw-top__crumb { font-family: var(--font-display); font-size: 16px; letter-spacing: 0.14em; text-transform: uppercase; }
.cw-top__crumb span { color: var(--text-on-ink-faint); }
.cw-top__search {
  margin-left: auto; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 14px;
  border: 1px solid var(--ink-line-strong); border-radius: 4px; font-size: 12px; letter-spacing: 0.04em;
  color: var(--text-on-ink-faint); white-space: nowrap;
}
.cw-top__search svg { width: 12px; height: 12px; color: var(--text-on-ink-faint); }
.cw-avatar {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--ink-line-strong); flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 11px; letter-spacing: 0.06em; color: var(--text-on-ink-faint);
}

/* ---------- panes ---------- */
.cw-main { position: absolute; top: 60px; left: 232px; right: 0; bottom: 0; }
.cw-pane { position: absolute; inset: 0; padding: 36px; opacity: 0; }
.cw-pane--client { opacity: 1; }
.cw-pane__h { display: flex; align-items: baseline; gap: 18px; margin-bottom: 20px; }
.cw-pane__t { font-family: var(--font-display); font-size: 24px; font-weight: 300; letter-spacing: 0.1em; text-transform: uppercase; }
.cw-pane__s { font-size: 16px; color: var(--text-on-ink-muted); }
.cw-cols { display: flex; gap: 28px; align-items: flex-start; }
.cw-col--l { width: 700px; flex: none; }
.cw-col--r { width: 408px; flex: none; }

/* status dots: brass = live or done, faint = pending, hollow = in progress */
.cw-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.cw-dot--idle { background: var(--text-on-ink-faint); }

/* ---------- the client record (arrival, beats 1 and 3, seam) ---------- */
.cw-client { position: relative; display: flex; align-items: flex-start; gap: 28px; height: 112px; margin-bottom: 22px; }
.cw-client__n { font-family: var(--font-display); font-size: 34px; font-weight: 300; letter-spacing: 0.04em; line-height: 1.1; }
.cw-client__m { font-size: 16px; color: var(--text-on-ink-muted); margin-top: 6px; }
.cw-chips { display: flex; gap: 8px; margin-top: 12px; }
.cw-chip {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--text-on-ink-faint);
  border: 1px solid var(--ink-line-strong); border-radius: 3px; padding: 3px 9px; white-space: nowrap;
}
.cw-chip--on { color: var(--accent); border-color: var(--accent); }
.cw-client__v { margin-left: auto; text-align: right; flex: none; }
.cw-client__v b { display: block; font-family: var(--font-mono); font-size: 32px; font-weight: 400; color: var(--text-on-ink); line-height: 1.15; margin-top: 4px; }
.cw-client__v span { font-family: var(--font-mono); font-size: 12px; color: var(--text-on-ink-faint); letter-spacing: 0.04em; }
/* the "one record" tag that beat 1 leaves behind, beside the name */
.cw-one {
  position: absolute; left: 200px; top: 6px; display: flex; align-items: center; gap: 12px; opacity: 0;
}
.cw-one__t {
  padding: 5px 10px; border-radius: 999px; background: var(--accent); color: var(--ink-0);
  font-family: var(--font-display); font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
}
.cw-one__s { font-family: var(--font-mono); font-size: 16px; color: var(--text-on-ink); letter-spacing: 0.02em; }

.cw-hold { padding: 22px 26px 8px; height: 342px; }
.cw-hold__h { display: flex; align-items: baseline; gap: 16px; margin-bottom: 14px; }
.cw-hold__h span:last-child { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--text-on-ink-faint); }
.cw-alloc { display: flex; gap: 3px; height: 8px; border-radius: 2px; overflow: hidden; margin-bottom: 8px; }
.cw-alloc i { display: block; height: 100%; background: var(--text-on-ink-faint); opacity: 0.5; }
.cw-alloc i:first-child { background: var(--accent); opacity: 1; }
.cw-alloc i:nth-child(2) { background: var(--accent); opacity: 0.55; }
.cw-hrow { display: flex; align-items: center; height: 48px; border-top: 1px solid var(--ink-line); font-size: 16px; }
.cw-hrow--h { height: 34px; border-top: 0; }
.cw-hc { flex: none; }
.cw-hc--n { flex: 1; }
.cw-hc--k { width: 150px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-on-ink-faint); }
.cw-hc--w { width: 90px; font-family: var(--font-mono); font-size: 16px; color: var(--text-on-ink-muted); }
.cw-hc--v { width: 130px; text-align: right; font-family: var(--font-mono); font-size: 16px; }
.cw-hrow--h .cw-hc { font-family: var(--font-display); font-size: 11px; font-weight: 500; letter-spacing: 0.26em; text-transform: uppercase; color: var(--text-on-ink-faint); }

.cw-act { margin-top: 24px; padding: 22px 26px 10px; height: 250px; }
.cw-arow { display: flex; align-items: center; gap: 16px; height: 52px; border-top: 1px solid var(--ink-line); font-size: 16px; }
.cw-arow:first-of-type { border-top: 0; }
.cw-arow em { margin-left: auto; font-style: normal; font-family: var(--font-mono); font-size: 12px; color: var(--text-on-ink-faint); white-space: nowrap; }
.cw-arow span { color: var(--text-on-ink-muted); }

.cw-rec { padding: 22px 24px 18px; min-height: 616px; }
.cw-rec__h { display: flex; align-items: baseline; gap: 16px; margin-bottom: 8px; }
.cw-rec__h span:last-child { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: 0.06em; }
.cw-field { position: relative; padding: 12px 0 11px; border-top: 1px solid var(--ink-line); }
.cw-field:first-of-type { border-top: 0; }
.cw-field__k { display: block; font-family: var(--font-display); font-size: 11px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-on-ink-faint); margin-bottom: 3px; }
.cw-field__v { font-size: 16px; color: var(--text-on-ink); }
.cw-field__v i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin: 0 8px 2px 0; }
.cw-docs { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--ink-line-strong); }
.cw-doc { display: flex; align-items: center; gap: 10px; height: 40px; font-size: 16px; color: var(--text-on-ink-muted); }
.cw-doc svg { width: 12px; height: 15px; color: var(--text-on-ink-faint); flex: none; }
.cw-doc em { margin-left: auto; font-style: normal; font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: 0.06em; }

/* the lineage popover, beat 3. Rises below its field, inside the record. */
.cw-lin {
  position: absolute; left: -14px; top: calc(100% + 10px); width: 384px; z-index: 12; padding: 16px 18px 14px;
  background: var(--ink-3); border: 1px solid var(--accent); border-radius: 6px; opacity: 0;
}
.cw-lin::before {
  content: ""; position: absolute; left: 40px; top: -6px; width: 10px; height: 10px;
  background: var(--ink-3); border-left: 1px solid var(--accent); border-top: 1px solid var(--accent); transform: rotate(45deg);
}
.cw-lin__h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cw-lin__h .cw-k { color: var(--accent); }
.cw-lrow { display: flex; gap: 14px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--ink-line); font-size: 16px; line-height: 1.4; }
.cw-lrow:first-of-type { border-top: 0; }
.cw-lrow b { flex: none; width: 84px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-on-ink-faint); font-weight: 400; }
.cw-lrow span { color: var(--text-on-ink); }

/* ---------- beat 1: the seven tools, scattered then collapsed ---------- */
.cw-scrim { position: absolute; inset: 0; z-index: 8; background: rgba(7, 9, 12, 0.7); opacity: 0; }
.cw-tool {
  position: absolute; z-index: 9; width: 264px; padding: 14px 18px 12px; opacity: 0;
  background: var(--ink-2); border: 1px solid var(--ink-line-strong); border-radius: 6px;
}
.cw-tool__n { font-size: 16px; color: var(--text-on-ink); line-height: 1.3; }
.cw-tool__w { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-on-ink-faint); margin-top: 4px; }
.cw-tool__c { display: flex; align-items: center; gap: 8px; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--ink-line); font-family: var(--font-mono); font-size: 16px; color: var(--text-on-ink-muted); }
.cw-tool__c i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- beat 2: onboarding ---------- */
.cw-steps { padding: 6px 0 0; }
.cw-step { position: relative; display: flex; align-items: center; gap: 20px; height: 80px; padding: 0 26px; border-top: 1px solid var(--ink-line); }
.cw-step:first-child { border-top: 0; }
.cw-step__c { position: relative; width: 30px; height: 30px; flex: none; }
.cw-step__c span { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--ink-line-strong); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 12px; color: var(--text-on-ink-faint); }
.cw-step__c span.is-done { background: var(--accent); border-color: var(--accent); color: var(--ink-0); opacity: 0; }
.cw-step__c svg { width: 14px; height: 14px; }
.cw-step__b { flex: 1; min-width: 0; }
.cw-step__t { font-size: 18px; line-height: 1.3; }
.cw-step__d { font-size: 16px; color: var(--text-on-ink-muted); margin-top: 2px; }
.cw-step__s { position: relative; width: 150px; height: 24px; flex: none; }
.cw-step__s span { position: absolute; right: 0; top: 0; font-family: var(--font-mono); font-size: 16px; color: var(--text-on-ink-faint); white-space: nowrap; }
.cw-step__s span.is-done { color: var(--accent); opacity: 0; }
.cw-sit { padding: 22px 24px 22px; }
.cw-sit__t { font-family: var(--font-mono); font-size: 44px; font-weight: 400; letter-spacing: 0.04em; color: var(--text-on-ink); line-height: 1.1; margin-top: 12px; }
.cw-sit__l { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-on-ink-faint); margin-top: 4px; }
.cw-sit__g { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--ink-line); }
.cw-sit__g b { display: block; font-family: var(--font-mono); font-size: 24px; font-weight: 400; color: var(--text-on-ink); line-height: 1.2; }
.cw-sit__g span { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-on-ink-faint); margin-top: 3px; }
.cw-sit__a { position: relative; margin-top: 26px; }
.cw-btn {
  display: flex; align-items: center; justify-content: center; height: 52px; border-radius: 4px;
  background: var(--accent); color: var(--ink-0); font-family: var(--font-display); font-size: 13px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
}
.cw-stamp {
  position: absolute; right: -14px; top: -22px; padding: 7px 14px; border: 2px solid var(--accent); border-radius: 4px;
  font-family: var(--font-display); font-size: 16px; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent); transform: rotate(-8deg); opacity: 0; background: var(--ink-2);
}
.cw-sit__done { margin-top: 16px; font-size: 16px; color: var(--text-on-ink-muted); line-height: 1.5; opacity: 0; }
.cw-sit__done b { color: var(--accent); font-weight: 400; }

/* ---------- beat 4: the knowledge hub ---------- */
.cw-search {
  display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 22px;
  background: var(--ink-2); border: 1px solid var(--ink-line-strong); border-radius: 6px;
}
.cw-search svg { width: 16px; height: 16px; color: var(--text-on-ink-faint); flex: none; }
.cw-search__q { font-size: 20px; color: var(--text-on-ink); white-space: pre; }
.cw-caret { display: inline-block; width: 2px; height: 24px; background: var(--accent); vertical-align: -4px; margin-left: 2px; }
.cw-search__n { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--text-on-ink-faint); letter-spacing: 0.06em; white-space: nowrap; opacity: 0; }
.cw-res { margin-top: 20px; }
.cw-hit { padding: 18px 24px 16px; margin-top: 12px; opacity: 0; }
.cw-hit__k { display: flex; align-items: center; gap: 12px; }
.cw-hit__t { font-size: 18px; line-height: 1.3; margin-top: 6px; }
.cw-hit__d { font-size: 16px; color: var(--text-on-ink-muted); margin-top: 4px; line-height: 1.5; }
.cw-hit--top { border-color: var(--accent); }
.cw-guide { padding: 22px 24px 20px; }
.cw-guide__n { font-family: var(--font-display); font-size: 24px; font-weight: 300; letter-spacing: 0.04em; margin-top: 10px; line-height: 1.15; }
.cw-guide__r { font-size: 16px; color: var(--text-on-ink-muted); margin-top: 4px; }
.cw-guide__l { margin-top: 18px; padding-top: 8px; border-top: 1px solid var(--ink-line); }
.cw-gi { display: flex; align-items: center; gap: 14px; height: 52px; border-top: 1px solid var(--ink-line); font-size: 16px; }
.cw-gi:first-child { border-top: 0; }
.cw-gi__c { position: relative; width: 24px; height: 24px; flex: none; }
.cw-gi__c span { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--ink-line-strong); display: flex; align-items: center; justify-content: center; }
.cw-gi__c span.is-done { background: var(--accent); border-color: var(--accent); color: var(--ink-0); opacity: 0; }
.cw-gi__c svg { width: 12px; height: 12px; }
.cw-gi em { margin-left: auto; font-style: normal; font-family: var(--font-mono); font-size: 12px; color: var(--text-on-ink-faint); white-space: nowrap; }
.cw-gi--pending { color: var(--text-on-ink-muted); }
.cw-guide__s { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--ink-line); font-family: var(--font-mono); font-size: 16px; color: var(--text-on-ink-muted); line-height: 1.7; }
.cw-guide__s b { font-weight: 400; color: var(--accent); }

/* ---------- cursor and ring ---------- */
.cw-cursor { position: absolute; left: 0; top: 0; width: 20px; height: 26px; z-index: 30; color: var(--text-on-ink); opacity: 0; }
.demo[data-demo="case-wealth"] .cw-ring { border-radius: 8px; box-shadow: 0 0 0 3px rgba(201, 168, 106, 0.12); z-index: 14; }

/* Captions: the ink chip with the brass rule, sized above the 0.9rem
   floor at every frame width. Two clauses each, so a little wider. */
.demo[data-demo="case-wealth"] .demo__caption {
  background: rgba(7, 9, 12, 0.88);
  border-left: 2px solid var(--accent);
  padding: 9px 16px 9px 14px;
  border-radius: 2px;
  max-width: 72%;
  line-height: 1.5;
  font-size: clamp(0.9rem, 1.1cqw, 1.05rem);
}
