/* Apex Flow · Client Dashboard (premium template, de-identified). Engine-rendered from
   window.APEX_DASHBOARD_DATA. Brand: navy / teal / gold. Ported from the premium A/R audit portal
   so per-client output looks premium AND stays reconciled (one template, engine fills the data). */
:root{
  --navy:#0A1628;            /* official brand navy */
  --navy-deep:#070F1C;
  --navy-2:#13243b;
  --teal:#00C2A8;            /* official brand teal */
  --teal-bright:#19D9BE;
  --teal-dim:#0A766A;
  --gold:#00C2A8;            /* restrained premium accent */
  --coral:#00C2A8;
  --amber:#E0A23B;
  --paper:#FBFAF7;
  --card:#FFFFFF;
  --hair:#E6E2D8;
  --hair-2:#EFECE3;
  --ink:#0A1628;
  --muted:#5C6470;
  --muted-2:#8A909B;
  --disp:'Space Grotesk',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --body:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --mono:'JetBrains Mono',ui-monospace,'SF Mono',Menlo,monospace;
  --shadow:0 1px 2px rgba(10,22,40,.04),0 8px 28px rgba(10,22,40,.06);
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:var(--body);color:var(--ink);background:var(--paper);line-height:1.5;-webkit-font-smoothing:antialiased}
.wrap{max-width:1000px;margin:0 auto;padding:0 28px}
.hidden{display:none !important}

/* ---- sample ribbon ---- */
.ribbon{
  background:repeating-linear-gradient(135deg,#23262b,#23262b 14px,#1d2024 14px,#1d2024 28px);
  color:#F4D27A;font-family:var(--mono);font-size:11px;letter-spacing:.14em;
  text-transform:uppercase;text-align:center;padding:9px 16px;position:sticky;top:0;z-index:50;border-bottom:1px solid #000;
}
.ribbon b{color:#fff}

/* ---- masthead ---- */
.masthead{background:var(--card);border-bottom:1px solid var(--hair)}
.masthead .wrap{display:flex;align-items:center;justify-content:space-between;padding:20px 28px;gap:20px;flex-wrap:wrap}
.brand{display:flex;align-items:center;gap:13px}
.brand .word{font-family:var(--disp);font-weight:700;letter-spacing:.20em;font-size:15px;color:var(--navy);text-transform:uppercase;line-height:1}
.brand .word small{display:block;font-family:var(--mono);font-weight:500;letter-spacing:.15em;font-size:9.5px;color:var(--muted-2);margin-top:4px;text-transform:uppercase}
.mast-meta{text-align:right;font-family:var(--mono);font-size:11px;color:var(--muted);letter-spacing:.04em}
.mast-meta .client{color:var(--navy);font-weight:700;font-size:12.5px;letter-spacing:.05em}

/* ---- hero ---- */
.hero{
  background:
    radial-gradient(900px 380px at 78% -10%, rgba(0,194,168,.16), transparent 60%),
    radial-gradient(700px 360px at 8% 120%, rgba(203,164,94,.10), transparent 55%),
    var(--navy-deep);
  color:#EAF0F5;padding:56px 0 48px;border-bottom:1px solid #000;
}
.eyebrow{font-family:var(--mono);font-size:11px;letter-spacing:.22em;text-transform:uppercase;color:var(--teal-bright);margin-bottom:18px;display:flex;align-items:center;gap:10px}
.eyebrow::before{content:"";width:26px;height:1px;background:var(--teal);opacity:.8}
.hero h1{font-family:var(--disp);font-weight:600;font-size:clamp(31px,5vw,48px);line-height:1.03;letter-spacing:-.018em;color:#fff;max-width:18ch}
.hero .lede{margin-top:18px;max-width:64ch;color:#AEBCCB;font-size:15.5px;line-height:1.62}
.hero .lede b{color:#E9EEF3;font-weight:600}

/* KPI row */
.kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:0;margin-top:40px;border:1px solid rgba(255,255,255,.13);border-radius:14px;overflow:hidden;background:rgba(255,255,255,.025)}
@media (max-width:640px){.kpis{grid-template-columns:1fr}}
.kpi{padding:24px 24px 22px;border-right:1px solid rgba(255,255,255,.10);position:relative}
.kpi:last-child{border-right:none}
.kpi .lbl{font-family:var(--mono);font-size:10.5px;letter-spacing:.13em;text-transform:uppercase;color:#8FA0B2;margin-bottom:12px}
.kpi .fig{font-family:var(--mono);font-weight:700;line-height:1;font-size:clamp(27px,3.6vw,35px);letter-spacing:-.01em}
.kpi.k1 .fig{color:#fff} .kpi.k2 .fig{color:var(--teal-bright)} .kpi.k3 .fig{color:var(--gold)}
.kpi .sub{margin-top:10px;font-size:12.5px;color:#9DACBC;line-height:1.4}
.kpi .tick{position:absolute;left:0;top:0;height:3px;width:42px}
.kpi.k1 .tick{background:#fff;opacity:.55} .kpi.k2 .tick{background:var(--teal)} .kpi.k3 .tick{background:var(--gold)}

/* ---- sections ---- */
section.block{padding:54px 0;border-bottom:1px solid var(--hair)}
.shead{display:flex;align-items:baseline;gap:14px;margin-bottom:6px}
.snum{font-family:var(--mono);font-weight:700;font-size:12px;color:var(--gold);letter-spacing:.05em;flex:0 0 auto;padding-top:3px}
.stitle{font-family:var(--disp);font-weight:600;font-size:23px;letter-spacing:-.01em;color:var(--navy)}
.ssub{color:var(--muted);font-size:14px;margin:2px 0 26px 40px;max-width:66ch}
@media (max-width:560px){.ssub{margin-left:0}}

/* money map / flow */
.flowbar{display:flex;height:56px;border-radius:10px;overflow:hidden;border:1px solid var(--hair);box-shadow:var(--shadow)}
.flowbar i{display:block;height:100%}
.seg-rec{background:linear-gradient(180deg,#16d3ba,#00b89f)}
.seg-open{background:linear-gradient(180deg,#f0b850,#e0a23b)}
.seg-leak{background:repeating-linear-gradient(135deg,#ea7a5f,#ea7a5f 7px,#e36f53 7px,#e36f53 14px)}
.flow-legend{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:18px}
@media (max-width:560px){.flow-legend{grid-template-columns:1fr}}
.leg{border:1px solid var(--hair);border-radius:12px;padding:16px 18px;background:var(--card);box-shadow:var(--shadow)}
.leg .dot{width:10px;height:10px;border-radius:3px;display:inline-block;margin-right:8px;vertical-align:middle}
.leg .name{font-size:12px;color:var(--muted);font-weight:500}
.leg .amt{font-family:var(--mono);font-weight:700;font-size:23px;color:var(--navy);margin-top:8px;letter-spacing:-.01em}
.leg .pct{font-family:var(--mono);font-size:11px;color:var(--muted-2);margin-top:3px}
.d-rec{background:var(--teal)} .d-open{background:var(--amber)} .d-leak{background:var(--coral)}

/* bar rows */
.row{display:flex;align-items:center;gap:16px;padding:11px 0}
.row .rl{flex:0 0 var(--lw,150px);font-size:13px;color:var(--ink);font-weight:500}
.row .rl small{display:block;color:var(--muted-2);font-weight:400;font-size:11px;margin-top:1px}
.row .track{flex:1;height:26px;background:var(--hair-2);border-radius:7px;overflow:hidden}
.row .fill{height:100%;width:0;border-radius:7px;transition:width 1.05s cubic-bezier(.22,1,.36,1)}
.in .row .fill{width:var(--w)}
.row .rv{flex:0 0 auto;font-family:var(--mono);font-weight:700;font-size:14px;color:var(--navy);min-width:74px;text-align:right}
.fill.teal{background:linear-gradient(90deg,#00b89f,#16d3ba)}
.fill.amber{background:linear-gradient(90deg,#d8982f,#ecb24c)}
.fill.coral{background:linear-gradient(90deg,#e0664c,#ea7a5f)}
.fill.slate{background:linear-gradient(90deg,#5b6b86,#7689a6)}

.callout{margin-top:22px;border-left:3px solid var(--coral);background:#fdf3f0;border-radius:0 10px 10px 0;padding:15px 18px;font-size:13.5px;color:#7a3b2c;line-height:1.55}
.callout b{color:#b34228;font-family:var(--mono);font-weight:700}
.reconcile{margin-top:18px;font-family:var(--mono);font-size:11.5px;color:var(--muted-2);letter-spacing:.02em;padding-top:14px;border-top:1px dashed var(--hair)}
.reconcile b{color:var(--teal-dim)}

/* recovery plan */
.plan{display:flex;flex-direction:column;gap:16px}
.pcard{border:1px solid var(--hair);border-radius:14px;background:var(--card);overflow:hidden;box-shadow:var(--shadow)}
.pcard .ptop{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 20px;background:linear-gradient(180deg,#fbfbf9,#f6f5f1);border-bottom:1px solid var(--hair)}
.pcard .code{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.pcard .chip{font-family:var(--mono);font-weight:700;font-size:13px;color:#fff;background:var(--navy);padding:5px 10px;border-radius:6px}
.pcard .cdesc{font-size:13px;color:var(--muted);font-weight:500}
.pcard .cmeta{text-align:right;flex:0 0 auto}
.pcard .cmeta .amt{font-family:var(--mono);font-weight:700;font-size:20px;color:var(--navy)}
.pcard .cmeta .cnt{font-family:var(--mono);font-size:11px;color:var(--muted-2);margin-top:2px}
.pbody{display:grid;grid-template-columns:1fr 1fr;gap:0}
@media (max-width:560px){.pbody{grid-template-columns:1fr}}
.pcol{padding:16px 20px}
.pcol+.pcol{border-left:1px solid var(--hair)}
@media (max-width:560px){.pcol+.pcol{border-left:none;border-top:1px solid var(--hair)}}
.pcol .ph{font-family:var(--mono);font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;margin-bottom:8px;display:flex;align-items:center;gap:7px}
.pcol.rec .ph{color:var(--teal-dim)} .pcol.prev .ph{color:#9a7e3f}
.pcol p{font-size:13px;color:#3c4350;line-height:1.5}
.pcard .est{padding:12px 20px;background:#fbf9f4;border-top:1px dashed var(--hair);font-size:12px;color:var(--muted);line-height:1.5}
.pcard .est b{font-family:var(--mono);color:#9a7e3f;font-weight:700}
.plan-note{margin-top:18px;font-size:12.5px;color:var(--muted-2);font-style:italic;line-height:1.5}

/* proof */
.proof{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
@media (max-width:560px){.proof{grid-template-columns:1fr}}
.pf{border:1px solid var(--hair);border-radius:13px;background:var(--card);padding:18px;position:relative;overflow:hidden;box-shadow:var(--shadow)}
.pf::after{content:"";position:absolute;inset:0 auto 0 0;width:3px;background:var(--teal)}
.pf .pfk{font-family:var(--mono);font-size:11px;color:var(--muted-2);letter-spacing:.05em}
.pf .pfc{display:inline-block;font-family:var(--mono);font-weight:700;font-size:11px;color:var(--navy);background:#e8f8f5;border:1px solid #c7ece6;border-radius:5px;padding:2px 7px;margin-top:6px}
.pf .pfd{font-size:12px;color:var(--muted);line-height:1.45;margin-top:11px}
.pf .pfr{display:flex;align-items:baseline;justify-content:space-between;margin-top:14px;padding-top:13px;border-top:1px solid var(--hair-2)}
.pf .pfr .ok{font-family:var(--mono);font-size:11px;color:var(--teal-dim);font-weight:700}
.pf .pfr .v{font-family:var(--mono);font-weight:700;font-size:19px;color:var(--navy)}
.proof-note{margin-top:16px;font-size:12px;color:var(--muted-2);font-style:italic}

/* industry / gap */
.gap-hero{background:var(--navy);border-radius:16px;padding:32px 30px 28px;color:#EAF0F5;margin-bottom:26px}
.gap-hero .gh{font-family:var(--disp);font-weight:600;font-size:clamp(20px,2.7vw,27px);line-height:1.24;color:#fff;max-width:26ch}
.gap-hero .gh em{color:var(--teal-bright);font-style:normal}
.gapbars{margin-top:24px;display:flex;flex-direction:column;gap:16px}
.gapbar .gtop{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:7px}
.gapbar .gn{font-size:12.5px;color:#B9C6D4}
.gapbar .gv{font-family:var(--mono);font-weight:700;font-size:17px}
.gapbar.appeal .gv{color:var(--coral)} .gapbar.win .gv{color:var(--teal-bright)}
.gapbar .gtrack{height:13px;background:rgba(255,255,255,.09);border-radius:7px;overflow:hidden}
.gapbar .gfill{height:100%;width:0;border-radius:7px;transition:width 1.2s cubic-bezier(.22,1,.36,1)}
.in .gapbar .gfill{width:var(--w)}
.gapbar.appeal .gfill{background:linear-gradient(90deg,#e0664c,#ea7a5f)}
.gapbar.win .gfill{background:linear-gradient(90deg,#00b89f,#16d3ba)}
.gap-tag{margin-top:20px;font-family:var(--mono);font-size:12px;color:var(--gold);letter-spacing:.03em;border-top:1px solid rgba(255,255,255,.12);padding-top:16px}

.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}
@media (max-width:720px){.stats{grid-template-columns:repeat(2,1fr)}}
@media (max-width:460px){.stats{grid-template-columns:1fr}}
.stat{border:1px solid var(--hair);border-radius:12px;background:var(--card);padding:16px 17px;box-shadow:var(--shadow)}
.stat .sv{font-family:var(--mono);font-weight:700;font-size:25px;color:var(--navy);letter-spacing:-.01em}
.stat .sn{font-size:12.5px;color:var(--ink);font-weight:600;margin-top:7px;line-height:1.35}
.stat .sd{font-size:11px;color:var(--muted);margin-top:6px;line-height:1.4}
.stat .src{font-family:var(--mono);font-size:9.5px;color:var(--muted-2);margin-top:9px;letter-spacing:.02em;padding-top:8px;border-top:1px dashed var(--hair)}
.stat.hl{border-color:#c7ece6;background:#f3fcfa} .stat.hl .sv{color:var(--teal-dim)}

/* trust */
.trust{background:var(--card);border:1px solid var(--hair);border-radius:16px;padding:8px 6px;box-shadow:var(--shadow)}
.trow{display:flex;gap:15px;padding:16px 20px;border-bottom:1px solid var(--hair-2)}
.trow:last-child{border-bottom:none}
.trow .tk{flex:0 0 auto;width:30px;height:30px;border-radius:8px;background:#e8f8f5;border:1px solid #c7ece6;display:flex;align-items:center;justify-content:center;color:var(--teal-dim);font-weight:700}
.trow .tt{font-size:13.5px;color:#3c4350;line-height:1.5;padding-top:4px}
.trow .tt b{color:var(--navy);font-weight:600}
.prev-strip{margin-top:24px;border-left:3px solid var(--gold);background:#fcf9f2;border-radius:0 12px 12px 0;padding:18px 20px}
.prev-strip h4{font-family:var(--mono);font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:#9a7e3f;margin-bottom:12px}
.prev-strip .pl{display:flex;gap:11px;padding:7px 0;font-size:13px;color:#473e2c;line-height:1.5}
.prev-strip .pl span{color:var(--gold)}
.prev-strip .pl b{font-family:var(--mono);font-weight:700;color:var(--navy)}

/* CTA band */
.cta{background:
    radial-gradient(700px 300px at 85% -20%, rgba(0,194,168,.18), transparent 60%),
    var(--navy);color:#EAF0F5;border-radius:18px;padding:38px 34px;margin:8px 0 0;text-align:center}
.cta h3{font-family:var(--disp);font-weight:600;font-size:clamp(21px,3vw,28px);color:#fff;line-height:1.2;max-width:24ch;margin:0 auto}
.cta p{margin:14px auto 24px;max-width:54ch;color:#AEBCCB;font-size:14.5px;line-height:1.6}
.cta .btn{display:inline-block;background:var(--teal);color:var(--navy);font-family:var(--disp);font-weight:700;font-size:15px;letter-spacing:.01em;text-decoration:none;padding:14px 28px;border-radius:10px;transition:transform .15s ease,box-shadow .15s ease;box-shadow:0 6px 20px rgba(0,194,168,.28)}
.cta .btn:hover{transform:translateY(-1px);box-shadow:0 10px 28px rgba(0,194,168,.36)}
.cta .fine{margin-top:16px;font-family:var(--mono);font-size:11px;color:#8696A8;letter-spacing:.03em}

footer{background:var(--navy-deep);color:#8696A8;padding:30px 0;border-top:1px solid #000}
footer .wrap{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
footer .fb{display:flex;align-items:center;gap:11px}
footer .fw{font-family:var(--disp);font-weight:700;letter-spacing:.18em;font-size:12px;color:#C7D2DD;text-transform:uppercase}
footer .fm{font-family:var(--mono);font-size:10.5px;letter-spacing:.04em;color:#6B7B8D;text-align:right}

/* claim-status pipeline + monthly (the "inside look") */
.skind{display:inline-block;width:9px;height:9px;border-radius:2px;margin-right:7px;vertical-align:middle}
.kc-won{background:var(--teal)} .kc-progress{background:var(--amber)} .kc-open{background:#7689a6} .kc-lost{background:var(--coral)}
.sclaims{font-family:var(--mono);font-size:11px;color:var(--muted-2);margin-top:6px}

@media (prefers-reduced-motion:reduce){
  *{transition:none!important;animation:none!important}
  .row .fill,.gapbar .gfill{width:var(--w)!important}
}

/* ---- masthead right cluster ---- */
.mast-right{display:flex;align-items:center;gap:18px;flex-wrap:wrap;justify-content:flex-end}

/* ---- print button ---- */
.print-btn{
  display:inline-flex;align-items:center;gap:7px;
  padding:8px 14px;border-radius:8px;border:1.5px solid var(--hair);
  background:var(--card);color:var(--navy);font-family:var(--mono);
  font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  cursor:pointer;transition:border-color .14s,background .14s,box-shadow .14s;
  white-space:nowrap;
}
.print-btn:hover{border-color:var(--teal);background:#f3fcfa;box-shadow:0 2px 8px rgba(0,194,168,.10)}
.print-btn svg{flex:0 0 auto;color:var(--teal)}

/* ---- sticky section nav ---- */
.sect-nav{
  background:var(--card);border-bottom:1px solid var(--hair);
  position:sticky;top:0;z-index:40;
  box-shadow:0 1px 0 var(--hair),0 2px 8px rgba(10,22,40,.04);
}
.snav-inner{
  display:flex;align-items:center;gap:2px;overflow-x:auto;
  padding:0 4px;
}
.snav-inner::-webkit-scrollbar{display:none}
.snav-link{
  flex:0 0 auto;padding:11px 14px;
  font-family:var(--mono);font-size:10.5px;font-weight:700;
  letter-spacing:.08em;text-transform:uppercase;
  color:var(--muted);text-decoration:none;border-radius:6px;
  transition:color .13s,background .13s;white-space:nowrap;
  position:relative;
}
.snav-link:hover{color:var(--navy);background:var(--hair-2)}
.snav-link.active{color:var(--navy)}
.snav-link.active::after{
  content:"";position:absolute;bottom:0;left:14px;right:14px;
  height:2px;background:var(--teal);border-radius:2px 2px 0 0;
}

/* ============================================================
   PLATFORM UPGRADE: the operating-platform modules around the denial core.
   Denial-intelligence sections above stay primary and visually loudest; these
   style the five workflow lanes (eligibility, prior-auth, denial, appeals,
   guarantor), the honest status chips (live / partial / preview), the ownership
   panel, the payer capability grid, launch-readiness tiles, and the workflow map.
   All reuse the navy / teal / gold tokens above. Colors that carry the honest
   go/no-go signal are forced to survive PDF export (print-color-adjust:exact) so
   a preview never prints as if it were live client data. New selectors only, so
   the existing denial-core sections are untouched. */

/* ---- status chips: the honest go/no-go signal (live / partial / preview) ---- */
.status-chip{
  display:inline-flex;align-items:center;gap:6px;vertical-align:middle;
  font-family:var(--mono);font-weight:700;font-size:10px;line-height:1;
  letter-spacing:.1em;text-transform:uppercase;white-space:nowrap;
  padding:4px 10px;border-radius:999px;
  border:1px solid var(--hair);background:var(--hair-2);color:var(--muted);
  -webkit-print-color-adjust:exact;print-color-adjust:exact;
}
.status-chip::before{content:"";flex:0 0 auto;width:7px;height:7px;border-radius:50%;background:currentColor;opacity:.9}
/* live = teal (green): source-backed, reconciles by construction */
.status-chip--live{background:#e8f8f5;border-color:#c7ece6;color:var(--teal-dim)}
.status-chip--live::before{background:var(--teal)}
/* partial = amber: live where the ledger backs it, labeled synthetic elsewhere */
.status-chip--partial{background:#fbf3e2;border-color:#f0dcae;color:#8a6a24}
.status-chip--partial::before{background:var(--amber)}
/* preview = slate/grey: synthetic sample or planned stub, never live */
.status-chip--preview{background:#eef1f6;border-color:#d7dee8;color:#586a86}
.status-chip--preview::before{background:#7689a6}

/* ---- module cards (eligibility, prior-auth, appeals, guarantor + module legend) ---- */
.mod-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
@media (max-width:640px){.mod-grid{grid-template-columns:1fr}}
.mod-card{
  position:relative;overflow:hidden;
  border:1px solid var(--hair);border-radius:14px;background:var(--card);
  box-shadow:var(--shadow);padding:20px 22px;
  display:flex;flex-direction:column;gap:14px;
}
/* top accent encodes the module status, so the card reads live/partial/preview even past the chip */
.mod-card::before{content:"";position:absolute;top:0;left:0;right:0;height:3px;background:var(--hair);-webkit-print-color-adjust:exact;print-color-adjust:exact}
.mod-card--live::before{background:var(--teal)}
.mod-card--partial::before{background:var(--amber)}
.mod-card--preview::before{background:linear-gradient(90deg,#7689a6,#9aa6bb)}
/* preview cards read a touch cooler/greyer so synthetic never looks like live client data */
.mod-card--preview{background:linear-gradient(180deg,#fcfcfb,#fafbfc)}
.mod-card__head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.mod-card__title{font-family:var(--disp);font-weight:600;font-size:16px;letter-spacing:-.01em;color:var(--navy)}
.mod-card--preview .mod-card__title{color:#33415c}
.mod-card__cap{font-size:12.5px;color:var(--muted);line-height:1.5}
.mod-card__body{display:flex;flex-direction:column;gap:12px}
/* honest footnote inside a module (e.g. "no live feed connected yet") */
.mod-note{font-family:var(--mono);font-size:11px;color:var(--muted-2);letter-spacing:.02em;line-height:1.5;padding-top:11px;border-top:1px dashed var(--hair)}
.mod-note b{color:var(--teal-dim)}

/* compact label / value rows shared by module buckets, appeal pipeline, guarantor letters */
.mod-item{display:flex;align-items:center;gap:12px;padding:11px 0;border-bottom:1px solid var(--hair-2)}
.mod-item:last-child{border-bottom:none}
.mod-item__label{flex:1 1 auto;min-width:0;font-size:13px;color:var(--ink);font-weight:500}
.mod-item__label small{display:block;color:var(--muted-2);font-weight:400;font-size:11px;margin-top:2px}
.mod-item__val{flex:0 0 auto;font-family:var(--mono);font-weight:700;font-size:13.5px;color:var(--navy);min-width:44px;text-align:right}
/* kind dots reuse the existing .skind pill; new kinds for the module buckets/pipeline */
.skind.k-ok,.skind.k-won{background:var(--teal)}
.skind.k-flag,.skind.k-progress{background:var(--amber)}
.skind.k-open{background:#7689a6}
.skind.k-lost{background:var(--coral)}

/* synthetic-labeled sub-block (appeals drafting states, sample-only content) */
.synthetic-block{margin-top:6px;border:1px dashed var(--hair);background:#faf9f5;border-radius:10px;padding:14px 16px}
.synthetic-tag{
  display:inline-flex;align-items:center;gap:6px;
  font-family:var(--mono);font-size:9.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;
  color:#8a7a4a;background:#f4efe0;border:1px solid #e6dcc0;border-radius:999px;padding:3px 9px;
  -webkit-print-color-adjust:exact;print-color-adjust:exact;
}

/* guarantor letter workflow-state pills (the human-review send gate is enforced in data;
   this only colors the state). approved/sent = teal, held for review = amber, suppressed = slate. */
.state-chip{
  display:inline-flex;align-items:center;font-family:var(--mono);font-weight:700;font-size:9.5px;
  letter-spacing:.07em;text-transform:uppercase;line-height:1;white-space:nowrap;
  padding:4px 9px;border-radius:999px;border:1px solid var(--hair);background:var(--hair-2);color:var(--muted);
  -webkit-print-color-adjust:exact;print-color-adjust:exact;
}
.state-chip--ok{background:#e8f8f5;border-color:#c7ece6;color:var(--teal-dim)}
.state-chip--hold{background:#fbf3e2;border-color:#f0dcae;color:#8a6a24}
.state-chip--muted{background:#eef1f6;border-color:#d7dee8;color:#586a86}

/* ---- workflow map: the five lanes around the denial core ---- */
.workflow-map{display:flex;gap:12px;flex-wrap:wrap;align-items:stretch}
@media (max-width:760px){.workflow-map{flex-direction:column}}
.workflow-lane{
  flex:1 1 150px;min-width:0;position:relative;overflow:hidden;
  border:1px solid var(--hair);border-radius:13px;background:var(--card);box-shadow:var(--shadow);
  padding:16px 16px 15px 19px;display:flex;flex-direction:column;gap:9px;
  -webkit-print-color-adjust:exact;print-color-adjust:exact;
}
/* left rail is role-tinted: prevent = gold (upstream), core = teal (denial), resolve = amber (downstream) */
.workflow-lane::before{content:"";position:absolute;inset:0 auto 0 0;width:3px;background:var(--hair)}
.workflow-lane--prevent::before{background:var(--gold)}
.workflow-lane--resolve::before{background:var(--amber)}
.workflow-lane--core::before{background:var(--teal);width:4px}
/* the denial lane is the core: emphasized with a teal tint + lift so it reads as primary */
.workflow-lane--core{border-color:#c7ece6;background:#f3fcfa;box-shadow:0 1px 2px rgba(0,194,168,.06),0 12px 30px rgba(0,194,168,.12)}
/* top row: role tag on the left, honest status chip on the right */
.workflow-lane__top{display:flex;align-items:center;justify-content:space-between;gap:8px}
/* order reads as a small spaced badge before the lane name (never glued: "1 Eligibility") */
.workflow-lane__order{font-family:var(--mono);font-size:10px;color:var(--muted-2);letter-spacing:.08em;margin-right:8px}
.workflow-lane__name{font-family:var(--disp);font-weight:600;font-size:14.5px;line-height:1.2;color:var(--navy)}
.workflow-lane--core .workflow-lane__name{color:var(--teal-dim)}
.workflow-lane__role{font-family:var(--mono);font-size:9.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted-2)}
/* core-lane footnote ("The core...") sits under the name */
.workflow-lane__tag{font-family:var(--mono);font-size:10px;line-height:1.4;letter-spacing:.02em;color:var(--teal-dim)}

/* ---- launch-readiness tiles (source-backed live/partial + synthetic-only preview) ---- */
.metric-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}
@media (max-width:720px){.metric-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:460px){.metric-grid{grid-template-columns:1fr}}
.metric-tile{
  position:relative;overflow:hidden;
  border:1px solid var(--hair);border-radius:12px;background:var(--card);box-shadow:var(--shadow);
  padding:16px 17px;display:flex;flex-direction:column;gap:0;
  -webkit-print-color-adjust:exact;print-color-adjust:exact;
}
.metric-tile::after{content:"";position:absolute;inset:0 auto 0 0;width:3px;background:var(--hair)}
.metric-tile--live::after{background:var(--teal)}
.metric-tile--partial::after{background:var(--amber)}
.metric-tile--preview::after{background:#7689a6}
.metric-tile__top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.metric-tile__val{font-family:var(--mono);font-weight:700;font-size:25px;line-height:1;letter-spacing:-.01em;color:var(--navy)}
/* preview values are muted so a synthetic sample number never reads as a hard client result */
.metric-tile--preview .metric-tile__val{color:var(--muted)}
.metric-tile__lbl{font-size:12.5px;color:var(--ink);font-weight:600;margin-top:8px;line-height:1.35}
.metric-tile__note{font-size:11px;color:var(--muted);margin-top:7px;line-height:1.4;padding-top:8px;border-top:1px dashed var(--hair)}
/* not-computable state (live mode, no feed): render the note where the number would be, never a value */
.metric-tile--na .metric-tile__val{font-family:var(--body);font-style:italic;font-weight:600;font-size:13px;color:var(--muted-2)}

/* ---- ownership: engine-does vs human-does, nothing auto-executes ---- */
.owner-panel{border:1px solid var(--hair);border-radius:16px;background:var(--card);box-shadow:var(--shadow);overflow:hidden}
.owner-panel__principle{
  display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  padding:16px 20px;border-bottom:1px solid var(--hair);
  background:linear-gradient(180deg,#fbfbf9,#f6f5f1);
  font-size:13.5px;font-weight:600;color:var(--navy);line-height:1.45;
}
.owner-row{display:grid;grid-template-columns:150px 1fr 1fr;border-bottom:1px solid var(--hair-2)}
.owner-row:last-child{border-bottom:none}
@media (max-width:640px){.owner-row{grid-template-columns:1fr}}
.owner-mod{display:flex;align-items:center;padding:14px 20px;font-family:var(--mono);font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--navy)}
.owner-cell{padding:14px 20px;font-size:13px;color:#3c4350;line-height:1.5;border-left:1px solid var(--hair-2)}
@media (max-width:640px){.owner-cell{border-left:none;padding-top:0}}
.owner-cell__h{display:block;font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;margin-bottom:5px}
.owner-cell--engine .owner-cell__h{color:var(--teal-dim)}
.owner-cell--human .owner-cell__h{color:#9a7e3f}
/* the visible "nothing auto-executes" marker (auto_execute:false) */
.owner-lock{
  display:inline-flex;align-items:center;gap:6px;margin-left:auto;
  font-family:var(--mono);font-size:9.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
  color:var(--teal-dim);background:#e8f8f5;border:1px solid #c7ece6;border-radius:999px;padding:4px 10px;
  -webkit-print-color-adjust:exact;print-color-adjust:exact;
}
.owner-lock::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--teal);flex:0 0 auto}
/* one owner-panel card per role, stacked; the principle statement sits above them */
.owner-panels{display:flex;flex-direction:column;gap:16px}
.owner-principle{margin-bottom:16px;font-size:14px;color:var(--navy);line-height:1.5}
/* the "nothing auto-executes" lock reads as a padded footer under each panel's row */
.owner-panel>.owner-lock{margin:14px 20px 16px}

/* ---- payer-family capability grid (flags, NOT results) ---- */
.payer-grid{border:1px solid var(--hair);border-radius:14px;background:var(--card);box-shadow:var(--shadow);overflow:hidden}
.payer-scroll{overflow-x:auto}
.payer-row{
  display:grid;grid-template-columns:minmax(150px,1.5fr) repeat(5,minmax(72px,1fr));
  align-items:center;min-width:640px;border-bottom:1px solid var(--hair-2);
}
.payer-row:last-child{border-bottom:none}
.payer-row--head{background:linear-gradient(180deg,#fbfbf9,#f6f5f1);border-bottom:1px solid var(--hair)}
.payer-cell{padding:12px;font-size:12.5px;color:var(--ink);text-align:center;border-left:1px solid var(--hair-2)}
.payer-cell:first-child{border-left:none}
.payer-row--head .payer-cell{font-family:var(--mono);font-size:9.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);line-height:1.3}
.payer-name{text-align:left;font-weight:600;color:var(--navy)}
.payer-name small{display:block;margin-top:2px;font-family:var(--mono);font-size:10px;font-weight:400;letter-spacing:0;text-transform:none;color:var(--muted-2)}
/* check = capability present (teal), dash = not present (muted). A dash is honest, not a failure. */
.payer-flag{font-family:var(--mono);font-weight:700;font-size:14px;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.payer-flag--yes{color:var(--teal-dim)}
.payer-flag--no{color:var(--muted-2)}
.payer-note{margin-top:14px;font-size:12px;color:var(--muted-2);font-style:italic;line-height:1.5}

/* ============================================================
   CODING INTEGRITY (PREVIEW): the upstream denial-prevention companion, rendered
   as a subsection UNDER Denial Prevention, AFTER the denial-intelligence core (which
   stays visually primary). Everything here is synthetic PREVIEW: the client-facing
   contract is masked by construction (no raw CPT, no dollars, no RVU, no RAF), so
   these styles never carry a live client result. Reuse the platform primitives above
   (mod-card, shead/snum/stitle/ssub, status-chip + status-chip--preview, stats/stat,
   synthetic-tag, reconcile/human-note, metric-tile + metric-tile--preview) for the six
   CI sections; the NEW ci-* selectors below only add the scenario cards, the NCCI risk
   badges (pass/validation_needed/hard_stop), the mandatory validation notice, the
   no-auto-modifier emphasis, the review-queue table, and the estimate note. Full literal
   class per badge/level value (no prefix splicing), matching the statusChip convention.
   Colors that carry the compliance signal are forced to survive PDF export. */

/* ---- simulator scenario cards (compose with mod-card) ---- */
/* Each scenario is a mod-card; the top rail marks its role. Alternatives read gold
   (upstream prevention identity, matching workflow-lane--prevent); the current claim
   as coded reads slate/neutral so the baseline never looks like an endorsed path.
   Ordering is by documentation support + compliance in the data, never by dollars. */
.ci-scenario-card{gap:12px}
.ci-scenario-card::before{background:var(--gold)}
.ci-scenario-current{background:linear-gradient(180deg,#fbfbfa,#f6f7f9)}
.ci-scenario-current::before{background:linear-gradient(90deg,#5b6b86,#7689a6)}
.ci-scenario-current .mod-card__title{color:#33415c}

/* ---- NCCI risk badge: pass (green) / validation_needed (amber) / hard_stop (red) ----
   Visually distinct pill used on simulator scenarios, NCCI case cards, and queue rows.
   A small rounded-square marker distinguishes it from the round PREVIEW status-chip dot. */
.ci-risk-badge{
  display:inline-flex;align-items:center;gap:6px;vertical-align:middle;
  font-family:var(--mono);font-weight:700;font-size:9.5px;line-height:1;
  letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;
  padding:4px 9px;border-radius:999px;
  border:1px solid var(--hair);background:var(--hair-2);color:var(--muted);
  -webkit-print-color-adjust:exact;print-color-adjust:exact;
}
.ci-risk-badge::before{content:"";flex:0 0 auto;width:7px;height:7px;border-radius:2px;background:currentColor;opacity:.85}
/* pass = teal/green: no edit barrier */
.ci-risk-badge--pass{background:#e8f8f5;border-color:#c7ece6;color:var(--teal-dim)}
/* validation_needed = amber: human / documentation review required before billing */
.ci-risk-badge--validation{background:#fbf3e2;border-color:#f0dcae;color:#8a6a24}
/* hard_stop = coral/red: cannot be unbundled, correct the coding (never auto-append a modifier) */
.ci-risk-badge--hard-stop{background:#fdece7;border-color:#f4cabb;color:#b34228}

/* ---- mandatory "validation required before billing" notice ----
   Rendered for every alternative scenario and every queue item. Amber = a caution / human
   go-gate, matching the go/no-go amber used elsewhere; nothing here is billable as-is. */
.ci-validation-notice{
  display:flex;align-items:center;gap:8px;margin-top:2px;
  font-family:var(--mono);font-size:10px;font-weight:700;line-height:1.4;
  letter-spacing:.06em;text-transform:uppercase;
  color:#8a6a24;background:#fbf3e2;border:1px solid #f0dcae;border-radius:8px;
  padding:8px 11px;
  -webkit-print-color-adjust:exact;print-color-adjust:exact;
}
.ci-validation-notice::before{content:"";flex:0 0 auto;width:8px;height:8px;border-radius:2px;background:var(--amber)}

/* ---- no-auto-modifier emphasis (the guardrail is always visible on NCCI cards) ----
   Teal reads as the safe policy: the engine never auto-appends a modifier to bypass an edit. */
.ci-no-modifier-note{
  margin-top:10px;
  font-family:var(--mono);font-size:11px;line-height:1.5;letter-spacing:.02em;
  color:var(--teal-dim);background:#e8f8f5;border-left:3px solid var(--teal);
  border-radius:0 8px 8px 0;padding:10px 13px;
  -webkit-print-color-adjust:exact;print-color-adjust:exact;
}
.ci-no-modifier-note b{color:var(--navy);font-weight:700}

/* ---- review-queue table (compose with mod-card; PHI-safe ref tokens like "Claim A") ----
   Head and row share one grid so columns line up: Reference / Issue / Risk / Owner /
   Next action / Status. The risk_level accent tints the row's left rail; the mandatory
   validation notice spans the full width beneath the row's cells. */
.ci-queue-table{padding:0;overflow-x:auto}
.ci-queue-head,.ci-queue-row{
  display:grid;
  grid-template-columns:minmax(84px,.85fr) minmax(158px,1.7fr) minmax(62px,.7fr) minmax(92px,1fr) minmax(150px,1.6fr) minmax(96px,.95fr);
  min-width:660px;border-left:3px solid transparent;
}
.ci-queue-head{
  background:linear-gradient(180deg,#fbfbf9,#f6f5f1);border-bottom:1px solid var(--hair);
}
.ci-queue-head>span{
  padding:12px 14px;font-family:var(--mono);font-size:9.5px;font-weight:700;
  letter-spacing:.05em;text-transform:uppercase;color:var(--muted);line-height:1.3;
}
.ci-queue-row{align-items:center;border-bottom:1px solid var(--hair-2)}
.ci-queue-row:last-child{border-bottom:none}
.ci-queue-row>*{padding:12px 14px;font-size:12.5px;color:var(--ink);line-height:1.45;min-width:0}
/* the ref token cell reads mono, like the other PHI-safe token labels */
.ci-queue-row>*:first-child{font-family:var(--mono);font-weight:700;color:var(--navy)}
/* the validation notice is a direct child of the row and spans every column */
.ci-queue-row .ci-validation-notice{grid-column:1 / -1;margin:0 14px 12px;padding:7px 10px}
/* risk_level accent on the row's left rail (full literal class per value) */
.ci-risk-level--high{border-left-color:var(--coral)}
.ci-risk-level--medium{border-left-color:var(--amber)}
.ci-risk-level--low{border-left-color:var(--teal)}

/* ---- metrics: the CI count tiles reuse metric-tile + metric-tile--preview (synthetic
   PREVIEW counts, never live). prevention_impact_estimate is NOT a number: it renders as a
   labeled [ESTIMATE] note via ci-metric-estimate, spanning the tile grid below the counts. */
.ci-metric-estimate{
  grid-column:1 / -1;margin-top:14px;
  font-family:var(--mono);font-size:11px;line-height:1.55;letter-spacing:.02em;
  color:var(--muted);background:#f7f8fa;border:1px dashed var(--hair);border-radius:10px;
  padding:12px 15px;
}
.ci-metric-estimate b{color:#586a86;font-weight:700}

/* ============================================================
   PATCH B: the Patch-A contract additions, rendered into the client view.
   Value recap strip (ROI reframe of numbers already shown, reinforces the hero
   without overshadowing it), the Trust & Controls FAQ, the NCCI connection chip
   (guardrail 4, visually distinct from the round PREVIEW status-chip), and the
   payer readiness chip. Navy / teal / gold tokens, print-safe. New selectors only,
   so the denial-core and platform styles above are untouched. */

/* ---- value recap strip (tiles match the stat-tile look) ---- */
.value-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}
@media (max-width:720px){.value-strip{grid-template-columns:repeat(2,1fr)}}
@media (max-width:460px){.value-strip{grid-template-columns:1fr}}
.value-tile{
  border:1px solid var(--hair);border-radius:12px;background:var(--card);
  padding:16px 17px;box-shadow:var(--shadow);display:flex;flex-direction:column;
}
.value-tile__label{font-size:12.5px;color:var(--ink);font-weight:600;line-height:1.35;margin-bottom:9px}
.value-tile__val{font-family:var(--mono);font-weight:700;font-size:25px;color:var(--navy);letter-spacing:-.01em;line-height:1}
.value-tile__basis{
  font-family:var(--mono);font-size:9.5px;color:var(--muted-2);letter-spacing:.02em;
  margin-top:10px;padding-top:8px;border-top:1px dashed var(--hair);line-height:1.45;
}

/* ---- Trust & Controls FAQ (rendered inside a mod-card) ---- */
.trust-faq{padding:14px 0;border-bottom:1px solid var(--hair-2)}
.trust-faq:first-child{padding-top:0}
.trust-faq:last-child{padding-bottom:0;border-bottom:none}
.trust-faq__q{font-family:var(--disp);font-weight:600;font-size:14.5px;color:var(--navy);line-height:1.4}
.trust-faq__a{font-size:13px;color:#3c4350;line-height:1.6;margin-top:7px}

/* ---- NCCI connection chip (guardrail 4): VISUALLY DISTINCT from the round PREVIEW status-chip.
   Rectangular and heavier, with a square marker. active = teal (a real edit set is loaded),
   preview = grey (no live edition connected). Full literal class per state; forced to survive PDF. ---- */
.ncci-conn-chip{
  display:inline-flex;align-items:center;gap:8px;margin:4px 0 14px;
  font-family:var(--mono);font-weight:700;font-size:10.5px;line-height:1.3;
  letter-spacing:.08em;text-transform:uppercase;
  padding:8px 13px;border-radius:8px;border:1px solid var(--hair);
  background:var(--hair-2);color:var(--muted);
  -webkit-print-color-adjust:exact;print-color-adjust:exact;
}
.ncci-conn-chip::before{content:"";flex:0 0 auto;width:9px;height:9px;border-radius:2px;background:currentColor}
/* active = teal/green: a live NCCI edition is loaded */
.ncci-conn-chip--active{background:#e8f8f5;border-color:#9fdccf;color:var(--teal-dim)}
.ncci-conn-chip--active::before{background:var(--teal)}
/* preview = grey: no live edition connected yet */
.ncci-conn-chip--preview{background:#eef1f6;border-color:#d7dee8;color:#586a86}
.ncci-conn-chip--preview::before{background:#7689a6}

/* ---- NCCI per-item "why flagged" one-liner (client-safe: no CPT, no dollars) ---- */
.ci-why-flagged{font-size:12.5px;color:var(--muted);font-style:italic;line-height:1.5}

/* ---- payer readiness chip (amber PARTIAL: structural support in place, live feed not connected) ---- */
.payer-readiness-chip{
  display:inline-flex;align-items:center;gap:6px;margin-top:6px;
  font-family:var(--mono);font-weight:700;font-size:9px;line-height:1;
  letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;
  padding:3px 8px;border-radius:999px;border:1px solid var(--hair);
  background:var(--hair-2);color:var(--muted);
  -webkit-print-color-adjust:exact;print-color-adjust:exact;
}
.payer-readiness-chip::before{content:"";flex:0 0 auto;width:6px;height:6px;border-radius:50%;background:currentColor}
.payer-readiness-chip--partial{background:#fbf3e2;border-color:#f0dcae;color:#8a6a24}
.payer-readiness-chip--partial::before{background:var(--amber)}

/* ---- print styles ---- */
@media print{
  .noprint{display:none!important}
  .sect-nav{display:none!important}
  body{background:#fff}
  .hero{background:var(--navy)!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .ribbon{display:none!important}
  section.block{break-inside:avoid;page-break-inside:avoid}
  .pcard{break-inside:avoid}
  .masthead{border-bottom:2px solid var(--teal)}
  footer{background:var(--navy)!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  /* platform-upgrade modules: keep cards intact and let the wide payer grid reflow onto the page */
  .mod-card,.metric-tile,.workflow-lane,.owner-panel,.owner-row,.payer-grid{break-inside:avoid;page-break-inside:avoid}
  .payer-scroll{overflow:visible!important}
  .payer-row{min-width:0!important}
  .workflow-map{gap:8px}
  /* coding-integrity (preview): keep scenario cards and queue rows intact, let the
     queue reflow onto the page instead of scrolling, keep the risk-signal colors */
  .ci-scenario-card,.ci-queue-table,.ci-queue-row{break-inside:avoid;page-break-inside:avoid}
  .ci-queue-table{overflow:visible!important}
  .ci-queue-head,.ci-queue-row{min-width:0!important}
  /* Patch B: keep value tiles and trust FAQ blocks intact across page breaks */
  .value-tile,.trust-faq{break-inside:avoid;page-break-inside:avoid}
}

/* ---- KPI panel set (2026-07-09): feed-gated tiles, heatmap, waterfall offsets ---- */
.stat.feedgated { opacity: .62; border: 1px dashed rgba(120, 140, 160, .45); }
.stat.feedgated .sv { font-size: 18px; letter-spacing: .5px; }
.track .fill { margin-left: var(--off, 0%); }
.hm-grid { display: grid; gap: 4px; margin-top: 14px; align-items: stretch; }
.hm-h { font-size: 11px; opacity: .7; padding: 4px 2px; text-align: center; }
.hm-p { font-size: 12px; opacity: .85; padding: 8px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-c { padding: 9px 4px; border-radius: 6px; font-size: 11px; text-align: center; min-height: 16px; }

/* ---- view router (2026-07-09): one client-sized view at a time; print shows all ---- */
.voff { display: none !important; }
@media print { [data-view].voff { display: block !important; } }
