/* Scoped companion to the original three-level clearing-pool pyramid. */
.cns-page .cns-clearing-pool-example.cpv {
  --cpv-purple:#c9b5e9;
  --cpv-mint:#a7d7d2;
  --cpv-gold:#ecc18e;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  padding:17px;
  color:#bfced5;
  font-family:'IBM Plex Sans',sans-serif;
}
.cns-page .cpv *, .cns-page .cpv *::before, .cns-page .cpv *::after { box-sizing:border-box; }
.cns-page .cpv [hidden] { display:none !important; }
.cns-page .cpv > figcaption { margin:0 0 10px; font-size:9px; line-height:1.6; }
.cns-page .cpv-controls { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin-bottom:13px; }
.cns-page .cpv-controls > button {
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  min-height:42px;
  margin:0;
  padding:7px 8px;
  border:1px solid #b4c5d135;
  border-radius:5px;
  background:#09131b85;
  color:#aebfca;
  font:500 11px/1.35 'IBM Plex Sans',sans-serif;
  text-align:center;
  text-transform:none;
  letter-spacing:0;
  cursor:pointer;
  transition:border-color .15s,background .15s,color .15s;
}
.cns-page .cpv-controls > button:hover { border-color:#c9b5e988; color:#e7e4ed; }
.cns-page .cpv-controls > button[aria-pressed="true"] { border-color:#c9b5e9a3; background:#c9b5e919; color:#e5d9f5; box-shadow:inset 0 -2px #c9b5e980; }
.cns-page .cpv-controls > button:focus-visible { outline:2px solid var(--cpv-gold); outline-offset:3px; }
.cns-page .cpv-layer { min-width:0; }
.cns-page .cpv-label { display:flex; align-items:center; justify-content:center; gap:7px; min-height:20px; margin-bottom:6px; color:#aec2cd; font:500 10px/1.45 'IBM Plex Sans',sans-serif; text-align:center; }
.cns-page .cpv-label > b { display:inline-flex; align-items:center; justify-content:center; flex:none; width:20px; height:20px; border:1px solid #bfa5e63b; border-radius:50%; color:var(--cpv-purple); font-size:9px; }
.cns-page .cpv-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; min-width:0; }
.cns-page .cpv-client { min-width:0; padding:8px 11px; border:1px solid #b3c8d02c; border-radius:6px; background:#a7d7d204; }
.cns-page .cpv-name { display:block; margin-bottom:4px; color:#d4dfe3; font-size:11px; font-weight:600; line-height:1.45; text-align:center; }
.cns-page .cpv-flow { display:flex; align-items:center; justify-content:space-between; gap:6px; min-width:0; padding:3px 0; color:#b1c3cc; font-size:11px; line-height:1.4; }
.cns-page .cpv-flow > strong { color:var(--cpv-purple); font:600 22px/1.1 'Manrope',sans-serif; }
.cns-page .cpv-flow.cpv-buy > strong { color:var(--cpv-mint); }
.cns-page .cpv-connectors { display:block; width:100%; height:17px; margin:0; fill:none; stroke:#a6c4cd75; stroke-width:1.3; stroke-linecap:round; stroke-linejoin:round; }
.cns-page .cpv-subtotals { width:88%; margin-inline:auto; }
.cns-page .cpv-subtotal { display:grid; justify-items:center; gap:1px; min-width:0; padding:6px 6px; border:1px solid #c9b5e942; border-radius:6px; background:#c9b5e909; text-align:center; }
.cns-page .cpv-subtotal > span, .cns-page .cpv-member > span { color:#bfced5; font-size:10px; line-height:1.4; }
.cns-page .cpv-subtotal small { display:inline; margin-left:3px; color:#8fa8b5; font-size:9px; white-space:nowrap; }
.cns-page .cpv-subtotal > strong { color:var(--cpv-purple); font:600 29px/1.1 'Manrope',sans-serif; }
.cns-page .cpv-receive { border-color:#a7d7d242; background:#a7d7d208; }
.cns-page .cpv-subtotal.cpv-receive > strong, .cns-page .cpv-member.cpv-receive > strong { color:var(--cpv-mint); }
.cns-page .cpv-offset { min-height:49px; }
.cns-page .cpv-merge { height:17px; stroke:#ecc18eaa; }
.cns-page .cpv-merge-path { display:block; }
.cns-page .cpv-separate-path { display:none; }
.cns-page .cpv-offset-note { display:flex; align-items:center; justify-content:center; gap:8px; min-height:25px; width:max-content; max-width:100%; margin:0 auto 7px; padding:3px 8px; border:1px solid #ecc18e42; border-radius:4px; background:#ecc18e0b; color:#dbc7ae; font-size:10px; line-height:1.4; text-align:center; }
.cns-page .cpv-offset-note b { color:var(--cpv-gold); font-weight:650; }
.cns-page .cpv-remainder { padding-left:8px; border-left:1px solid #ecc18e42; color:var(--cpv-gold); font-weight:600; white-space:nowrap; }
.cns-page .cpv-offset-separate { border-color:#b3c8d025; background:#b3c8d004; color:#9eb3c0; }
.cns-page .cpv[data-cpv-mode="separate"] .cpv-merge { stroke:#a6c4cd75; }
.cns-page .cpv[data-cpv-mode="separate"] .cpv-merge-path { display:none; }
.cns-page .cpv[data-cpv-mode="separate"] .cpv-separate-path { display:block; }
.cns-page .cpv-member-results { min-height:70px; }
.cns-page .cpv-result { display:grid; align-content:center; width:76%; min-height:70px; min-width:0; margin-inline:auto; padding:6px 8px; border:1px solid #ecc18e55; border-radius:7px; background:#ecc18e08; text-align:center; }
.cns-page .cpv-result > div { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:9px; }
.cns-page .cpv-result > div > span { color:#c6b9a8; font-size:15px; line-height:1.2; }
.cns-page .cpv-result strong { color:var(--cpv-gold); font:600 35px/1.1 'Manrope',sans-serif; }
.cns-page .cpv-result > span { display:block; margin-top:3px; color:#e7d7c3; font-size:11px; line-height:1.4; }
.cns-page .cpv-separate-members { width:88%; min-height:70px; margin-inline:auto; }
.cns-page .cpv-member { display:grid; align-content:center; justify-items:center; gap:2px; min-width:0; padding:5px; border:1px solid #c9b5e942; border-radius:6px; background:#c9b5e909; text-align:center; }
.cns-page .cpv-member > strong { color:var(--cpv-purple); font:600 27px/1.05 'Manrope',sans-serif; }
.cns-page .cpv-member.cpv-receive { border-color:#a7d7d242; background:#a7d7d208; }
.cns-page .cpv > .cpv-status { display:flex; align-items:center; min-height:42px; margin:8px 0 0; color:#c1d6d3; font-size:11px; line-height:1.55; text-align:center; }
.cns-page .cpv-settlement { margin-top:8px; padding-top:11px; border-top:1px solid #a7d7d22b; }
.cns-page .cpv-settlement-title { display:flex; align-items:center; justify-content:space-between; gap:8px; color:#d9e3de; font-size:11px; font-weight:600; line-height:1.4; }
.cns-page .cpv-settlement-title > b { flex:none; padding:3px 6px; border:1px solid #ecc18e42; border-radius:4px; color:var(--cpv-gold); font:500 9px/1.4 'IBM Plex Mono',monospace; white-space:nowrap; }
.cns-page .cpv-settlement-context { display:block; margin:4px 0 8px; color:#8fa7b4; font-size:9px; line-height:1.45; }
.cns-page .cpv-route { display:grid; grid-template-columns:1.2fr 9px 1.45fr 9px .65fr 9px .75fr; align-items:stretch; gap:3px; min-width:0; }
.cns-page .cpv-route-node { display:flex; align-items:center; justify-content:center; min-width:0; min-height:40px; padding:5px 3px; border:1px solid #a7d7d235; border-radius:4px; background:#a7d7d206; color:#b8cdd2; font-size:10px; line-height:1.4; text-align:center; }
.cns-page .cpv-source { border-color:#ecc18e50; color:#e1cfb6; background:#ecc18e08; }
.cns-page .cpv-dtc, .cns-page .cpv-nscc { font-family:'IBM Plex Mono',monospace; font-weight:500; }
.cns-page .cpv-route-arrow { display:flex; align-items:center; justify-content:center; color:#aac7c5; font-size:13px; }
.cns-page .cpv-settlement > p { margin:8px 0 0; color:#9fb6c1; font-size:10px; line-height:1.6; }
.cns-page .cpv > .cpv-scope { display:block; margin-top:11px; color:#8fa8b6; font-size:9px; line-height:1.65; }
@media(max-width:450px) {
  .cns-page .cns-clearing-pool-example.cpv { padding:12px; }
  .cns-page .cpv-controls { gap:5px; }
  .cns-page .cpv-controls > button { padding:7px 5px; font-size:10px; }
  .cns-page .cpv-pair { gap:8px; }
  .cns-page .cpv-client { padding:7px; }
  .cns-page .cpv-name { min-height:29px; font-size:10px; }
  .cns-page .cpv-flow { gap:4px; font-size:10px; }
  .cns-page .cpv-flow > strong { font-size:20px; }
  .cns-page .cpv-subtotals, .cns-page .cpv-separate-members { width:94%; }
  .cns-page .cpv-subtotal small { display:block; margin:1px 0 0; }
  .cns-page .cpv-subtotal > span, .cns-page .cpv-member > span { font-size:9px; }
  .cns-page .cpv-offset-note { gap:5px; padding-inline:5px; font-size:9px; }
  .cns-page .cpv-remainder { padding-left:5px; }
  .cns-page .cpv-label { font-size:9px; }
  .cns-page .cpv-result { width:85%; }
  .cns-page .cpv-result > span { font-size:10px; }
  .cns-page .cpv > .cpv-status { min-height:47px; font-size:10px; }
  .cns-page .cpv-settlement-title { gap:5px; font-size:10px; }
  .cns-page .cpv-settlement-title > b { padding:2px 4px; font-size:8px; }
  .cns-page .cpv-route { grid-template-columns:1.2fr 7px 1.45fr 7px .65fr 7px .75fr; gap:2px; }
  .cns-page .cpv-route-node { padding-inline:2px; font-size:9px; }
  .cns-page .cpv-dtc, .cns-page .cpv-nscc { font-size:9px; }
}
@media(prefers-reduced-motion:reduce) {
  .cns-page .cpv-controls > button { transition:none; }
}

.cns-page .cpv-separate-route { display:grid; grid-template-columns:1fr 1.4fr 1fr; align-items:center; gap:10px 6px; padding:7px 0; color:#b9cdd3; font-size:10px; line-height:1.5; }
.cns-page .cpv-separate-route b { color:#c9b5e9; font-weight:500; text-align:center; }

/* Four client-flow categories, grouped by receive and deliver direction. */
.cns-page .cpv .cpv-client { padding:10px 11px; }
.cns-page .cpv .cpv-name { margin-bottom:7px; }
.cns-page .cpv .cpv-trade-group + .cpv-trade-group { margin-top:8px; padding-top:8px; border-top:1px solid #b3c8d027; }
.cns-page .cpv .cpv-flow { padding:4px 0; }
.cns-page .cpv .cpv-flow > span { min-width:0; }
.cns-page .cpv .cpv-flow > span > small { display:block; color:#8fa8b5; font-size:9px; line-height:1.4; }
.cns-page .cpv .cpv-flow-total { display:flex; align-items:baseline; justify-content:space-between; gap:6px; margin-top:3px; padding-top:5px; border-top:1px solid #b3c8d01c; color:#b5c6cf; font-size:10px; line-height:1.5; }
.cns-page .cpv .cpv-flow-total > strong { color:#d7d5e3; font-size:12px; font-weight:650; }
.cns-page .cpv .cpv-buys .cpv-flow-total > strong { color:var(--cpv-mint); }
.cns-page .cpv > .cpv-trade-key { margin:9px 0 0; color:#95aebb; font-size:10px; line-height:1.6; text-align:left; }
.cns-page .cpv > .cpv-trade-key strong { display:inline; margin:0; color:#c3d4dc; font:inherit; font-weight:600; }
@media(max-width:450px) {
 .cns-page .cpv .cpv-client { padding:8px 7px; }
 .cns-page .cpv .cpv-flow > strong { font-size:19px; }
 .cns-page .cpv .cpv-flow-total { font-size:9px; }
 .cns-page .cpv > .cpv-trade-key { font-size:9px; }
}

/* Explanations stay on the left, beside the three-stage comparison. */
.cns-page #cns-clearing-pool .cns-clearing-pool-text { min-width:0; }
.cns-page #cns-clearing-pool .cns-clearing-pool-body { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.08fr); align-items:start; gap:24px; }
.cns-page #cns-clearing-pool .cns-clearing-pool-copy { display:grid; grid-template-columns:minmax(0,1fr); align-items:start; gap:18px; }
.cns-page #cns-clearing-pool .cns-pool-explainer { min-width:0; margin:0; padding:0 0 0 14px; border-left:2px solid #c9b5e93d; }
.cns-page #cns-clearing-pool .cns-pool-explainer:first-child { grid-column:1/-1; }
.cns-page #cns-clearing-pool .cns-pool-explainer h5 { margin:0 0 6px; color:#d8d0e7; font-size:14px; font-weight:600; line-height:1.5; }
#app #content.cns-page #cns-clearing-pool :is(.cns-pool-explainer p,.cns-pool-intro) { margin:0; font-size:14px; line-height:1.75; text-align:justify!important; text-align-last:left!important; text-justify:inter-word; hyphens:none!important; -webkit-hyphens:none!important; }
.cns-page #cns-clearing-pool .cpv-wide { margin:0; padding:16px; border-color:#a7d7d235; background:#0c1721b3; }
.cns-page #cns-clearing-pool .cpv-wide > figcaption { margin:0 0 10px; color:#c5d5db; font-size:11px; line-height:1.6; text-align:left; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-controls { gap:8px; margin:0 0 14px; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-controls > button { min-height:44px; padding:9px 10px; font-size:12px; }
.cns-page #cns-clearing-pool .cpv-workflow { display:grid; grid-template-columns:minmax(0,1fr); align-items:start; gap:12px; min-width:0; }
.cns-page #cns-clearing-pool .cpv-stage { min-width:0; margin:0; padding:12px; border:1px solid #b4c5d12b; border-radius:7px; background:#14202a52; }
.cns-page #cns-clearing-pool .cpv-stage-clients { border-top:2px solid #a7d7d28a; }
.cns-page #cns-clearing-pool .cpv-stage-subtotals { border-top:2px solid #c9b5e98a; }
.cns-page #cns-clearing-pool .cpv-stage-members { border-top:2px solid #ecc18e8a; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-label { justify-content:flex-start; min-height:24px; margin-bottom:10px; font-size:12px; text-align:left; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-label > b { width:23px; height:23px; font-size:10px; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-pair { gap:10px; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-client { padding:10px; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-name { min-height:0; margin-bottom:7px; font-size:12px; line-height:1.5; text-align:left; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-flow { gap:6px; padding:5px 0; font-size:12px; line-height:1.4; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-flow > strong { flex:none; font-size:21px; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-flow > span > small { font-size:10px; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-flow-total { font-size:11px; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-flow-total > strong { font-size:14px; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-trade-key { margin:10px 0 0; color:#a8bbc7; font-size:12px; line-height:1.65; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-trade-key strong { display:inline; margin:0; color:#cbd8dd; font:inherit; font-weight:600; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-subtotals { grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; margin:0; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-subtotal { gap:3px; padding:10px 8px; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-subtotal > span,
.cns-page #cns-clearing-pool .cpv-wide .cpv-member > span { font-size:12px; line-height:1.45; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-subtotal small { display:block; margin:2px 0 0; font-size:11px; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-subtotal > strong { font-size:30px; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-offset { min-height:0; margin-top:10px; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-offset .cpv-connectors { display:none; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-offset-note { flex-wrap:wrap; gap:5px 8px; width:100%; min-height:0; margin:0; padding:7px; font-size:12px; line-height:1.5; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-member-results { min-height:0; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-result { width:100%; min-height:0; margin:0; padding:14px 10px; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-result > div > span { font-size:16px; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-result strong { font-size:44px; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-result > span { margin-top:6px; font-size:12px; line-height:1.5; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-separate-members { width:100%; min-height:0; margin:0; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-member { gap:4px; padding:10px 6px; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-status { display:block; min-height:0; margin:10px 0 0; padding:0; color:#c1d6d3; font-size:12px; line-height:1.65; text-align:left; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-settlement { margin-top:10px; padding-top:10px; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-settlement-title { font-size:12px; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-settlement-context { font-size:11px; line-height:1.6; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-separate-route { gap:8px 6px; font-size:11px; overflow-wrap:anywhere; }
.cns-page #cns-clearing-pool .cpv-wide .cpv-settlement > p { font-size:12px; line-height:1.65; }
@media(max-width:900px) {
 .cns-page #cns-clearing-pool .cns-clearing-pool-body { grid-template-columns:minmax(0,1fr); }
 .cns-page #cns-clearing-pool .cns-clearing-pool-copy { gap:16px; }
}
@media(max-width:500px) {
 .cns-page #cns-clearing-pool .cns-pool-explainer { padding-left:10px; }
 .cns-page #cns-clearing-pool .cpv-wide { padding:10px; }
 .cns-page #cns-clearing-pool .cpv-workflow { gap:10px; }
 .cns-page #cns-clearing-pool .cpv-stage { padding:10px; }
 .cns-page #cns-clearing-pool .cpv-wide .cpv-clients,
 .cns-page #cns-clearing-pool .cpv-wide .cpv-subtotals { grid-template-columns:minmax(0,1fr); }
 .cns-page #cns-clearing-pool .cpv-wide .cpv-controls > button { padding:8px 6px; }
 .cns-page #cns-clearing-pool .cpv-wide .cpv-separate-route { grid-template-columns:1fr; gap:4px; text-align:center; }
 .cns-page #cns-clearing-pool .cpv-wide .cpv-separate-route > :nth-child(3) { margin-bottom:8px; }
}


/* Vivid directional colors: buys and receipts are green; sales and amounts owed are red. */
#app #cns-clearing-pool .cpv { --cpv-receive:#39f58a;--cpv-deliver:#ff5c68;--cpv-mint:#39f58a; }
#app #cns-clearing-pool .cpv :is(.cpv-buys .cpv-flow,.cpv-buys .cpv-flow-total,.cpv-receive),
#app #cns-clearing-pool .cpv :is(.cpv-buys .cpv-flow,.cpv-buys .cpv-flow-total,.cpv-receive) :is(span,strong,small) { color:var(--cpv-receive); }
#app #cns-clearing-pool .cpv :is(.cpv-sales .cpv-flow,.cpv-sales .cpv-flow-total,.cpv-deliver,.cpv-result),
#app #cns-clearing-pool .cpv :is(.cpv-sales .cpv-flow,.cpv-sales .cpv-flow-total,.cpv-deliver,.cpv-result) :is(span,strong,small) { color:var(--cpv-deliver); }
#app #cns-clearing-pool .cpv .cpv-receive { border-color:#39f58a55;background:#39f58a0b; }
#app #cns-clearing-pool .cpv :is(.cpv-deliver,.cpv-result) { border-color:#ff5c6855;background:#ff5c680b; }
#app #cns-clearing-pool .cpv .cpv-separate-route>b:nth-child(2) { color:var(--cpv-deliver); }
#app #cns-clearing-pool .cpv .cpv-separate-route>b:nth-child(5) { color:var(--cpv-receive); }
