/* ============================================================
   Case management — /platform/case-management/
   Page-scoped additions on top of the shared capability template
   (/styles/pages/capability.css, .p-capability). Loaded AFTER it, so
   these rules win on equal specificity. Everything is scoped to
   .p-capability--case-management so it never bleeds to sibling
   /platform/ pages sharing capability.css.

   Storytelling fix (2026-07-31): the cap-walk's four yellow placeholders
   are built out as light, wireframe-style DASHBOARD window mockups
   (white bg · grey skeleton shapes · hairlines · one blue accent each),
   so Nacim sees the intended screenshot in place — the escalation rule,
   the shared queue table, the Single Session View with evidence, and the
   audit-trail timeline. Each tile keeps its data-ph id and a small
   "Mockup" corner chip so it stays identifiable + greppable until the
   real Case Management product art lands. Tokens only (passes the gate).
   Mirrors the sanctioned pattern on workflow-builder.css.
   ============================================================ */

/* page root — shared custom properties.
   --cmm-ava-glyph: the canonical person glyph, copied verbatim from
   public/icons/user.svg (uniform 1.6 stroke), used as a mask inside every
   .cmm-ava chip so people render as one consistent user icon (ronda 3). */
.p-capability--case-management {
  --cmm-ava-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.941 20C5.941 17.891 7.605 15.266 12.4 15.266C17.194 15.266 18.858 17.872 18.858 19.982'/%3E%3Cpath d='M16.526 8.126C16.526 10.404 14.679 12.251 12.4 12.251C10.122 12.251 8.275 10.404 8.275 8.126C8.275 5.847 10.122 4 12.4 4C14.679 4 16.526 5.847 16.526 8.126Z'/%3E%3C/svg%3E");
}

/* ---- placeholder identity: greppable + unmistakably a mockup ---- */
.p-capability--case-management .cm-mock__chip {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--color-placeholder-yellow);
  color: var(--color-black);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
}
/* the designer-intent description (the old "Imagen (…)" tag) stays in the DOM
   for grep + the VISUALS-TODO barrido, but visually hidden behind the mockup */
.p-capability--case-management .cm-mock__intent {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---- mockup frame: the cap-tile becomes a light dashboard window ----
   Keep cap-tile on the slot so capability.css's :nth-child(even) row swap
   still alternates the media left/right, but replace its dot-grid frame with a
   clean window (title bar + body). */
.p-capability--case-management .cap-tile.cm-mock {
  padding: 0;
  gap: 0;
  aspect-ratio: var(--ph-ar, 16 / 9);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background-color: var(--color-white);
  background-image: none;
  border: 1px solid var(--color-border-light);
  overflow: hidden;
}

/* window title bar (traffic lights + a tab) */
.p-capability--case-management .cmm-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 32px;
  padding: 0 13px;
  background: var(--color-grey-50);
  border-bottom: 1px solid var(--color-border-light);
}
.p-capability--case-management .cmm-lights { display: inline-flex; gap: 5px; }
.p-capability--case-management .cmm-lights i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-grey-200);
}
.p-capability--case-management .cmm-tab {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 9px;
  border-radius: 6px;
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  font-size: 11px;
  color: var(--color-grey-400);
}

/* window body */
.p-capability--case-management .cmm-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px 20px;
}

/* ---- shared skeleton + chrome primitives ---- */
.p-capability--case-management .cmm-sk {
  display: block;
  height: 7px;
  border-radius: 4px;
  background: var(--color-grey-100);
}
.p-capability--case-management .cmm-sk--w40 { width: 40%; }
.p-capability--case-management .cmm-sk--w50 { width: 52%; }
.p-capability--case-management .cmm-sk--w60 { width: 62%; }
.p-capability--case-management .cmm-sk--w70 { width: 72%; }
.p-capability--case-management .cmm-sk--w90 { width: 90%; }
/* avatar — the canonical person treatment (ronda 3): the site icon-set user
   glyph (public/icons/user.svg path, uniform stroke) masked inside a light
   circular chip. Same class + size everywhere a person appears (queue
   assignees, reviewer note, journey card, timeline actors) so people read
   consistently and match the Workflow Builder illustration system. Replaces
   the old empty grey dot. Mask = alpha only, so it never introduces a colour. */
.p-capability--case-management .cmm-ava {
  position: relative;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-grey-100);
  border: 1px solid var(--color-border-light);
}
.p-capability--case-management .cmm-ava::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-grey-400);
  -webkit-mask: var(--cmm-ava-glyph) center / 12px 12px no-repeat;
  mask: var(--cmm-ava-glyph) center / 12px 12px no-repeat;
}
/* status chips — the single blue accent lives in the "review"/"pass" states */
.p-capability--case-management .cmm-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
/* product-accurate status colours (same semantic ramp the real dashboard
   uses, all tokens): amber = needs review · blue = in review · green = pass ·
   grey = pending/resolved. The single blue "accent" of the G13 illustration
   style stays reserved for actions (buttons, active rail node); status chips
   read like the product. */
.p-capability--case-management .cmm-status--review {
  color: var(--color-amber-600);
  background: var(--color-amber-100);
}
.p-capability--case-management .cmm-status--progress {
  color: var(--color-blue-500);
  background: var(--color-blue-100);
}
.p-capability--case-management .cmm-status--pass {
  color: var(--color-green-600);
  background: var(--color-green-100);
}
.p-capability--case-management .cmm-status--resolved,
.p-capability--case-management .cmm-status--pending {
  color: var(--color-grey-400);
  background: var(--color-grey-50);
  border: 1px solid var(--color-border-light);
}

/* ============================================================
   v1 · smart escalation — rule → Needs review + Case opened
   ============================================================ */
.p-capability--case-management .cmm-body--esc {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
}
.p-capability--case-management .cmm-rulecard {
  width: min(280px, 84%);
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 13px 14px;
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  box-shadow: none;
}
.p-capability--case-management .cmm-rulecard__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--color-border-light);
}
.p-capability--case-management .cmm-rulecard__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-grey-300);
}
.p-capability--case-management .cmm-rulecard__title {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-grey-500);
}
.p-capability--case-management .cmm-cond {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  background: var(--color-grey-50);
}
.p-capability--case-management .cmm-chip-sk {
  flex: 0 0 auto;
  height: 12px;
  width: 84px;
  border-radius: 4px;
  background: var(--color-grey-100);
  border: 1px solid var(--color-grey-200);
}
.p-capability--case-management .cmm-chip-sk--sm { width: 44px; }
.p-capability--case-management .cmm-op { font-size: 11px; color: var(--color-grey-400); }
.p-capability--case-management .cmm-and {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-grey-400);
}
.p-capability--case-management .cmm-arrow { color: var(--color-grey-300); }
.p-capability--case-management .cmm-outcome {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.p-capability--case-management .cmm-caseopened {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-grey-500);
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
}
.p-capability--case-management .cmm-caseopened__plus {
  display: inline-grid;
  place-items: center;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--color-grey-100);
  color: var(--color-grey-500);
  font-size: 11px;
  line-height: 1;
}

/* ============================================================
   v2 · one shared queue — Case Management table of flagged sessions
   ============================================================ */
.p-capability--case-management .cmm-body--queue {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.p-capability--case-management .cmm-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
}
.p-capability--case-management .cmm-search {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--color-grey-50);
  border: 1px solid var(--color-border-light);
  color: var(--color-grey-300);
}
.p-capability--case-management .cmm-search .cmm-sk { width: 44%; }
.p-capability--case-management .cmm-chip-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  font-size: 11px;
  color: var(--color-grey-400);
}
.p-capability--case-management .cmm-count {
  flex: 0 0 auto;
  width: 30px;
  height: 12px;
  border-radius: 4px;
  background: var(--color-grey-100);
}
.p-capability--case-management .cmm-table {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border-light);
  border-radius: 10px;
  overflow: hidden;
}
.p-capability--case-management .cmm-row {
  display: grid;
  grid-template-columns: 94px 1.25fr 1fr 0.66fr;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border-top: 1px solid var(--color-border-light);
}
.p-capability--case-management .cmm-row:first-child { border-top: 0; }
.p-capability--case-management .cmm-row--head { background: var(--color-grey-50); }
.p-capability--case-management .cmm-row--head span {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-grey-400);
  letter-spacing: var(--track-wide);
}
.p-capability--case-management .cmm-cell-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   v3 · the full case, one screen — Single Session View
   ============================================================ */
.p-capability--case-management .cmm-body--case {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 14px;
  align-items: stretch;
}
.p-capability--case-management .cmm-panel__label {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: var(--track-wide);
  color: var(--color-grey-400);
  margin-bottom: 9px;
}
.p-capability--case-management .cmm-case-left {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  background: var(--color-grey-50);
}
.p-capability--case-management .cmm-id {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border: 1px solid var(--color-border-light);
  border-radius: 10px;
  background: var(--color-white);
}
.p-capability--case-management .cmm-id__photo {
  flex: 0 0 auto;
  width: 44px;
  height: 34px;
  border-radius: 6px;
  background: var(--color-grey-100);
  border: 1px solid var(--color-grey-200);
}
.p-capability--case-management .cmm-id__lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}
.p-capability--case-management .cmm-evrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--color-border-light);
  border-radius: 10px;
  background: var(--color-white);
}
.p-capability--case-management .cmm-selfie__face {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-grey-100);
  border: 1px solid var(--color-grey-200);
}
.p-capability--case-management .cmm-check {
  flex: 0 0 auto;
  position: relative;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--color-grey-100);
  border: 1px solid var(--color-grey-200);
}
.p-capability--case-management .cmm-check::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 3px;
  height: 6px;
  border: solid var(--color-grey-400);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.p-capability--case-management .cmm-evrow .cmm-sk { flex: 1 1 auto; }
.p-capability--case-management .cmm-history {
  margin-top: 2px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.p-capability--case-management .cmm-hrow {
  display: flex;
  align-items: center;
  gap: 9px;
}
.p-capability--case-management .cmm-hrow .cmm-sk { flex: 1 1 auto; }
.p-capability--case-management .cmm-hdot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-grey-300);
}
.p-capability--case-management .cmm-case-right {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.p-capability--case-management .cmm-scores {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px 13px;
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  background: var(--color-white);
}
.p-capability--case-management .cmm-score {
  display: flex;
  align-items: center;
  gap: 10px;
}
.p-capability--case-management .cmm-score__lbl {
  flex: 0 0 auto;
  width: 66px;
  height: 7px;
  border-radius: 4px;
  background: var(--color-grey-100);
}
.p-capability--case-management .cmm-meter {
  flex: 1 1 auto;
  height: 7px;
  border-radius: 999px;
  background: var(--color-grey-100);
  overflow: hidden;
}
.p-capability--case-management .cmm-meter__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--color-grey-300);
}
.p-capability--case-management .cmm-meter__fill--a { width: 86%; }
.p-capability--case-management .cmm-meter__fill--b { width: 72%; }
.p-capability--case-management .cmm-meter__fill--c { width: 64%; }
.p-capability--case-management .cmm-review {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 12px 13px;
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  background: var(--color-white);
}
.p-capability--case-management .cmm-note {
  display: flex;
  align-items: center;
  gap: 9px;
}
.p-capability--case-management .cmm-note .cmm-sk { flex: 1 1 auto; }
.p-capability--case-management .cmm-decide { display: flex; gap: 8px; }
.p-capability--case-management .cmm-btn {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}
.p-capability--case-management .cmm-btn--pass {
  color: var(--color-white);
  background: var(--color-blue);
  border: 1px solid var(--color-blue);
}
.p-capability--case-management .cmm-btn--fail {
  color: var(--color-grey-400);
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
}

/* ============================================================
   v4 · a trail auditors trust — case-history timeline + export
   ============================================================ */
.p-capability--case-management .cmm-body--trail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.p-capability--case-management .cmm-trail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.p-capability--case-management .cmm-trail-head .cmm-sk { width: 40%; height: 9px; }
.p-capability--case-management .cmm-export {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-grey-500);
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
}
.p-capability--case-management .cmm-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.p-capability--case-management .cmm-event {
  position: relative;
  display: grid;
  grid-template-columns: 12px 18px 1fr auto;
  align-items: center;
  gap: 10px;
}
.p-capability--case-management .cmm-event__rail {
  position: relative;
  width: 12px;
  align-self: stretch;
  min-height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.p-capability--case-management .cmm-event__rail::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -14px;
  bottom: -14px;
  width: 2px;
  transform: translateX(-50%);
  background: var(--color-grey-100);
}
.p-capability--case-management .cmm-event:first-child .cmm-event__rail::before { top: 50%; }
.p-capability--case-management .cmm-event:last-child .cmm-event__rail::before { bottom: 50%; }
.p-capability--case-management .cmm-node-dot {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2px solid var(--color-grey-300);
}
.p-capability--case-management .cmm-event--decision .cmm-node-dot {
  border-color: var(--color-green-600);
  background: var(--color-green-600);
}
.p-capability--case-management .cmm-event__body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.p-capability--case-management .cmm-time {
  justify-self: end;
  width: 38px;
  height: 9px;
  border-radius: 4px;
  background: var(--color-grey-100);
}

/* ---- narrow screens: let the mockups shrink gracefully ---- */
@media (max-width: 600px) {
  .p-capability--case-management .cmm-body { padding: 14px; }
  .p-capability--case-management .cmm-body--case { grid-template-columns: 1fr; }
  .p-capability--case-management .cmm-row { grid-template-columns: 84px 1fr 0.7fr 0.6fr; gap: 9px; }
}

/* ============================================================
   THE JOURNEY OF A CASE  (#case-journey · cm-journey / cmj-*)
   Ronda 2 · G14 — the interactive product centrepiece. One dashboard
   window; a single case card travels a 4-station rail (Flagged → In
   review → Decided → Audited) while a detail panel swaps the matching
   product view. Section shell + window chrome mirror the sanctioned
   plat-builder (workflow-builder). Behaviour: case-management-journey.js.
   Tokens only; the one blue accent lives in actions + the active node.
   ============================================================ */

/* section shell (mirrors plat-builder metrics) */
.p-capability--case-management .cm-journey {
  border-top: 1px solid var(--color-border-light);
  background: var(--color-background);
}
.p-capability--case-management .cm-journey__inner {
  margin-inline: auto;
  width: 100%;
  max-width: var(--container-large);
  padding: var(--space-section-sm) var(--space-inline);
  text-align: center;
}
@media (min-width: 768px) {
  .p-capability--case-management .cm-journey__inner { padding-block: var(--space-section); }
}
@media (min-width: 1024px) {
  .p-capability--case-management .cm-journey__inner { padding-inline: 24px; }
}
.p-capability--case-management .cm-journey__intro {
  margin: 16px auto 0;
  max-width: 640px;
  font-size: var(--fs-body);
  line-height: var(--leading-body);
  color: var(--color-grey-on-white);
}
.p-capability--case-management .cm-journey__more {
  margin: 22px auto 0;
  max-width: 640px;
  font-size: var(--fs-sm);
  line-height: var(--leading-body);
  color: var(--color-grey-on-white);
}
.p-capability--case-management .cm-journey__more a {
  color: var(--color-blue-500);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* the dashboard window */
.p-capability--case-management .cmj-window {
  position: relative;
  margin-top: 40px;
  text-align: left;
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: 16px;
  box-shadow: none;
  overflow: hidden;
}

/* title bar */
.p-capability--case-management .cmj-titlebar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--color-border-light);
}
.p-capability--case-management .cmj-lights { display: inline-flex; gap: 6px; flex-shrink: 0; }
.p-capability--case-management .cmj-lights i { width: 10px; height: 10px; border-radius: 999px; }
.p-capability--case-management .cmj-lights i:nth-child(1) { background: var(--color-red-400); }
.p-capability--case-management .cmj-lights i:nth-child(2) { background: var(--color-amber-600); }
.p-capability--case-management .cmj-lights i:nth-child(3) { background: var(--color-green-600); }
.p-capability--case-management .cmj-wintitle {
  flex: 1;
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--color-grey-400);
}
.p-capability--case-management .cmj-titlebar-spacer { width: 42px; flex-shrink: 0; }

/* stage */
.p-capability--case-management .cmj-stage { padding: 26px 24px 10px; }

/* ---- the rail: a case card travelling over four stations ---- */
.p-capability--case-management .cmj-rail {
  position: relative;
  padding-top: 52px;
}
.p-capability--case-management .cmj-card {
  position: absolute;
  top: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: min(240px, 64%);
  padding: 8px 12px;
  background: var(--color-white);
  border: 1px solid var(--color-grey-100);
  border-radius: 12px;
  box-shadow: none;
  white-space: nowrap;
  /* 5 stations: centers at 10% + k·20% (was 12.5% + k·25% at 4) */
  left: clamp(104px, calc(10% + 20% * var(--cmj-i, 0)), calc(100% - 104px));
  transform: translateX(-50%);
  transition: left 0.55s var(--ease-out-expo);
}
.p-capability--case-management .cmj-card::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 9px;
  height: 9px;
  transform: translateX(-50%) rotate(45deg);
  background: var(--color-white);
  border-right: 1px solid var(--color-grey-100);
  border-bottom: 1px solid var(--color-grey-100);
}
.p-capability--case-management .cmj-card__meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}
.p-capability--case-management .cmj-card__meta b {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-black);
}
.p-capability--case-management .cmj-card__meta small {
  font-size: 10px;
  color: var(--color-grey-400);
}

.p-capability--case-management .cmj-stations {
  position: relative;
  display: flex;
}
.p-capability--case-management .cmj-track {
  position: absolute;
  top: 15px;
  left: 10%;
  right: 10%;
  height: 2px;
  border-radius: 999px;
  background: var(--color-grey-100);
  z-index: 0;
}
.p-capability--case-management .cmj-track__fill {
  display: block;
  height: 100%;
  width: calc(25% * var(--cmj-i, 0));
  border-radius: 999px;
  background: var(--color-blue-500);
  transition: width 0.55s var(--ease-out-expo);
}
/* the optional detour (Paper Widget D3): a dashed arc loops off the
   main track between In review and Decided, apexing over Escalate */
.p-capability--case-management .cmj-detour-arc {
  position: absolute;
  left: 30%;
  width: 40%;
  top: -12px;
  height: 28px;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}
.p-capability--case-management .cmj-detour-arc path {
  fill: none;
  stroke: var(--color-blue-200);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 3 5;
}
.p-capability--case-management .cmj-station {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}
.p-capability--case-management .cmj-station__dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--color-white);
  border: 1.5px solid var(--color-grey-200);
  color: var(--color-grey-300);
  transition: border-color 0.3s, background-color 0.3s, color 0.3s, box-shadow 0.3s;
}
.p-capability--case-management .cmj-station__name {
  font-size: var(--fs-xs);
  color: var(--color-grey-400);
  transition: color 0.3s;
}
.p-capability--case-management .cmj-station.is-done .cmj-station__dot {
  border-color: var(--color-blue-500);
  background: var(--color-blue-100);
  color: var(--color-blue-500);
}
.p-capability--case-management .cmj-station.is-active .cmj-station__dot {
  border-color: var(--color-blue-500);
  background: var(--color-blue-500);
  color: var(--color-white);
  box-shadow: 0 0 0 4px var(--color-blue-100);
}
.p-capability--case-management .cmj-station.is-active .cmj-station__name {
  color: var(--color-black);
  font-weight: 500;
}
.p-capability--case-management .cmj-station:hover:not(.is-active) .cmj-station__dot {
  border-color: var(--color-grey-300);
  color: var(--color-grey-400);
}
/* the Escalate station is a choice, not a stage every case passes:
   dashed ring + "Optional" micro-label (solid when active/done) */
.p-capability--case-management .cmj-station--detour .cmj-station__dot { border-style: dashed; }
.p-capability--case-management .cmj-station--detour.is-active .cmj-station__dot,
.p-capability--case-management .cmj-station--detour.is-done .cmj-station__dot { border-style: solid; }
.p-capability--case-management .cmj-station__opt {
  margin-top: -5px;
  font-size: 10px;
  color: var(--color-grey-300);
  letter-spacing: var(--track-wide);
}
.p-capability--case-management .cmj-station--detour.is-active .cmj-station__opt { color: var(--color-grey-400); }

/* ---- detail panels: grid-stacked so the window never jumps ---- */
.p-capability--case-management .cmj-panels {
  display: grid;
  margin-top: 22px;
}
.p-capability--case-management .cmj-panel {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.4fr);
  gap: 24px;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.4s ease, visibility 0.4s, transform 0.5s var(--ease-out-expo);
}
.p-capability--case-management .cmj-panel.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.p-capability--case-management .cmj-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  font-size: var(--fs-xs);
  letter-spacing: var(--track-wide);
  color: var(--color-blue-500);
}
.p-capability--case-management .cmj-lead {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: var(--track-tight);
  font-size: var(--fs-xl);
  line-height: 1.4;
  color: var(--color-black);
}

/* the panel's product view sits in a light framed screen */
.p-capability--case-management .cmj-panel__viz {
  min-height: 214px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  background: var(--color-grey-50);
}
.p-capability--case-management .cmj-viz--esc { align-items: center; }
.p-capability--case-management .cmj-viz--esc .cmm-rulecard { width: min(300px, 94%); }
.p-capability--case-management .cmj-viz--esc .cmm-outcome { justify-content: center; }

.p-capability--case-management .cmj-viz--case {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  justify-content: initial;
}
.p-capability--case-management .cmj-case-left,
.p-capability--case-management .cmj-case-right {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.p-capability--case-management .cmj-viz--decide { align-items: center; }
.p-capability--case-management .cmj-decidecard {
  width: min(320px, 96%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
}
.p-capability--case-management .cmj-decidecard__sum {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}
.p-capability--case-management .cmj-decidecard__sum .cmm-sk { flex: 1 1 auto; }
.p-capability--case-management .cmj-decidecard .cmm-decide { flex: 0 0 auto; width: 128px; }
.p-capability--case-management .cmj-confirm {
  width: min(320px, 96%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px 9px 14px;
  border-radius: 10px;
  background: var(--color-blue-100);
  border: 1px solid var(--color-blue-200);
}
.p-capability--case-management .cmj-confirm__q {
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--color-grey-600);
}
.p-capability--case-management .cmj-confirm__go {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--color-blue-500);
  color: var(--color-white);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.p-capability--case-management .cmj-viz--trail { gap: 14px; }

/* the escalate panel: the one-click escalation card (vocabulary from
   the real dashboard's Escalation modal) */
.p-capability--case-management .cmj-viz--handoff { align-items: center; }
.p-capability--case-management .cmm-escmodal {
  width: min(320px, 96%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px 16px;
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
}
.p-capability--case-management .cmm-escmodal__title {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--color-black);
}
.p-capability--case-management .cmm-escmodal__sub {
  margin-top: -6px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--color-grey-400);
}
.p-capability--case-management .cmm-escmodal__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.p-capability--case-management .cmm-escmodal__lbl {
  font-size: 10px;
  letter-spacing: var(--track-wide);
  color: var(--color-grey-400);
}
.p-capability--case-management .cmm-escmodal__val {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  background: var(--color-white);
  font-size: 11px;
  font-weight: 500;
  color: var(--color-grey-600);
}
.p-capability--case-management .cmm-escmodal__val svg { color: var(--color-grey-300); flex: 0 0 auto; }
.p-capability--case-management .cmm-escmodal__val--sk { justify-content: flex-start; }
.p-capability--case-management .cmm-escmodal__val--sk .cmm-sk { width: 62%; }
.p-capability--case-management .cmm-escmodal__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 2px;
}
.p-capability--case-management .cmm-escmodal__cancel {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border: 1px solid var(--color-grey-200);
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--color-grey-600);
}
.p-capability--case-management .cmm-escmodal__go {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--color-blue-500);
  color: var(--color-white);
  font-size: var(--fs-xs);
  font-weight: 600;
}

/* ---- controls ---- */
.p-capability--case-management .cmj-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 14px 20px 16px;
  border-top: 1px solid var(--color-border-light);
  background: var(--color-grey-50);
}
.p-capability--case-management .cmj-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--color-grey-200);
  border-radius: 999px;
  background: var(--color-white);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-grey-600);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, opacity 0.2s, box-shadow 0.2s;
}
.p-capability--case-management .cmj-nav:hover:not(:disabled) {
  border-color: var(--color-blue-500);
  color: var(--color-blue-500);
}
.p-capability--case-management .cmj-nav:disabled { opacity: 0.5; cursor: default; }
.p-capability--case-management .cmj-nav--primary {
  background: var(--color-blue-500);
  border-color: var(--color-blue-500);
  color: var(--color-white);
}
.p-capability--case-management .cmj-nav--primary:hover:not(:disabled) {
  color: var(--color-white);
  box-shadow: none;
}
.p-capability--case-management .cmj-count {
  min-width: 40px;
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--color-grey-400);
  font-variant-numeric: tabular-nums;
}

/* reduced motion — the loop is off in JS; also freeze the transitions */
@media (prefers-reduced-motion: reduce) {
  .p-capability--case-management .cmj-window *,
  .p-capability--case-management .cmj-card,
  .p-capability--case-management .cmj-track__fill,
  .p-capability--case-management .cmj-panel {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* narrow screens */
@media (max-width: 767px) {
  .p-capability--case-management .cmj-wintitle { display: none; }
  .p-capability--case-management .cmj-stage { padding: 22px 16px 8px; }
  .p-capability--case-management .cmj-panel { grid-template-columns: 1fr; gap: 16px; }
  .p-capability--case-management .cmj-viz--case { grid-template-columns: 1fr; }
  .p-capability--case-management .cmj-card__meta small { display: none; }
  .p-capability--case-management .cmj-card::after { display: none; }
  .p-capability--case-management .cmj-station__name { font-size: 10px; }
  .p-capability--case-management .cmj-station__opt { display: none; }
}

/* ============================================================
   § cmh — hero visual: "Chaos into order" (Paper Hero D2, Arturo
   2026-08-10). Scattered flagged sessions converge into the one
   queue. The split hero mirrors wfbh-hero / axh-hero; the scene is
   a fixed 720×560 stage: 3 loose cards (left) + one SVG wire
   overlay + the queue window (right), positions in % of the stage.

   States (behavior: /js/behaviors/case-management-hero.js):
     (base)     POSTER — the composed frame: cards parked, row A
                landed hot at the top of the queue, "48 cases". No
                wires at rest (Arturo, 2026-08-10 round 2: leftover
                dashed lines pointed at nothing once cards left).
                This is the no-JS AND the reduced-motion frame; JS
                only leaves it when it is actually going to animate.
     .is-live   reset: arrival rows collapsed, cards floating,
                count 45 (JS-set).
     .is-s1/2/3 arrival N: wire N GROWS in fast (blue, then fades
                out fully — the flight connector, not furniture),
                loose card N lifts off toward the window, row N
                snaps in hot; the previous arrival settles (hot
                rules are :not()-chained to the next phase).
     .is-done   everything settled; clean queue until restart.
   Motion bar (animations.dev): steep custom curves, arrivals read
   in under ~0.7s, whole loop ~8.2s. Only transform/opacity/height
   animate (height on the 44px rows is a deliberate, tiny layout
   cost — the snap-in IS the message).
   ============================================================ */

/* --- split hero (the wfbh/axh grid; family type scale, no step-down) --- */
.p-capability--case-management .cmh-hero { display: grid; gap: 40px; align-items: center; }
.p-capability--case-management .cmh-copy { min-width: 0; }
.p-capability--case-management .cmh {
  width: 100%;
  max-width: 520px; /* the shared /platform/ visual envelope (2026-08-17) */
  margin-top: 8px;
}
@media (min-width: 1024px) {
  .p-capability--case-management .cmh-hero {
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
    column-gap: 48px;
  }
  /* The copy column narrows beside the visual, so the 24ch clamp comes off
     and the title takes the column. It KEEPS the family 56px: the size
     step-down that used to live here (40px @1024 / 44px @1440) was retired
     2026-08-10 — and unlike the other two split heroes this page needed NO
     copy change to lose it. "One hub to review, resolve, and track" already
     holds 2 lines at 56px at 1024/1280/1440 (measured); the step-down had
     been copied from workflow-builder as precedent without checking whether
     this h1 actually needed it. Every /platform/ page now shares one scale
     (36 / 48 / 56 from capability.css).
     Retitling? Re-measure at all three gates — 1280 is tightest (453px
     column) and the limit is rendered width, not character count. */
  .p-capability--case-management .cmh-copy .cap-hero__title { max-width: 100%; }
  .p-capability--case-management .cmh-copy .cap-hero__sub { max-width: 100%; }
  .p-capability--case-management .cmh {
    max-width: 640px;
    margin-top: 0;
    justify-self: end;
  }
}

/* --- the stage: one coordinate system for cards, wires, window --- */
.p-capability--case-management .cmh-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 720 / 560;
}

/* --- wires --- */
.p-capability--case-management .cmh-wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
/* the flight connector: grows in fast (steep ease-out, the growth
   front-loaded), then fades out FULLY — no wire survives at rest */
.p-capability--case-management .cmh-wire__draw {
  stroke: var(--color-blue-500);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
}
@keyframes cmh-wire-draw {
  0%   { stroke-dashoffset: 1; opacity: 0.9; }
  55%  { stroke-dashoffset: 0; opacity: 0.9; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
.p-capability--case-management .cmh.is-live.is-s1 .cmh-wire--1 .cmh-wire__draw,
.p-capability--case-management .cmh.is-live.is-s2 .cmh-wire--2 .cmh-wire__draw,
.p-capability--case-management .cmh.is-live.is-s3 .cmh-wire--3 .cmh-wire__draw {
  animation: cmh-wire-draw 0.8s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

/* --- loose session cards (the chaos) --- */
/* the MORPH SURFACE (animations.dev choreography): the card is one
   clipping box carrying two anchored content faces. The behavior
   FLIP-animates the box onto the opened row slot (width, height,
   radius, rotation via WAAPI — measured, so the landing is exact at
   any viewport width); the faces only CROSSFADE, they never move.
   Both faces get a JS-frozen px width at launch so the shrinking /
   growing surface clips them instead of reflowing them. */
.p-capability--case-management .cmh-loose {
  position: absolute;
  width: 30%;
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  box-shadow: none;
  overflow: hidden;
  transition: opacity 0.4s ease 0.1s;
}
/* face 1 — the loose card (anchored top-left, fades out at launch) */
.p-capability--case-management .cmh-loose__as-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 9px 10px;
  padding: 12px 14px;
  transition: opacity 0.15s ease;
}
.p-capability--case-management .cmh-loose__lines {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* the chip takes its own line so the skeleton lines keep their room */
.p-capability--case-management .cmh-loose__as-card .cmm-status { grid-column: 1 / -1; justify-self: start; }
/* face 2 — the row it becomes (anchored to the landing edge, exact
   .cmh-row anatomy, fades in mid-flight) */
.p-capability--case-management .cmh-loose__as-row {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  opacity: 0;
  transition: opacity 0.2s ease 0.18s;
}
.p-capability--case-management .cmh-loose__as-row .cmh-row__dot { background: var(--color-blue-500); }
.p-capability--case-management .cmh-loose.is-flying {
  animation: none;
  translate: 0 0;
  transition: translate 0.2s ease;
  /* the traveler IS the row until touchdown — it must ride above the
     window (positioned siblings otherwise stack by DOM order and the
     window paints over the whole second half of the flight) */
  z-index: 3;
}
.p-capability--case-management .cmh-loose.is-flying .cmh-loose__as-card { opacity: 0; }
.p-capability--case-management .cmh-loose.is-flying .cmh-loose__as-row { opacity: 1; }
/* landed: the real row took over — vanish instantly, return on reset */
.p-capability--case-management .cmh-loose.is-flown {
  opacity: 0;
  visibility: hidden;
  transition: none;
}
.p-capability--case-management .cmh-loose--1 { left: 0;  top: 8%;  transform: rotate(-6deg); }
.p-capability--case-management .cmh-loose--2 { left: 4%; top: 42%; transform: rotate(4deg); }
.p-capability--case-management .cmh-loose--3 { left: 1%; top: 72%; transform: rotate(-3deg); }
/* ambient float while parked (live only — the poster is still) */
@keyframes cmh-float {
  50% { translate: 0 -6px; }
}
.p-capability--case-management .cmh.is-live .cmh-loose { animation: cmh-float 6s ease-in-out infinite; }
.p-capability--case-management .cmh.is-live .cmh-loose--2 { animation-delay: -2s; }
.p-capability--case-management .cmh.is-live .cmh-loose--3 { animation-delay: -4s; }
/* (departure is no longer CSS-driven — the behavior FLIP-animates the
   surface onto the measured row slot via WAAPI; see § header) */

/* --- the queue window (the order) --- */
.p-capability--case-management .cmh-win {
  position: absolute;
  top: 3%;
  right: 0;
  width: 62%;
  text-align: left;
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: 16px;
  box-shadow: none;
  overflow: hidden;
}
.p-capability--case-management .cmh-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border-light);
}
.p-capability--case-management .cmh-lights { display: inline-flex; gap: 5px; flex-shrink: 0; }
.p-capability--case-management .cmh-lights i { width: 8px; height: 8px; border-radius: 999px; }
.p-capability--case-management .cmh-lights i:nth-child(1) { background: var(--color-red-400); }
.p-capability--case-management .cmh-lights i:nth-child(2) { background: var(--color-amber-600); }
.p-capability--case-management .cmh-lights i:nth-child(3) { background: var(--color-green-600); }
.p-capability--case-management .cmh-wintitle {
  flex: 1;
  margin: 0;
  text-align: center;
  /* 10px (the chip floor) so the full "Incode dashboard · Case
     management" fits the ~290px window at the 1440 gate — 11px still
     ellipsized */
  font-size: 10px;
  color: var(--color-grey-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.p-capability--case-management .cmh-titlebar-sp { width: 28px; flex-shrink: 0; }
.p-capability--case-management .cmh-win__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 6px;
}
.p-capability--case-management .cmh-win__title {
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: var(--track-tight);
  color: var(--color-black);
}
.p-capability--case-management .cmh-count {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--color-blue-100);
  color: var(--color-blue-500);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* --- queue rows --- */
.p-capability--case-management .cmh-rows { padding: 10px 12px 14px; }
.p-capability--case-management .cmh-row {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  margin-top: 8px;
  padding: 0 12px;
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: 10px;
  overflow: hidden;
  transition:
    height 0.35s cubic-bezier(0.25, 1, 0.5, 1),
    margin-top 0.35s cubic-bezier(0.25, 1, 0.5, 1),
    opacity 0.3s ease,
    background-color 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}
.p-capability--case-management .cmh-row:first-child { margin-top: 0; }
.p-capability--case-management .cmh-row__dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--color-amber-600);
  transition: background-color 0.5s ease;
}
.p-capability--case-management .cmh-row__dot--rest { background: var(--color-grey-200); }
.p-capability--case-management .cmh-row__trail {
  margin-left: auto;
  flex: 0 0 auto;
  width: 44px;
}
/* the landed-hot treatment: the poster's row A, and each live
   arrival from TOUCHDOWN (.is-lN, added when the morph finishes —
   not while the slot is still empty) until the next phase begins */
.p-capability--case-management .cmh-row--a,
.p-capability--case-management .cmh.is-live.is-l1:not(.is-s2) .cmh-row--a,
.p-capability--case-management .cmh.is-live.is-l2:not(.is-s3) .cmh-row--b,
.p-capability--case-management .cmh.is-live.is-l3:not(.is-done) .cmh-row--c {
  background: var(--color-blue-100);
  border-color: var(--color-blue-200);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-blue-500) 10%, transparent);
}
.p-capability--case-management .cmh-row--a .cmh-row__dot,
.p-capability--case-management .cmh.is-live.is-l1:not(.is-s2) .cmh-row--a .cmh-row__dot,
.p-capability--case-management .cmh.is-live.is-l2:not(.is-s3) .cmh-row--b .cmh-row__dot,
.p-capability--case-management .cmh.is-live.is-l3:not(.is-done) .cmh-row--c .cmh-row__dot {
  background: var(--color-blue-500);
}
/* poster: B and C wait collapsed; A is landed (rules above) */
.p-capability--case-management .cmh-row--b,
.p-capability--case-management .cmh-row--c {
  height: 0;
  margin-top: 0;
  opacity: 0;
  border-color: transparent;
  box-shadow: none;
}
/* live reset: all three arrivals collapsed, A no longer hot */
.p-capability--case-management .cmh.is-live .cmh-row--a,
.p-capability--case-management .cmh.is-live .cmh-row--b,
.p-capability--case-management .cmh.is-live .cmh-row--c {
  height: 0;
  margin-top: 0;
  opacity: 0;
  background: var(--color-white);
  border-color: transparent;
  box-shadow: none;
}
.p-capability--case-management .cmh.is-live .cmh-row--a .cmh-row__dot { background: var(--color-amber-600); }
/* arrivals, step 1 — the phase opens the SLOT (empty: the space is
   made while the surface flies toward it; contents stay hidden) */
.p-capability--case-management .cmh.is-live.is-s1 .cmh-row--a,
.p-capability--case-management .cmh.is-live.is-s2 .cmh-row--b,
.p-capability--case-management .cmh.is-live.is-s3 .cmh-row--c {
  height: 44px;
  margin-top: 8px;
  opacity: 1;
  border-color: var(--color-border-light);
}
.p-capability--case-management .cmh.is-live .cmh-row--a > *,
.p-capability--case-management .cmh.is-live .cmh-row--b > *,
.p-capability--case-management .cmh.is-live .cmh-row--c > * {
  opacity: 0;
  transition: opacity 0.25s ease;
}
/* arrivals, step 2 — touchdown (.is-lN): the traveler vanishes, the
   real row's contents take over in place (hot ring rides the
   :not()-chained rules above; settling is those rules un-matching) */
.p-capability--case-management .cmh.is-live.is-l1 .cmh-row--a > *,
.p-capability--case-management .cmh.is-live.is-l2 .cmh-row--b > *,
.p-capability--case-management .cmh.is-live.is-l3 .cmh-row--c > * {
  opacity: 1;
}

/* --- narrow: the queue window rides alone, in flow --- */
@media (max-width: 639px) {
  .p-capability--case-management .cmh-wires,
  .p-capability--case-management .cmh-loose { display: none; }
  .p-capability--case-management .cmh-stage { aspect-ratio: auto; }
  .p-capability--case-management .cmh-win {
    position: static;
    width: 100%;
  }
}

/* --- reduced motion: the poster, still --- */
@media (prefers-reduced-motion: reduce) {
  .p-capability--case-management .cmh-loose,
  .p-capability--case-management .cmh-row,
  .p-capability--case-management .cmh-wire__draw {
    animation: none;
    transition: none;
  }
}

/* ============================================================
   § cmw — how it works: the console-window walk (Paper wall,
   Arturo 2026-08-10). sol-how rail (solution.css scaffold) + ONE
   persistent dashboard window whose body swaps a scene per step —
   the frame never crossfades (the axw house rule), so the section
   reads as one dashboard session progressing.

   Scenes (state .is-sN on [data-cmw-stage], .is-active on the
   scene): 0 the rule fires · 1 no more spreadsheets · 2 context
   orbit · 3 the escalation moment · 4 the audit trail
   (placeholder pending the S05 pick). Each scene's one-shot story
   replays on activation (animations keyed to .is-active).
   Morph grammar (site-wide): 0.45s cubic-bezier(0.23,1,0.32,1)
   crossfades; entrances ease-out-cubic cubic-bezier(0.215,0.61,
   0.355,1); the orbit docking rides the HERO's flight recipe —
   cubic-bezier(0.32,0.72,0,1) at 0.55s, staggered (Arturo:
   "reuse the animation we already have on the hero in terms of
   behavior and timing"). Behavior:
   /js/behaviors/case-management-how.js. No JS → .is-s0 baked.
   ============================================================ */

/* --- jump-free rail (the axw override): every description opens to
   the same measured height (--cmw-reveal-h, tallest line, set by JS) */
.p-cmw .sol-how__reveal {
  display: block;
  height: 0;
  overflow: hidden;
  transition: height 0.45s cubic-bezier(0.23, 1, 0.32, 1);
}
.p-cmw .sol-how__step.is-active .sol-how__reveal {
  height: var(--cmw-reveal-h, 78px);
}
.p-cmw .sol-how__line { padding-top: 10px; }
.p-solution.p-cmw .sol-flow-wrap.is-float .sol-how__step.is-active .sol-how__reveal {
  height: var(--cmw-reveal-h, 78px);
}
.p-cmw .sol-flow-wrap.is-float .sol-how__stage.is-revealed {
  opacity: 1;
  transform: none;
}

/* --- the stage: the one console window, full column --- */
.p-cmw .sol-how__stage { width: 100%; padding: 32px 20px; }
.p-cmw .cmw { display: flex; justify-content: center; }
.p-cmw .cmw__win {
  width: min(560px, 100%);
  text-align: left;
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: 16px;
  box-shadow: none;
  overflow: hidden;
}
.p-cmw .cmw__body {
  position: relative;
  display: grid;
  padding: 26px 24px;
  min-height: 330px;
}
.p-cmw .cmw__scene {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  min-width: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.45s cubic-bezier(0.23, 1, 0.32, 1), visibility 0.45s, transform 0.45s cubic-bezier(0.23, 1, 0.32, 1);
}
.p-cmw .cmw__scene.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* --- s0 · the rule fires: conditions light, the outcome pops --- */
.p-cmw .cmw__scene--rule { align-items: center; }
.p-cmw .cmw__rule { width: min(300px, 94%); }
.p-cmw .cmw__scene--rule .cmm-outcome { justify-content: center; }
@keyframes cmw-cond-fire {
  0%, 45% { border-color: var(--color-border-light); box-shadow: none; }
  60% { border-color: var(--color-blue-500); box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-blue-500) 12%, transparent); }
  100% { border-color: var(--color-blue-200); box-shadow: none; }
}
.p-cmw .cmw__scene--rule.is-active .cmw__cond--1 { animation: cmw-cond-fire 1s ease both; }
.p-cmw .cmw__scene--rule.is-active .cmw__cond--2 { animation: cmw-cond-fire 1s ease 0.25s both; }
@keyframes cmw-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.p-cmw .cmw__scene--rule.is-active .cmw__arrow { animation: cmw-rise 0.5s cubic-bezier(0.215, 0.61, 0.355, 1) 1s both; }
.p-cmw .cmw__scene--rule.is-active .cmw__outcome { animation: cmw-rise 0.5s cubic-bezier(0.215, 0.61, 0.355, 1) 1.15s both; }

/* --- s1 · no more spreadsheets: the CSV ghost dissolves, the queue
   takes over --- */
.p-cmw .cmw__scene--queue {
  flex-direction: row;
  align-items: center;
  gap: 18px;
}
.p-cmw .cmw__csv {
  flex: 0 0 34%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: color-mix(in oklab, var(--color-green-100) 45%, var(--color-white));
  border: 1px solid color-mix(in oklab, var(--color-green-600) 18%, var(--color-white));
  border-radius: 8px;
  transform: rotate(-5deg);
}
.p-cmw .cmw__csv-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--color-grey-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* the Excel evocation (Arturo, 2026-08-10): a green file glyph +
   green-tinted sheet — color only, no trademark artwork */
.p-cmw .cmw__csv-tab::before {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--color-green-600);
}
.p-cmw .cmw__csv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.p-cmw .cmw__csv-grid i {
  height: 10px;
  background: var(--color-white);
  border: 1px solid color-mix(in oklab, var(--color-green-600) 14%, var(--color-white));
  border-radius: 2px;
}
/* header row reads as the sheet's green band */
.p-cmw .cmw__csv-grid i:nth-child(-n + 3) {
  background: var(--color-green-100);
  border-color: color-mix(in oklab, var(--color-green-600) 24%, var(--color-white));
}
@keyframes cmw-csv-out {
  from { opacity: 1; transform: rotate(-5deg); filter: none; }
  to   { opacity: 0.4; transform: rotate(-7deg) translateX(-8px) scale(0.96); }
}
.p-cmw .cmw__scene--queue.is-active .cmw__csv { animation: cmw-csv-out 0.9s cubic-bezier(0.23, 1, 0.32, 1) 0.5s both; }
.p-cmw .cmw__queue {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.p-cmw .cmw__filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 2px; }
.p-cmw .cmw__chipf {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--color-border-light);
  background: var(--color-white);
  font-size: 10px;
  font-weight: 500;
  color: var(--color-grey-500);
  white-space: nowrap;
}
.p-cmw .cmw__chipf b { font-weight: 600; color: var(--color-grey-400); }
.p-cmw .cmw__chipf.is-on {
  background: var(--color-blue-100);
  border-color: var(--color-blue-200);
  color: var(--color-blue-500);
}
.p-cmw .cmw__chipf.is-on b { color: var(--color-blue-500); }
.p-cmw .cmw__qrow {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: 10px;
}
@keyframes cmw-row-in {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: none; }
}
.p-cmw .cmw__scene--queue.is-active .cmw__filters { animation: cmw-rise 0.45s cubic-bezier(0.215, 0.61, 0.355, 1) 0.35s both; }
.p-cmw .cmw__scene--queue.is-active .cmw__qrow:nth-child(2) { animation: cmw-row-in 0.5s cubic-bezier(0.215, 0.61, 0.355, 1) 0.5s both; }
.p-cmw .cmw__scene--queue.is-active .cmw__qrow:nth-child(3) { animation: cmw-row-in 0.5s cubic-bezier(0.215, 0.61, 0.355, 1) 0.58s both; }
.p-cmw .cmw__scene--queue.is-active .cmw__qrow:nth-child(4) { animation: cmw-row-in 0.5s cubic-bezier(0.215, 0.61, 0.355, 1) 0.66s both; }
.p-cmw .cmw__scene--queue.is-active .cmw__qrow:nth-child(5) { animation: cmw-row-in 0.5s cubic-bezier(0.215, 0.61, 0.355, 1) 0.74s both; }

/* --- s2 · context orbit: the four context satellites dock around the
   one case — the hero's flight curve + stagger --- */
.p-cmw .cmw__orbit {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 46px 90px;
}
.p-cmw .cmw__sat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: 10px;
  min-width: 0;
}
.p-cmw .cmw__hist { display: flex; align-items: center; gap: 8px; }
.p-cmw .cmw__hist .cmm-sk { flex: 1 1 auto; }
.p-cmw .cmw__hist .cmm-status { flex: 0 0 auto; margin-left: auto; }
/* color where it carries meaning (Arturo, 2026-08-10: the orbit read
   too grey): the verified selfie, the score meters, the history
   outcomes, the reviewer presence */
.p-cmw .cmw__evrow { display: flex; align-items: center; gap: 8px; }
.p-cmw .cmw__evrow .cmm-sk { flex: 1 1 auto; }
.p-cmw .cmw__ok {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: var(--color-green-100);
  color: var(--color-green-600);
}
.p-cmw .cmw__sat--sc .cmm-meter__fill--a { background: var(--color-blue-500); }
.p-cmw .cmw__sat--sc .cmm-meter__fill--b { background: color-mix(in oklab, var(--color-blue-500) 55%, var(--color-white)); }
.p-cmw .cmw__fail {
  color: var(--color-red-500);
  background: color-mix(in oklab, var(--color-red-500) 10%, var(--color-white));
}
.p-cmw .cmw__sat--no .cmm-ava { background: var(--color-blue-100); border-color: var(--color-blue-200); }
.p-cmw .cmw__sat--no .cmm-ava::before { background: var(--color-blue-500); }
@keyframes cmw-dock-tl { from { opacity: 0; transform: translate(-26px, -20px); } to { opacity: 1; transform: none; } }
@keyframes cmw-dock-tr { from { opacity: 0; transform: translate(26px, -20px); }  to { opacity: 1; transform: none; } }
@keyframes cmw-dock-bl { from { opacity: 0; transform: translate(-26px, 20px); }  to { opacity: 1; transform: none; } }
@keyframes cmw-dock-br { from { opacity: 0; transform: translate(26px, 20px); }   to { opacity: 1; transform: none; } }
.p-cmw .cmw__scene--orbit.is-active .cmw__sat--ev { animation: cmw-dock-tl 0.55s cubic-bezier(0.32, 0.72, 0, 1) 0.45s both; }
.p-cmw .cmw__scene--orbit.is-active .cmw__sat--sc { animation: cmw-dock-tr 0.55s cubic-bezier(0.32, 0.72, 0, 1) 0.53s both; }
.p-cmw .cmw__scene--orbit.is-active .cmw__sat--hi { animation: cmw-dock-bl 0.55s cubic-bezier(0.32, 0.72, 0, 1) 0.61s both; }
.p-cmw .cmw__scene--orbit.is-active .cmw__sat--no { animation: cmw-dock-br 0.55s cubic-bezier(0.32, 0.72, 0, 1) 0.69s both; }
.p-cmw .cmw__case {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  background: var(--color-white);
  border: 1px solid var(--color-blue-200);
  border-radius: 12px;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-blue-500) 8%, transparent);
  white-space: nowrap;
}
.p-cmw .cmw__case-meta { display: flex; flex-direction: column; line-height: 1.2; }
.p-cmw .cmw__case-meta b { font-size: 11px; font-weight: 600; color: var(--color-black); }
.p-cmw .cmw__case-meta small { font-size: 10px; color: var(--color-grey-400); }
@keyframes cmw-case-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.94); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}
.p-cmw .cmw__scene--orbit.is-active .cmw__case { animation: cmw-case-in 0.45s cubic-bezier(0.215, 0.61, 0.355, 1) 0.15s both; }

/* --- s3 · the escalation moment: the queue dims, the modal rises --- */
.p-cmw .cmw__scene--esc { position: relative; align-items: center; }
.p-cmw .cmw__dim {
  position: absolute;
  inset: 12px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
.p-cmw .cmw__dimrow {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 12px;
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: 10px;
}
@keyframes cmw-dim-out {
  from { opacity: 1; }
  to   { opacity: 0.35; }
}
.p-cmw .cmw__scene--esc.is-active .cmw__dim { animation: cmw-dim-out 0.5s ease 0.35s both; }
@keyframes cmw-esc-rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.p-cmw .cmw__esc {
  position: relative;
  z-index: 1;
  box-shadow: none;
}
.p-cmw .cmw__scene--esc.is-active .cmw__esc { animation: cmw-esc-rise 0.5s cubic-bezier(0.215, 0.61, 0.355, 1) 0.45s both; }
@keyframes cmw-go-pulse {
  0%, 60% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--color-blue-500) 35%, transparent); }
  80% { box-shadow: 0 0 0 6px color-mix(in oklab, var(--color-blue-500) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--color-blue-500) 0%, transparent); }
}
.p-cmw .cmw__scene--esc.is-active .cmm-escmodal__go { animation: cmw-go-pulse 1.6s ease 0.9s both; }

/* --- s4 · the trail itself (S05 D1): the case history writes itself —
   every event stamped with who + when, the decision lit, Export ready */
.p-cmw .cmw__trail {
  width: min(420px, 100%);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.p-cmw .cmw__trail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.p-cmw .cmw__trail-id {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.p-cmw .cmw__trail-top { display: flex; align-items: center; gap: 10px; }
.p-cmw .cmw__trail-top .cmm-sk { max-width: 150px; }
.p-cmw .cmw__trail-id > .cmm-sk { max-width: 90px; }
.p-cmw .cmw__export {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--color-blue-500);
  color: var(--color-white);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.p-cmw .cmw__tl {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.p-cmw .cmw__tl-ev {
  display: flex;
  align-items: center;
  gap: 11px;
}
.p-cmw .cmw__tl-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.p-cmw .cmw__tl-body b {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-black);
  line-height: 1.2;
}
.p-cmw .cmw__tl-body small { font-size: 10px; color: var(--color-grey-400); line-height: 1.2; }
.p-cmw .cmw__tl-body .cmm-sk { max-width: 140px; }
.p-cmw .cmw__tl-time {
  flex: 0 0 auto;
  font-size: 10px;
  color: var(--color-grey-400);
  font-variant-numeric: tabular-nums;
}
/* the decision entry lands lit: blue card, check dot, Pass chip */
.p-cmw .cmw__tl-ev--decision {
  padding: 9px 12px;
  background: var(--color-blue-100);
  border: 1px solid var(--color-blue-200);
  border-radius: 10px;
}
.p-cmw .cmw__tl-check {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--color-blue-500);
  color: var(--color-white);
}
.p-cmw .cmw__tl-ev--decision .cmm-status { flex: 0 0 auto; }
/* one-shot: entries write themselves in as they happened; the
   decision lands last with the most presence */
@keyframes cmw-ev-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.p-cmw .cmw__scene--trail.is-active .cmw__trail-head { animation: cmw-rise 0.45s cubic-bezier(0.215, 0.61, 0.355, 1) 0.25s both; }
.p-cmw .cmw__scene--trail.is-active .cmw__tl-ev--1 { animation: cmw-ev-in 0.4s cubic-bezier(0.215, 0.61, 0.355, 1) 0.45s both; }
.p-cmw .cmw__scene--trail.is-active .cmw__tl-ev--2 { animation: cmw-ev-in 0.4s cubic-bezier(0.215, 0.61, 0.355, 1) 0.57s both; }
.p-cmw .cmw__scene--trail.is-active .cmw__tl-ev--3 { animation: cmw-ev-in 0.4s cubic-bezier(0.215, 0.61, 0.355, 1) 0.69s both; }
.p-cmw .cmw__scene--trail.is-active .cmw__tl-ev--4 { animation: cmw-ev-in 0.4s cubic-bezier(0.215, 0.61, 0.355, 1) 0.81s both; }
.p-cmw .cmw__scene--trail.is-active .cmw__tl-ev--5 { animation: cmw-ev-in 0.5s cubic-bezier(0.215, 0.61, 0.355, 1) 0.98s both; }

/* --- narrow --- */
@media (max-width: 639px) {
  .p-cmw .cmw__body { padding: 18px 14px; min-height: 300px; }
  .p-cmw .cmw__scene--queue { flex-direction: column; align-items: stretch; }
  .p-cmw .cmw__csv { display: none; }
  .p-cmw .cmw__orbit { gap: 56px 12px; }
  .p-cmw .cmw__case { max-width: 92%; }
  .p-cmw .cmw__case .cmm-status { display: none; }
}

/* --- reduced motion: composed frames, no one-shots --- */
@media (prefers-reduced-motion: reduce) {
  .p-cmw .cmw__scene,
  .p-cmw .cmw__scene * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
