/* Balanced illustrative allocations and the document lifecycle remain separate workflows. */
[data-settlement-motion]{--split-ink:#bde7e5;--split-muted:#8bafb7;--split-line:#6edbd8;--split-bg:#6edbd809}
html[data-theme="light"] [data-settlement-motion]{--split-ink:#286663;--split-muted:#5b7e83;--split-line:#4ca59f;--split-bg:#edf9f8}
[data-settlement-motion] .settlement-source{padding:13px 12px;max-width:230px;transition:box-shadow .35s,border-color .35s}
[data-settlement-motion] .settlement-source>b{font-size:24px;margin:8px 0}
[data-settlement-motion] .settlement-source>span{font-size:9px}
[data-settlement-motion] .settlement-source>small{font-size:7px;line-height:1.5}
[data-settlement-motion] .split-lines{height:24px}
[data-settlement-motion] .split-tier-label{text-align:center;font-size:8px;line-height:1.5;color:var(--split-muted);margin-bottom:7px}
[data-settlement-motion] .split-targets{gap:10px;margin-bottom:12px}
[data-settlement-motion] .split-targets>div{min-width:0;padding:9px 6px;transition:box-shadow .35s,border-color .35s}
[data-settlement-motion] .split-targets svg{width:16px;height:18px;margin-bottom:4px}
[data-settlement-motion] .split-targets small{font-size:8px;line-height:1.5;min-height:3em;overflow-wrap:anywhere}
[data-settlement-motion] .split-targets b{font-size:16px;font-variant-numeric:tabular-nums;margin-top:3px}
[data-settlement-motion] .merchant-transfer{padding:10px;border:1px solid color-mix(in srgb,var(--split-line) 35%,transparent);border-radius:6px;background:var(--split-bg);transition:box-shadow .35s,border-color .35s}
[data-settlement-motion] .merchant-transfer-title{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px 8px;line-height:1.5;color:var(--split-muted);margin-bottom:8px}
[data-settlement-motion] .merchant-transfer-title>b{font-size:9px;font-weight:500;overflow-wrap:anywhere}
[data-settlement-motion] .merchant-transfer-title>small{font:8px/1.5 var(--mono);color:var(--split-ink)}
[data-settlement-motion] .merchant-transfer-row{display:grid;grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr);align-items:center;gap:7px}
[data-settlement-motion] .merchant-transfer-row>div{min-width:0;text-align:center}
[data-settlement-motion] .merchant-transfer-row span{display:block;font-size:8px;line-height:1.5;color:var(--split-muted);overflow-wrap:anywhere}
[data-settlement-motion] .merchant-transfer-row b{display:block;margin-top:3px;font:500 17px/1.5 var(--mono);font-variant-numeric:tabular-nums;color:var(--split-ink)}
[data-settlement-motion] .merchant-retained{display:block;font-size:7px;line-height:1.5;color:var(--split-muted);overflow-wrap:anywhere}
[data-settlement-motion] .merchant-transfer-arrow svg{width:23px;height:23px;color:var(--split-line)}
[data-settlement-motion] .settlement-note,[data-contract-motion] .contract-note{display:grid;align-items:center;margin-top:10px;font-size:9px;line-height:1.6;color:var(--split-muted,#8eabc9);overflow-wrap:anywhere}
[data-settlement-motion] [data-settlement-note],[data-contract-motion] [data-contract-note]{grid-area:1/1;visibility:hidden}
[data-settlement-phase="static"] [data-settlement-note="static"],[data-settlement-phase="0"] [data-settlement-note="0"],[data-settlement-phase="1"] [data-settlement-note="1"],[data-settlement-phase="2"] [data-settlement-note="2"],[data-settlement-phase="3"] [data-settlement-note="3"],[data-contract-phase="static"] [data-contract-note="static"],[data-contract-phase="0"] [data-contract-note="0"],[data-contract-phase="1"] [data-contract-note="1"],[data-contract-phase="2"] [data-contract-note="2"],[data-contract-phase="3"] [data-contract-note="3"]{visibility:visible}
[data-settlement-stage="rules"] .settlement-source,[data-settlement-stage="primary"] .split-targets>div,[data-settlement-stage="merchant"] .merchant-transfer{border-color:var(--split-line);box-shadow:0 0 0 2px color-mix(in srgb,var(--split-line) 9%,transparent),0 0 18px color-mix(in srgb,var(--split-line) 7%,transparent)}
[data-settlement-stage="primary"] .split-lines:after{border-color:var(--split-line)}
[data-settlement-stage="merchant"] .merchant-transfer-arrow{animation:merchant-share-flow 1.2s ease-in-out infinite;animation-play-state:paused}
[data-settlement-motion].is-settlement-running .merchant-transfer-arrow{animation-play-state:running}
[data-settlement-stage="reconcile"] .settlement-note{color:var(--split-ink)}
[data-settlement-motion].compact{padding-top:0}
[data-settlement-motion].compact .mock-window{transform:perspective(1000px) rotateY(-5deg) rotateX(3deg) scale(.95);transform-origin:top center}
[data-settlement-motion].compact .window-top,[data-contract-motion].compact .window-top{padding:5px 8px;font-size:6px;line-height:1.4}
[data-settlement-motion].compact .window-content,[data-contract-motion].compact .window-content{padding:8px}
[data-settlement-motion].compact .settlement-source{padding:4px;max-width:190px}
[data-settlement-motion].compact .settlement-source>span{font-size:5px}
[data-settlement-motion].compact .settlement-source>b{font-size:16px;line-height:1.1;margin:2px 0}
[data-settlement-motion].compact .settlement-source>small{font-size:5px}
[data-settlement-motion].compact .split-lines{height:8px}
[data-settlement-motion].compact .split-tier-label{font-size:5px;margin-bottom:2px}
[data-settlement-motion].compact .split-targets{gap:6px;margin-bottom:4px}
[data-settlement-motion].compact .split-targets>div{padding:3px}
[data-settlement-motion].compact .split-targets svg{display:none}
[data-settlement-motion].compact .split-targets small{font-size:5px;min-height:2.6em;line-height:1.3}
[data-settlement-motion].compact .split-targets b{font-size:11px;line-height:1.2;margin-top:2px}
[data-settlement-motion].compact .merchant-transfer{padding:4px}
[data-settlement-motion].compact .merchant-transfer-title{margin-bottom:4px;gap:2px 5px}
[data-settlement-motion].compact .merchant-transfer-title>b{font-size:5px}
[data-settlement-motion].compact .merchant-transfer-title>small{font-size:5px}
[data-settlement-motion].compact .merchant-transfer-row{grid-template-columns:minmax(0,1fr) 16px minmax(0,1fr);gap:4px}
[data-settlement-motion].compact .merchant-transfer-row span{font-size:5px;line-height:1.3}
[data-settlement-motion].compact .merchant-transfer-row b{font-size:11px;line-height:1.2;margin-top:2px}
[data-settlement-motion].compact .merchant-retained{font-size:5px;line-height:1.3}
[data-settlement-motion].compact .merchant-transfer-arrow svg{width:16px;height:16px}
[data-contract-motion]{--contract-ink:#a5bfdf;--contract-done:#81c9b6}
html[data-theme="light"] [data-contract-motion]{--contract-ink:#58749a;--contract-done:#2d7d69}
[data-contract-motion] .contract-paper{display:flex;flex-direction:column;width:100%;max-width:260px;min-height:310px;padding:22px;margin-bottom:18px}
[data-contract-motion] .paper-logo{font-size:8px;line-height:1.5;padding-bottom:12px}
[data-contract-motion] .paper-title{font-size:18px;line-height:1.45;margin-top:15px;overflow-wrap:anywhere}
[data-contract-motion] .paper-lines{margin-top:16px;gap:7px}
[data-contract-motion] .paper-lines>i{height:3px;transform-origin:left}
[data-contract-motion] .contract-review{display:flex;align-items:center;gap:5px;margin-top:14px;min-height:20px;font-size:8px;line-height:1.5;color:#397563}
[data-contract-motion] .contract-review svg{width:15px;height:15px;flex-shrink:0}
[data-contract-motion] .paper-sign{position:relative;right:auto;bottom:auto;align-self:flex-end;width:60%;max-width:140px;margin:auto 0 0 auto;padding-top:10px;transform:rotate(-5deg)}
[data-contract-motion] .contract-signature{display:block;width:100%;height:auto;overflow:visible}
[data-contract-motion] .contract-signature>path{stroke:#2e609d;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;stroke-dashoffset:0}
[data-contract-motion] .paper-sign>span{font:7px/1.5 var(--font);display:block;text-align:right;overflow-wrap:anywhere}
[data-contract-motion] .contract-archive{position:absolute;bottom:20px;left:22px;width:42px;color:#387560;text-align:center}
[data-contract-motion] .contract-archive svg{display:block;width:20px;height:20px;margin:0 auto 4px}
[data-contract-motion] .contract-archive small{display:block;font-size:6px;line-height:1.4;overflow-wrap:anywhere}
[data-contract-motion] .contract-stage-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:0 0 10px}
[data-contract-motion] .contract-stage-strip>span{display:flex;flex-direction:column;align-items:center;gap:5px;color:var(--contract-ink);text-align:center;min-width:0}
[data-contract-motion] .contract-stage-strip i{display:grid;place-items:center;width:20px;height:20px;border:1px solid color-mix(in srgb,var(--contract-ink) 30%,transparent);border-radius:50%;font:8px var(--mono);transition:color .3s,border-color .3s,background-color .3s}
[data-contract-motion] .contract-stage-strip small{font-size:8px;line-height:1.5;max-width:100%;overflow-wrap:anywhere}
[data-contract-motion] .contract-stage-strip>.is-contract-active i{color:var(--accent);border-color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,transparent)}
[data-contract-motion] .contract-stage-strip>.is-contract-done i{color:var(--contract-done);border-color:var(--contract-done)}
[data-contract-motion] .contract-note{color:var(--contract-ink)}
[data-contract-stage="draft"] .paper-lines>i{animation:contract-text-build .5s ease-out both;animation-delay:calc(var(--line-index)*140ms);animation-play-state:paused}
[data-contract-stage="draft"] .contract-review,[data-contract-stage="draft"] .paper-sign,[data-contract-stage="draft"] .contract-archive,[data-contract-stage="review"] .paper-sign,[data-contract-stage="review"] .contract-archive,[data-contract-stage="sign"] .contract-archive{opacity:0}
[data-contract-stage="review"] .contract-review{animation:contract-review-in .6s ease-out both;animation-play-state:paused}
[data-contract-stage="sign"] .contract-signature>path{animation:contract-signature-write 1.05s ease-out both;animation-delay:calc(var(--letter-index)*120ms);animation-play-state:paused}
[data-contract-stage="archive"] .contract-archive{animation:contract-archive-in .6s ease-out both;animation-play-state:paused}
[data-contract-motion].is-contract-running :is(.paper-lines>i,.contract-review,.contract-signature>path,.contract-archive){animation-play-state:running}
[data-contract-motion].compact{padding-top:0}
[data-contract-motion].compact .mock-window{transform:perspective(1000px) rotateY(-4deg) rotateX(3deg) translateY(4px)}
[data-contract-motion].compact .contract-paper{min-height:158px;max-width:158px;padding:12px;margin-bottom:8px}
[data-contract-motion].compact .paper-logo{font-size:5.5px;line-height:1.4;padding-bottom:6px}
[data-contract-motion].compact .paper-title{font-size:12px;line-height:1.4;margin-top:7px}
[data-contract-motion].compact .paper-lines{margin-top:8px;gap:4px}
[data-contract-motion].compact .paper-lines>i{height:2px}
[data-contract-motion].compact .contract-review{margin-top:7px;min-height:8px;font-size:4.5px}
[data-contract-motion].compact .contract-review>span{display:none}
[data-contract-motion].compact .contract-review svg{width:8px;height:8px}
[data-contract-motion].compact .paper-sign{width:68%;max-width:90px;margin-top:auto;padding-top:4px}
[data-contract-motion].compact .paper-sign>span{font-size:5px}
[data-contract-motion].compact .contract-archive{left:12px;bottom:12px;width:18px}
[data-contract-motion].compact .contract-archive svg{width:12px;height:12px;margin-bottom:0}
[data-contract-motion].compact .contract-archive small{display:none}
[data-contract-motion].compact .contract-stage-strip{gap:4px}
[data-contract-motion].compact .contract-stage-strip i{width:13px;height:13px;font-size:5px}
[data-contract-motion].compact .contract-stage-strip small{font-size:5px}
html[lang="km"] [data-contract-motion] .paper-title{font-size:13px;line-height:1.5}
html[lang="km"] [data-contract-motion].compact .paper-title{font-size:9px;line-height:1.4}
@keyframes merchant-share-flow{0%,100%{transform:translateX(-2px);opacity:.5}50%{transform:translateX(2px);opacity:1}}
@keyframes contract-text-build{from{transform:scaleX(0);opacity:.2}to{transform:scaleX(1);opacity:1}}
@keyframes contract-review-in{from{opacity:0;translate:0 4px}to{opacity:1;translate:0 0}}
@keyframes contract-signature-write{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
@keyframes contract-archive-in{from{opacity:0;transform:translateY(5px) scale(.94)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(prefers-reduced-motion:reduce){[data-settlement-motion] .merchant-transfer-arrow,[data-contract-motion] :is(.paper-lines>i,.contract-review,.contract-signature>path,.contract-archive){animation:none!important;transition:none!important}[data-contract-motion] .contract-signature>path{stroke-dashoffset:0!important}[data-contract-motion] :is(.contract-review,.paper-sign,.contract-archive){opacity:1!important}}
