/* The pivot (phase 6): production pXPNS 3.99's stylesheet for the reporting
   workspace (src/index.html of jlondon0/pxpns, PV-CSS-BEGIN to PV-CSS-END),
   ported as it is. Scoped to .pv; every colour is a light-dark() pair, so the
   page's color-scheme (light or dark) picks the theme. */
/* ── Pivot (3.99): the reporting workspace. Scoped to .pv; every colour is a
   light-dark() token, so color-scheme on .pv (or the root) picks the theme. ── */
.pv{
  --pv-sky:#4fb3e8;--pv-skyink:#10223a;--pv-orange:#ff7a1a;
  --pv-bg:light-dark(#ffffff,#0b1726);
  --pv-panel:light-dark(#f5f8fb,#0f1f33);
  --pv-card:light-dark(#ffffff,#112540);
  --pv-line:light-dark(#dfe6ee,#21395a);
  --pv-line2:light-dark(#eef2f6,#18304d);
  --pv-ink:light-dark(#10223a,#e8eff7);
  --pv-ink2:light-dark(#3d5068,#b7c6d8);
  --pv-ink3:light-dark(#5f7088,#8fa3bb);
  --pv-neg:light-dark(#c42b2b,#ff8a80);
  --pv-dim:light-dark(#e2f2fc,#16395a);
  --pv-dimb:light-dark(#9fd3f2,#2f6d9c);
  --pv-mea:light-dark(#fff0e4,#3a2412);
  --pv-meab:light-dark(#ffb27a,#b9561a);
  --pv-hover:light-dark(#f0f5fa,#15304f);
  --pv-sub:light-dark(#f7f9fb,#0f2238);
  --pv-focus:light-dark(#0b6fb8,#7cc6f2);
  --pv-other:light-dark(#9aa7b6,#6c7d92);
  --pv-icbg:light-dark(rgba(255,255,255,.65),rgba(255,255,255,.1));
  --c1:light-dark(#257de0,#338ced);--c2:light-dark(#f47230,#e76624);--c3:light-dark(#00b894,#00a888);--c4:light-dark(#f2a600,#d28e05);
  --c5:light-dark(#ee7fac,#e24d8b);--c6:light-dark(#008a17,#0aac23);--c7:light-dark(#6a4ce2,#9887ef);--c8:light-dark(#ec4647,#eb6263);
  --pv-head:'Outfit','Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
  --pv-text:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
  container:pv/inline-size;
  background:var(--pv-bg);color:var(--pv-ink);font-family:var(--pv-text);font-size:14px;line-height:1.45;
  border:1px solid var(--pv-line);border-radius:10px;overflow:hidden;min-width:0;max-width:100%;position:relative;
}
.pv.pv-dark{color-scheme:dark}
.pv *{box-sizing:border-box}
.pv button,.pv select,.pv textarea,.pv input{font-family:inherit;color:inherit}
/* A host's own th and label rules (the app sets both small and uppercase) stop at the pivot. */
.pv th,.pv td,.pv label{text-transform:none;letter-spacing:normal}
.pv label{color:inherit;margin-bottom:0;font-weight:500}
.pv .pv-t tbody th{font-size:13px;color:var(--pv-ink)}
.pv :focus-visible{outline:2px solid var(--pv-focus);outline-offset:2px}
.pv h2,.pv h3{font-family:var(--pv-head);font-weight:600;margin:0;text-wrap:balance}
/* Header band */
.pv-band{background:var(--pv-sky);color:var(--pv-skyink);padding:16px 18px}
.pv-band-in{display:flex;flex-wrap:wrap;gap:14px 24px;align-items:flex-end;justify-content:space-between}
.pv-eyebrow{font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;opacity:.8}
.pv-band h2{font-size:22px;line-height:1.15;color:var(--pv-skyink)}
.pv-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,auto));gap:8px}
.pv-kpi{background:rgba(255,255,255,.42);border:1px solid rgba(16,34,58,.12);border-radius:8px;padding:7px 12px;min-width:0}
.pv-kpi-l{font-size:11px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;opacity:.78;white-space:nowrap}
.pv-kpi-v{font-family:var(--pv-head);font-weight:600;font-size:19px;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--pv-skyink)}
.pv-kpi-v.pv-n{color:#9b1c1c}
@container pv (max-width:620px){.pv-kpis{grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.pv-kpi-v{font-size:17px}}
/* Data checks line */
.pv-checks{display:flex;flex-wrap:wrap;align-items:center;gap:4px 14px;padding:8px 18px;font-size:12.5px;color:var(--pv-ink2);background:var(--pv-panel);border-bottom:1px solid var(--pv-line)}
.pv-checks b{font-variant-numeric:tabular-nums;color:var(--pv-ink)}
.pv-chk{display:inline-flex;align-items:center;gap:6px}
.pv-dot{width:8px;height:8px;border-radius:50%;background:var(--c3);flex:none}
.pv-dot.pv-warn{background:var(--c4)}
.pv-checks details{display:inline}
.pv-checks summary{cursor:pointer;list-style:none;display:inline-flex;align-items:center;gap:6px;min-height:32px}
.pv-checks summary::-webkit-details-marker{display:none}
.pv-checks summary u{text-decoration-style:dotted;text-underline-offset:3px}
.pv-checks ul{margin:4px 0 6px;padding:8px 12px 8px 26px;background:var(--pv-card);border:1px solid var(--pv-line);border-radius:6px;max-height:180px;overflow:auto;font-size:12px}
.pv-checks details[open]{display:block;width:100%}
/* Two columns, stacked when narrow */
.pv-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:0}
@container pv (min-width:860px){.pv-grid{grid-template-columns:340px minmax(0,1fr)}.pv-side{border-right:1px solid var(--pv-line);border-bottom:0}}
/* On a narrow container (a phone) the result comes first: the layout panel is
   closed until the button opens it, above the table (P.1.10). */
.pv-side-tg{display:none}
@container pv (max-width:859.98px){.pv-side-tg{display:inline-flex;justify-self:start;margin:12px 14px 0}.pv-grid:not(.pv-open) .pv-side{display:none}.pv-grid.pv-open .pv-side{border-top:1px solid var(--pv-line);margin-top:12px}}
.pv-side{background:var(--pv-panel);padding:14px;display:flex;flex-direction:column;gap:12px;min-width:0;border-bottom:1px solid var(--pv-line)}
.pv-main{padding:14px;display:flex;flex-direction:column;gap:14px;min-width:0}
.pv-tools{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.pv-tools .pv-sp{flex:1}
.pv-btn{min-height:44px;padding:0 14px;border:1px solid var(--pv-line);background:var(--pv-card);border-radius:8px;font-size:13.5px;font-weight:500;cursor:pointer;display:inline-flex;align-items:center;gap:6px;color:var(--pv-ink)}
.pv-btn:hover{background:var(--pv-hover)}
.pv-btn:disabled{opacity:.45;cursor:default}
.pv-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
/* Shelves */
.pv-box{background:var(--pv-card);border:1px solid var(--pv-line);border-radius:8px;padding:8px 10px 10px;transition:border-color .12s,box-shadow .12s}
.pv-box-h{display:flex;align-items:center;justify-content:space-between;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--pv-ink3);margin:0 0 6px}
.pv-box-h span:last-child{font-weight:500;letter-spacing:0;text-transform:none}
.pv-list{display:flex;flex-wrap:wrap;gap:6px;min-height:44px;align-items:flex-start;align-content:flex-start;border-radius:6px}
.pv-list.pv-vert{flex-direction:column;flex-wrap:nowrap;align-items:stretch}
.pv-empty{font-size:12.5px;color:var(--pv-ink3);padding:12px 4px;align-self:center}
.pv-grp-h{font-size:11px;font-weight:600;color:var(--pv-ink3);margin:8px 0 4px}
.pv-grp-h:first-of-type{margin-top:2px}
.pv-box.pv-over{border-color:var(--pv-orange);box-shadow:0 0 0 2px color-mix(in srgb,var(--pv-orange) 28%,transparent)}
.pv-box.pv-no{opacity:.55}
/* Pills */
.pv-pill{touch-action:none;user-select:none;-webkit-user-select:none;display:inline-flex;align-items:center;gap:7px;min-height:44px;padding:4px 12px 4px 8px;border-radius:8px;border:1px solid var(--pv-dimb);background:var(--pv-dim);font-size:13.5px;font-weight:500;cursor:grab;max-width:100%;color:var(--pv-ink)}
.pv-pill.pv-m{border-color:var(--pv-meab);background:var(--pv-mea)}
.pv-pill:hover{filter:brightness(.97)}
.pv-pill.pv-dragging{opacity:.32}
.pv-pill .pv-ic{flex:none;width:22px;height:22px;border-radius:5px;display:inline-flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;background:var(--pv-icbg);color:var(--pv-ink2);font-family:var(--pv-text)}
.pv-pill .pv-ic svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2}
.pv-pill .pv-pl{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.pv-pill .pv-nest{color:var(--pv-ink3);font-weight:700}
.pv-vert .pv-pill{display:flex}
.pv-fsel{font-size:16px;min-height:36px;max-width:150px;border:1px solid var(--pv-line);border-radius:6px;background:var(--pv-card);padding:2px 6px;margin-left:auto;touch-action:auto;cursor:pointer}
.pv-ghost{position:fixed;left:0;top:0;z-index:2147483000;pointer-events:none;opacity:.82;box-shadow:0 10px 28px rgba(16,34,58,.28);cursor:grabbing;margin:0!important}
.pv-ph{border:2px dashed var(--pv-orange);border-radius:8px;background:color-mix(in srgb,var(--pv-orange) 10%,transparent);min-height:44px;flex:none}
.pv-ph.pv-caret{width:8px;border-radius:4px;margin:0 -3px}
/* Menu */
.pv-menu{position:absolute;z-index:50;min-width:220px;background:var(--pv-card);border:1px solid var(--pv-line);border-radius:10px;box-shadow:0 12px 32px rgba(16,34,58,.22);padding:6px;display:flex;flex-direction:column}
.pv-menu-h{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--pv-ink3);padding:6px 10px 4px}
.pv-menu button{min-height:44px;text-align:left;border:0;background:none;border-radius:6px;padding:0 10px;font-size:14px;cursor:pointer}
.pv-menu button:hover,.pv-menu button:focus-visible{background:var(--pv-hover)}
.pv-menu hr{border:0;border-top:1px solid var(--pv-line);margin:4px 0}
/* Toolbar */
.pv-bar{display:flex;flex-wrap:wrap;gap:10px 14px;align-items:center}
.pv-bar label{display:inline-flex;align-items:center;gap:8px;font-size:13.5px;font-weight:500;min-height:44px}
.pv-bar select{font-size:16px;min-height:44px;border:1px solid var(--pv-line);border-radius:8px;background:var(--pv-card);padding:0 10px}
.pv-bar input[type=checkbox]{width:20px;height:20px;accent-color:var(--pv-sky)}
.pv-bar label.pv-off{opacity:.5}
.pv-bar .pv-sp{flex:1}
/* Cards */
.pv-card{background:var(--pv-card);border:1px solid var(--pv-line);border-radius:10px;padding:14px 16px;min-width:0}
.pv-ch-t{font-size:16px;line-height:1.3}
.pv-ch-sub{display:flex;flex-wrap:wrap;gap:4px 12px;align-items:center;margin-top:4px;font-size:12.5px;color:var(--pv-ink3)}
.pv-trail{display:flex;flex-wrap:wrap;align-items:center;gap:2px;font-size:13px}
.pv-trail button{border:0;background:none;color:var(--pv-focus);font-weight:600;cursor:pointer;padding:0 4px;min-height:32px;border-radius:4px}
.pv-trail span.pv-sep{color:var(--pv-ink3);padding:0 2px}
.pv-trail b{padding:0 4px;font-weight:600}
.pv-chart{position:relative;width:100%;margin-top:10px;min-width:0}
.pv-chart svg{display:block;overflow:visible}
.pv-chart svg text{font-family:var(--pv-text);font-size:12px;fill:var(--pv-ink3)}
.pv-chart svg .pv-vl{fill:var(--pv-ink2);font-weight:600;font-size:11.5px}
.pv-chart svg .pv-ctr1{font-family:var(--pv-head);font-weight:600;font-size:24px;fill:var(--pv-ink)}
.pv-chart svg .pv-ctr2{font-size:12px;fill:var(--pv-ink3)}
.pv-chart svg .pv-grid-l{stroke:var(--pv-line2);stroke-width:1}
.pv-chart svg .pv-zero{stroke:var(--pv-ink3);stroke-width:1}
.pv-chart svg .pv-mk{stroke:var(--pv-card);stroke-width:2}
.pv-chart svg .pv-hit{cursor:pointer}
.pv-chart svg .pv-hit:hover{filter:brightness(1.08)}
.pv-chart svg .pv-xh{stroke:var(--pv-ink3);stroke-width:1;stroke-dasharray:4 4}
.pv-chart-wrap{display:flex;flex-wrap:wrap;gap:16px;align-items:center}
.pv-legend{display:flex;flex-wrap:wrap;gap:4px 16px;margin-top:10px;font-size:12.5px;color:var(--pv-ink2)}
.pv-legend.pv-col{flex-direction:column;flex-wrap:nowrap;gap:2px;margin-top:0;flex:1;min-width:200px}
.pv-lg{display:inline-flex;align-items:center;gap:7px;min-height:28px;border:0;background:none;padding:0 4px;border-radius:4px;font-size:12.5px;text-align:left}
button.pv-lg{cursor:pointer}
button.pv-lg:hover{background:var(--pv-hover)}
.pv-lg i{width:10px;height:10px;border-radius:3px;flex:none}
.pv-lg .pv-lgv{margin-left:auto;padding-left:14px;font-variant-numeric:tabular-nums;color:var(--pv-ink)}
.pv-lg .pv-lgp{width:48px;text-align:right;font-variant-numeric:tabular-nums;color:var(--pv-ink3)}
.pv-legend.pv-col .pv-lg{display:flex;width:100%}
.pv-notes{margin:10px 0 0;padding:0;list-style:none;font-size:12px;color:var(--pv-ink3);display:flex;flex-direction:column;gap:2px}
.pv-notes li::before{content:'i';display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;border-radius:50%;border:1px solid currentColor;font-size:9px;font-weight:700;margin-right:6px;vertical-align:1px}
.pv-msg{padding:28px 10px;text-align:center;color:var(--pv-ink3);font-size:13.5px}
/* Tooltip */
.pv-tip{position:fixed;z-index:2147483001;pointer-events:none;background:var(--pv-card);color:var(--pv-ink);border:1px solid var(--pv-line);border-radius:8px;box-shadow:0 8px 24px rgba(16,34,58,.2);padding:8px 10px;font-size:12.5px;max-width:280px;line-height:1.4}
.pv-tip b{display:block;font-family:var(--pv-head);font-weight:600;margin-bottom:2px}
.pv-tip .pv-tr{display:flex;gap:10px;align-items:center}
.pv-tip .pv-tr i{width:9px;height:9px;border-radius:2px;flex:none}
.pv-tip .pv-tr span:last-child{margin-left:auto;font-variant-numeric:tabular-nums;font-weight:600}
/* Tables */
.pv-tables{display:flex;flex-direction:column;gap:14px;min-width:0}
.pv-tbl-h{font-size:13px;font-weight:600;color:var(--pv-ink2);margin-bottom:6px}
.pv-scroll{overflow-x:auto;border:1px solid var(--pv-line);border-radius:8px;max-width:100%;-webkit-overflow-scrolling:touch}
.pv-t{border-collapse:separate;border-spacing:0;width:100%;font-size:13px;font-variant-numeric:tabular-nums}
.pv-t th,.pv-t td{padding:0 12px;height:36px;border-bottom:1px solid var(--pv-line2);white-space:nowrap}
.pv-t thead th{background:var(--pv-panel);font-weight:600;color:var(--pv-ink2);text-align:right;font-size:12px;position:relative}
.pv-t thead tr:first-child th{border-top:0}
.pv-t thead th.pv-sh{text-align:center;border-left:1px solid var(--pv-line)}
.pv-t thead th.pv-l{text-align:left}
.pv-t td{text-align:right}
.pv-t th:first-child,.pv-t td:first-child{position:sticky;left:0;z-index:1;text-align:left;background:var(--pv-card);border-right:1px solid var(--pv-line);max-width:min(260px,52vw);overflow:hidden;text-overflow:ellipsis}
.pv-t thead th:first-child{background:var(--pv-panel);z-index:2}
.pv-t tbody tr:hover td{background:var(--pv-hover)}
.pv-t tr.pv-d0 td{font-weight:600}
.pv-t tr.pv-sum td{background:var(--pv-sub)}
.pv-t tr.pv-gt td{font-weight:700;background:var(--pv-panel);border-top:2px solid var(--pv-line);border-bottom:0}
.pv-t td.pv-tot{border-left:1px solid var(--pv-line);font-weight:600}
.pv-t td.pv-neg{color:var(--pv-neg)}
.pv-t td.pv-e{color:var(--pv-ink3)}
.pv-rl{display:inline-flex;align-items:center;gap:4px;min-width:0;max-width:100%}
.pv-rl span{overflow:hidden;text-overflow:ellipsis}
.pv-tg{width:28px;height:28px;flex:none;border:1px solid var(--pv-line);background:var(--pv-card);border-radius:6px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0;position:relative}
.pv-tg::after{content:'';position:absolute;inset:-8px}
.pv-tg svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2.4;transition:transform .15s}
.pv-tg[aria-expanded=true] svg{transform:rotate(90deg)}
.pv-tgs{width:28px;flex:none;display:inline-block}
/* Own data */
.pv-own{border-top:1px solid var(--pv-line);padding:14px 18px;background:var(--pv-panel)}
.pv-own summary{cursor:pointer;font-family:var(--pv-head);font-weight:600;font-size:15px;min-height:44px;display:flex;align-items:center}
.pv-own-b{display:grid;gap:10px;margin-top:8px}
.pv-own textarea{width:100%;min-height:110px;font-size:16px;border:1px solid var(--pv-line);border-radius:8px;padding:10px;background:var(--pv-card);font-family:ui-monospace,Menlo,monospace}
.pv-own input[type=file]{font-size:16px;min-height:44px}
.pv-own p{margin:0;font-size:12.5px;color:var(--pv-ink3)}
.pv-err{color:var(--pv-neg);font-weight:600;font-size:13px}
.pv-ok{color:var(--pv-ink2);font-size:13px}
@media (prefers-reduced-motion:reduce){.pv *{transition:none!important;animation:none!important}}

/* Fallback for browsers without light-dark() (Safari before 17.5, Chrome
   before 123, Firefox before 120): the same pairs as plain values, light by
   default and dark where the page is dark (the device's scheme unless
   Settings chose light, Settings' dark, or a pivot drawn dark). css_sim holds
   these equal to the pairs above. */
@supports not (color: light-dark(#000, #fff)) {
.pv{--pv-bg:#ffffff;--pv-panel:#f5f8fb;--pv-card:#ffffff;--pv-line:#dfe6ee;--pv-line2:#eef2f6;--pv-ink:#10223a;--pv-ink2:#3d5068;--pv-ink3:#5f7088;--pv-neg:#c42b2b;--pv-dim:#e2f2fc;--pv-dimb:#9fd3f2;--pv-mea:#fff0e4;--pv-meab:#ffb27a;--pv-hover:#f0f5fa;--pv-sub:#f7f9fb;--pv-focus:#0b6fb8;--pv-other:#9aa7b6;--pv-icbg:rgba(255,255,255,.65);--c1:#257de0;--c2:#f47230;--c3:#00b894;--c4:#f2a600;--c5:#ee7fac;--c6:#008a17;--c7:#6a4ce2;--c8:#ec4647}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pv{--pv-bg:#0b1726;--pv-panel:#0f1f33;--pv-card:#112540;--pv-line:#21395a;--pv-line2:#18304d;--pv-ink:#e8eff7;--pv-ink2:#b7c6d8;--pv-ink3:#8fa3bb;--pv-neg:#ff8a80;--pv-dim:#16395a;--pv-dimb:#2f6d9c;--pv-mea:#3a2412;--pv-meab:#b9561a;--pv-hover:#15304f;--pv-sub:#0f2238;--pv-focus:#7cc6f2;--pv-other:#6c7d92;--pv-icbg:rgba(255,255,255,.1);--c1:#338ced;--c2:#e76624;--c3:#00a888;--c4:#d28e05;--c5:#e24d8b;--c6:#0aac23;--c7:#9887ef;--c8:#eb6263} }
:root[data-theme="dark"] .pv,.pv.pv-dark{--pv-bg:#0b1726;--pv-panel:#0f1f33;--pv-card:#112540;--pv-line:#21395a;--pv-line2:#18304d;--pv-ink:#e8eff7;--pv-ink2:#b7c6d8;--pv-ink3:#8fa3bb;--pv-neg:#ff8a80;--pv-dim:#16395a;--pv-dimb:#2f6d9c;--pv-mea:#3a2412;--pv-meab:#b9561a;--pv-hover:#15304f;--pv-sub:#0f2238;--pv-focus:#7cc6f2;--pv-other:#6c7d92;--pv-icbg:rgba(255,255,255,.1);--c1:#338ced;--c2:#e76624;--c3:#00a888;--c4:#d28e05;--c5:#e24d8b;--c6:#0aac23;--c7:#9887ef;--c8:#eb6263}
}
