/* Paloma interactive diagrams (2026-12-02): the ecosystem map (partials/ecosystem.html) and the referral-to-payment
   journey (partials/journey.html). Any page may include either partial plus this file and /paloma-diagrams.js.
   Without scripts every explanation is shown as a list; with scripts one is shown at a time. Uses site.css tokens. */
.dx{margin:0}
.dx figcaption{font-size:15px;color:var(--subtle);font-weight:500;margin-top:14px;line-height:1.5;max-width:var(--measure)}
.dx button{font:inherit;cursor:pointer}
.dx-node,.dx-step{-webkit-tap-highlight-color:transparent}
.dx-node:focus-visible,.dx-step:focus-visible{outline:3px solid #9fd3b0;outline-offset:3px}

/* ecosystem map: the signature visual, drawn for the dark-green hero. Animated dots run along each link in the
   direction the work moves; the labels say what moves. Reduced motion: the dots stand still. */
.dx-eco{display:grid;grid-template-columns:1fr;gap:16px}
.dx-eco figcaption{margin-top:0}
.dx-eco-map{position:relative;aspect-ratio:720/540;background:radial-gradient(ellipse 60% 60% at 50% 50%,rgba(159,211,176,.16) 0%,rgba(159,211,176,.04) 55%,rgba(255,255,255,0) 75%);border:1px solid rgba(255,255,255,.14);border-radius:var(--r-lg)}
.dx-eco-lines{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.dx-line{stroke:rgba(159,211,176,.32);stroke-width:1.6;transition:stroke .3s}
.dx-arc{stroke-dasharray:3 6}
.dx-flow{stroke:#bfe6cb;stroke-width:4.5;stroke-dasharray:0 26;opacity:.8;transition:opacity .3s,stroke .3s}
.dx-flow-b{stroke-dashoffset:13}
.dx-hub-ring{fill:rgba(159,211,176,.08);stroke:rgba(159,211,176,.45);stroke-width:1.2}
.dx-hub-pulse{fill:none;stroke:rgba(159,211,176,.5);stroke-width:1.2;opacity:0;transform-origin:360px 270px;transform-box:view-box}
.dx-eco.has-sel .dx-line.is-hot{stroke:rgba(191,230,203,.75)}
.dx-eco.has-sel .dx-flow{opacity:.28}
.dx-eco.has-sel .dx-flow.is-hot{opacity:1;stroke:#e4f6ea}
.dx-flows{list-style:none;margin:0;padding:0}
.dx-fl{position:absolute;transform:translate(-50%,-50%);max-width:none;margin:0;padding:4px 10px;border-radius:999px;background:rgba(15,36,28,.78);border:1px solid rgba(159,211,176,.28);color:#cfe9d7;font-size:12.5px;line-height:1.25;white-space:nowrap;pointer-events:none;transition:color .3s,border-color .3s,background-color .3s}
.dx-fl b{font-weight:650}
.dx-route{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.dx-eco.has-sel .dx-fl{color:rgba(207,233,215,.6)}
.dx-eco.has-sel .dx-fl.is-hot{color:#fff;border-color:#9fd3b0;background:rgba(31,74,56,.95)}
.dx-fl-ref{left:30%;top:27.5%}.dx-fl-staff{left:70%;top:27.5%}.dx-fl-notes{left:70%;top:72.5%}.dx-fl-chart{left:30%;top:72.5%}.dx-fl-inv{left:50%;top:6.5%}.dx-fl-visit{left:50%;top:93.5%}
.dx-eco-nodes{position:absolute;inset:0}
.dx-node{position:absolute;transform:translate(-50%,-50%);display:flex;align-items:center;gap:8px;padding:8px 13px;border-radius:999px;border:1px solid rgba(255,255,255,.3);background:rgba(23,48,42,.92);color:#fff;font-weight:650;font-size:14.5px;line-height:1.2;box-shadow:0 6px 18px rgba(0,0,0,.25);white-space:nowrap}
.dx-node svg{width:21px;height:21px;flex:none;color:#9fd3b0}
.dx-node:hover{border-color:#9fd3b0}
.dx-node[aria-pressed="true"]{background:#9fd3b0;border-color:#9fd3b0;color:#13281f}
.dx-node[aria-pressed="true"] svg{color:#13281f}
.dx-n-pharm{left:18%;top:13%}.dx-n-agency{left:82%;top:13%}.dx-n-nurse{left:82%;top:87%}.dx-n-patient{left:18%;top:87%}
.dx-hub{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:7px}
.dx-hub .dx-node{position:static;transform:none;font-size:14px;padding:7px 14px}
.dx-hub-name{font-family:var(--font-head);font-size:23px;color:#fff;line-height:1}
.dx-node{border-radius:14px;align-items:flex-start;text-align:left;white-space:normal;width:max-content;max-width:29%}
.dx-node svg{margin-top:1px}
.dx-nl{display:grid;gap:3px}
.dx-val{font-weight:500;font-size:12.5px;line-height:1.35;color:rgba(223,238,228,.8);max-width:24ch}
.dx-node[aria-pressed="true"] .dx-val{color:#1f3a30}
.dx-hub .dx-node{max-width:none;width:220px;justify-content:center;text-align:center}
.dx-hub .dx-nl{justify-items:center}
.dx-hub .dx-val{max-width:26ch}
.dx-hub .dx-n-clinical{font-size:15.5px;padding:10px 14px;box-shadow:0 0 0 6px rgba(159,211,176,.12),0 10px 28px rgba(0,0,0,.35)}
.dx-eco-title{margin:0;font-family:var(--font-head);font-size:clamp(20px,1.9vw,26px);color:#fff;line-height:1.2}
/* the explanation: an editorial caption inside the hero, not a card */
.dx-panels{display:grid;gap:14px}
.dx-panel{background:#fff;border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:var(--r-lg);padding:20px 22px}
.dx-panel h3{font-size:20px;margin:0 0 6px}
.dx-panel p{margin:0 0 10px;color:var(--muted);font-size:16px;line-height:1.55}
.dx-tag{color:var(--accent)!important;font-weight:650;font-size:15px!important}
.dx-eco .dx-panels{gap:18px}
.dx-eco .dx-panel{background:none;border:0;border-left:2px solid #9fd3b0;border-radius:0;padding:2px 0 2px 18px}
.dx-eco .dx-panel h3{font-size:19px;margin:0 0 4px;color:#fff}
.dx-eco .dx-panel p{margin:0 0 8px;color:rgba(255,255,255,.8);font-size:15.5px;line-height:1.55;max-width:62ch}
.dx-eco .dx-panel .more{color:#fff;font-size:15px}
.dx-eco .dx-tag{color:#9fd3b0!important;font-size:14.5px!important}
.dx.is-live .dx-panel:not(.is-on){display:none}
@media(prefers-reduced-motion:no-preference){
  .dx-flow{animation:dx-run 2.6s linear infinite}
  .dx-flow-slow{animation-duration:4.2s}
  .dx-hub-pulse{animation:dx-pulse 3.6s ease-out infinite}
  @keyframes dx-run{to{stroke-dashoffset:-26}}
  .dx-flow-b{animation-name:dx-run-b}
  @keyframes dx-run-b{from{stroke-dashoffset:13}to{stroke-dashoffset:-13}}
  @keyframes dx-pulse{0%{opacity:.7;transform:scale(1)}100%{opacity:0;transform:scale(1.55)}}
}

/* journey */
.dx-steps{list-style:none;margin:0 0 20px;padding:0;display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px;position:relative}
.dx-steps:before{content:"";position:absolute;left:4%;right:4%;top:23px;height:2px;background:#b9c8bd}
.dx-steps li{position:relative}
.dx-step{width:100%;display:flex;flex-direction:column;align-items:center;gap:8px;background:none;border:0;padding:0 2px;color:var(--ink);text-align:center}
.dx-step i{font-style:normal;display:flex;align-items:center;justify-content:center;width:46px;height:46px;border-radius:50%;background:#fff;border:2px solid #90a896;color:var(--brand);font-family:var(--font-head);font-size:20px}
.dx-step span{font-size:14.5px;font-weight:650;line-height:1.3}
.dx-step:hover i{border-color:var(--accent)}
.dx-step[aria-pressed="true"] i{background:var(--brand);border-color:var(--brand);color:#fff}
.dx-step[aria-pressed="true"] span{color:var(--brand)}
.dx-journey .dx-panel h3 span{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:var(--brand);color:#fff;font-size:15px;margin-right:8px;font-family:var(--font-sans);vertical-align:2px}
.dx-journey .dx-panels{grid-template-columns:repeat(2,minmax(0,1fr))}
.dx-journey.is-live .dx-panels{grid-template-columns:1fr}

@media(prefers-reduced-motion:no-preference){.dx-step i{transition:background-color .2s,border-color .2s,color .2s}.dx.is-live .dx-panel.is-on{animation:dx-in .25s ease-out}@keyframes dx-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}}

@media(max-width:1000px){.dx-eco{grid-template-columns:1fr}.dx-steps{grid-template-columns:repeat(4,minmax(0,1fr));row-gap:18px}.dx-steps:before{display:none}}
@media(max-width:640px){
  .dx-eco-map{aspect-ratio:auto;display:flex;flex-direction:column;gap:12px;padding:14px;background:rgba(255,255,255,.04)}
  .dx-eco-lines{display:none}
  .dx-eco-nodes{position:static;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .dx-node{position:static;transform:none;white-space:normal;font-size:14.5px;padding:10px 12px;border-radius:12px;justify-content:flex-start;text-align:left;min-height:48px;box-shadow:none;max-width:none;width:auto}
  .dx-hub .dx-node{width:auto}
  .dx-hub{position:static;transform:none;grid-column:1/-1;order:-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px;border:1px solid rgba(159,211,176,.35);border-radius:12px;background:rgba(159,211,176,.08)}
  .dx-hub-name{grid-column:1/-1;text-align:center;font-size:19px}
  .dx-hub .dx-node{justify-content:center;text-align:center}
  .dx-flows{order:2;display:grid;gap:6px}
  .dx-fl{position:relative;left:auto;top:auto;transform:none;white-space:normal;border-radius:10px;padding:8px 10px 8px 30px;font-size:14px;background:rgba(15,36,28,.6)}
  .dx-fl:before{content:"";position:absolute;left:10px;top:50%;width:10px;height:10px;margin-top:-5px;border-radius:50%;background:#bfe6cb}
  .dx-route{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal;color:rgba(207,233,215,.75)}
  .dx-steps{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .dx-step{flex-direction:row;justify-content:flex-start;text-align:left;gap:10px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:8px 10px;min-height:52px}
  .dx-step i{width:32px;height:32px;font-size:16px;flex:none}
  .dx-step span{font-size:14px}
  .dx-journey .dx-panels{grid-template-columns:1fr}
  .dx-panel{padding:16px}
  .dx-eco .dx-panel{padding:2px 0 2px 14px}
}
@media(max-width:640px) and (prefers-reduced-motion:no-preference){.dx-fl:before{animation:dx-blink 2.4s ease-in-out infinite}.dx-fl:nth-child(2):before{animation-delay:.4s}.dx-fl:nth-child(3):before{animation-delay:.8s}.dx-fl:nth-child(4):before{animation-delay:1.2s}.dx-fl:nth-child(5):before{animation-delay:1.6s}.dx-fl:nth-child(6):before{animation-delay:2s}@keyframes dx-blink{0%,100%{opacity:.35;transform:scale(.8)}50%{opacity:1;transform:scale(1)}}}
