.kv-lab{padding-top:50px}.lab-premise{font-size:12px;max-width:850px;margin:-15px 0 32px;color:#888}.lab-premise strong{color:#ccc;font-weight:500}.architecture-options{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-bottom:20px}.architecture-options button{text-align:left;background:#0e0e0e;border:1px solid #282828;border-radius:6px;padding:20px;display:grid;grid-template-columns:24px 1fr;gap:8px 10px}.architecture-options button>span{font:9px monospace;color:#666;grid-row:span 2;padding-top:3px}.architecture-options strong{font-size:14px;font-weight:500;color:#aaa}.architecture-options small{font-size:11px;color:#777}.architecture-options button[aria-pressed=true]{border-color:#777;background:#171717}.architecture-options button[aria-pressed=true] strong{color:#eee}.lab{border:1px solid #2b2b2b;border-radius:9px;overflow:hidden;background:#090a0a}.lab-toolbar{padding:25px 30px;display:flex;align-items:center;justify-content:space-between;gap:30px;border-bottom:1px solid #222}.lab-toolbar h3{font-size:21px;margin-top:8px}.scenario-select{margin:0!important;font-size:9px!important;color:#777!important;min-width:260px}.scenario-select select{display:block;margin-top:8px;background:#131313}.propagation-stage{padding:23px 30px 0}.stage-caption{display:flex;justify-content:space-between;gap:20px;font:9px monospace;color:#999;margin:0 0 28px}.stage-caption span:last-child{font-size:7px;color:#666;letter-spacing:.5px}#propagation-svg{display:block;width:100%;height:auto}#propagation-svg text{fill:#aaa;font:10px monospace;letter-spacing:.25px}#propagation-svg text.secondary{fill:#737373;font-size:9px}#propagation-svg text.kv-value{fill:#eee;font-size:20px}#propagation-svg rect{fill:#121313;stroke:#2b2d2d;stroke-width:1}#propagation-svg .diagram-wires path{fill:none;stroke:#383b3b;marker-end:url(#flow-arrow)}#propagation-svg .log-band rect{fill:#0e0f0f;stroke:#3e4141}.packet{fill:#fff;opacity:0;filter:drop-shadow(0 0 3px #fff5)}.playing[data-phase=propose] .packet-write,.playing[data-phase=order] .packet-write,.playing[data-phase=apply] .packet-a,.playing[data-phase=apply] .packet-b,.playing[data-phase=apply] .packet-c,.playing[data-phase=lag] .packet-a,.playing[data-phase=lag] .packet-c{animation:propagate 1.7s ease-in-out infinite}.packet-b{animation-delay:.2s!important}.packet-c{animation-delay:.4s!important}[data-architecture=sharded] .packet-c{display:none}[data-phase=lag] #replica-b rect,[data-phase=blocked] #replica-b rect,[data-phase=lost] #replica-b rect{stroke:#666;stroke-dasharray:3 4}[data-phase=apply] .replica-box rect{stroke:#777;transition:stroke .4s}.lab-transport{display:flex;align-items:center;gap:15px;padding:23px 30px;border-bottom:1px solid #222}.lab-transport>span{color:#777;font:10px monospace}.lab-progress{display:flex;gap:7px;margin-left:auto}.lab-progress button{border:0;width:24px;height:3px;background:#333;padding:0;position:relative}.lab-progress button:before{content:'';position:absolute;inset:-10px 0}.lab-progress button[aria-pressed=true]{background:#eee}.lab-story{display:flex;align-items:flex-start;gap:22px;padding:26px 30px;min-height:143px;background:#0f1010}.lab-story>span{font:10px monospace;color:#777;padding-top:4px}.lab-story>div{flex:1}.lab-story h3{font-size:18px;margin-bottom:9px}.lab-story p{font-size:12px;max-width:700px}.lab-story code{font-size:9px;color:#999;max-width:180px;line-height:1.8;padding-top:4px}.tradeoff-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:25px;margin:35px 0}.tradeoff-grid article>span{font:8px monospace;letter-spacing:1px;color:#666}.tradeoff-grid h3{font-size:14px;letter-spacing:-.2px;line-height:1.6;color:#bcbcbc;margin-top:12px}.tradeoff-grid p{font-size:11px;line-height:1.8;margin-top:12px}.architecture-decision{border-block:1px solid #222;display:flex;align-items:center;justify-content:space-between;gap:40px;padding:24px 0}.architecture-decision p{font-size:12px;max-width:600px;margin-top:10px}.architecture-decision .button{font-size:11px}.kv-lab+section{border-top:1px solid #222}.scenario-plan-context{border:1px solid #444;border-radius:5px;padding:16px;margin:0 0 22px;font-size:11px;color:#aaa;line-height:1.7}.scenario-plan-context strong{color:#ddd}@keyframes propagate{0%{offset-distance:0%;opacity:0}15%{opacity:1}85%{opacity:1}100%{offset-distance:100%;opacity:0}}
@media(max-width:700px){.architecture-options{gap:7px}.architecture-options button{padding:13px 10px;display:flex;flex-direction:column;gap:8px}.architecture-options strong{font-size:11px}.architecture-options small{font-size:9px;line-height:1.5}.lab-toolbar{padding:20px;flex-direction:column;align-items:stretch;gap:15px}.lab-toolbar h3{font-size:19px}.scenario-select{min-width:0}.propagation-stage{padding:18px 6px 0}.stage-caption{padding:0 10px;flex-direction:column;gap:8px;margin-bottom:15px}.stage-caption span:last-child{font-size:6px}.lab-transport{padding:17px 15px;gap:8px;flex-wrap:wrap}.lab-transport .subtle{font-size:9px}.lab-progress button{width:16px}.lab-progress{gap:5px}.lab-story{padding:22px 18px;gap:12px;flex-wrap:wrap}.lab-story>div{min-width:220px}.lab-story code{margin-left:23px;max-width:none}.lab-story h3{font-size:16px}.lab-story p{font-size:11px}.tradeoff-grid{grid-template-columns:1fr 1fr;gap:25px 18px}.tradeoff-grid h3{font-size:12px}.architecture-decision{flex-direction:column;align-items:flex-start;gap:20px}.lab-premise{font-size:11px}.kv-lab{padding-top:35px}}
@media(prefers-reduced-motion:reduce){.packet{display:none}.replica-box rect{transition:none!important}}

.mobile-replicas{display:none}@media(max-width:700px){.mobile-replicas{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;padding:15px 10px}.mobile-replicas>div{border:1px solid #333;border-radius:4px;background:#111;padding:11px 8px;min-width:0}.mobile-replicas span{display:block;font:8px monospace;color:#888}.mobile-replicas strong{display:block;font:12px monospace;color:#ddd;margin:10px 0}.mobile-replicas small{display:block;font:8px monospace;color:#888}#propagation-svg{margin-top:0}.architecture-options strong{font-size:13px}.lab-progress{margin-left:0}.lab-transport{justify-content:space-between}}

.playing[data-architecture=broker][data-phase=propose] .packet-order,.playing[data-architecture=broker][data-phase=order] .packet-order{animation:propagate 1.7s .4s ease-in-out infinite}.scenario-plan-context{margin:0;padding:16px 28px;border-width:0 0 1px;border-radius:0}

/* Proposals and replay use separate lanes; packet routes come from the SVG. */
.diagram-wires .read-wire{stroke-dasharray:3 4;stroke:#555!important}.playing[data-phase=apply-a] .packet-a,.playing[data-phase=apply-b] .packet-b,.playing[data-phase=apply-c] .packet-c{animation:propagate 1.7s ease-in-out infinite}#propagation-svg .value-changed rect{fill:#222;stroke:#ddd;transition:fill .4s,stroke .4s}#mobile-replicas .value-changed{border-color:#ddd;background:#242424}.lab-progress button{width:20px}.lab-story code{color:#ccc}.packet{filter:none}@media(max-width:700px){.lab-progress button{width:19px}.mobile-replicas strong{font-size:15px}}

/* Ordered payloads stay visible as each replica advances through the log. */
.log-ledger{border-bottom:1px solid #2b2b2e;background:#101012}.log-ledger-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px 30px 18px}.log-ledger-heading .eyebrow{font-size:8px;color:#74747d}.log-ledger-heading h3{font-size:18px;margin-top:7px;letter-spacing:-.4px}.log-ledger-heading>span{font:10px monospace;color:#888891}.log-table-wrap{padding:0 30px;min-height:158px}.log-table{width:100%;border-collapse:collapse;text-align:left}.log-table th{font-size:10px;color:#85858e;font-weight:400;padding:10px 0;border-bottom:1px solid #2b2b30}.log-table th span{color:#62626b}.log-table th:last-child{text-align:right}.log-table td{padding:15px 0;border-bottom:1px solid #232327;vertical-align:top}.log-table tr:last-child td{border-bottom:0}.log-position{width:85px;font:12px monospace;color:#90909b}.log-command{border:0!important;margin:0!important;padding:0!important}.log-command summary{display:flex!important;justify-content:flex-start!important;align-items:center;gap:16px;padding:0!important;list-style:none;cursor:pointer}.log-command summary::-webkit-details-marker{display:none}.log-command summary:before{content:'›';color:#7b7b87;transition:transform .15s}.log-command[open] summary:before{transform:rotate(90deg)}.log-command summary code{font-size:12px;color:#e0e0e7}.log-command summary>span{font:10px monospace;color:#7f7f88}.log-command pre{margin:14px 0 12px 22px;padding:14px 18px;background:#18181c;border:1px solid #303035;border-radius:6px;font-size:11px;line-height:1.6;color:#bcbcc7;max-width:430px}.log-entry-result{display:block;font-size:10px;color:#85858e;margin:8px 0 0 22px}.log-applied{white-space:nowrap;text-align:right}.log-applied span{display:inline-block;margin-left:5px;padding:4px 7px;border:1px solid #2e2e35;border-radius:5px;font:10px monospace;color:#686874;transition:background .2s,color .2s,border-color .2s}.log-applied span[data-applied=true]{color:#e1e1e9;background:#25252d;border-color:#484852}.log-applied span[data-applied=unready]{border-style:dashed}.log-ledger-footer{display:flex;justify-content:space-between;gap:14px;padding:14px 30px 20px;font:9px monospace;color:#777780}#log-empty{padding:24px 0;font-size:12px;color:#888891}.log-entry-new{animation:entry-arrives .35s ease-out}@keyframes entry-arrives{from{opacity:0;transform:translateY(-5px);background:#ffffff09}to{opacity:1;transform:translateY(0);background:transparent}}@media(max-width:700px){.log-ledger-heading{padding:22px 18px 14px;gap:12px}.log-ledger-heading>span{font-size:8px}.log-table-wrap{padding:0 18px}.log-position{width:42px;font-size:10px}.log-command summary{flex-wrap:wrap;gap:5px}.log-command summary code{font-size:10px}.log-command summary>span{flex-basis:100%;margin-left:10px;font-size:8px}.log-entry-result{margin-left:10px;max-width:170px;font-size:9px;line-height:1.5}.log-applied span{margin-left:3px;padding:4px;font-size:9px}.log-table th{font-size:9px}.log-table th span{display:none}.log-ledger-footer{padding:14px 18px 20px;font-size:8px;flex-direction:column;gap:8px}.log-command pre{font-size:9px;padding:10px;margin-left:0;max-width:180px}}@media(prefers-reduced-motion:reduce){.log-entry-new{animation:none}.log-applied span,.log-command summary:before{transition:none}}

.demo-store{display:flex;align-items:center;justify-content:space-between;gap:25px;margin:24px 30px 0;padding:20px;border:1px solid #303035;border-radius:10px;background:#151518}.demo-store[hidden]{display:none}.store-product{display:flex;align-items:center;gap:20px}.store-art{width:84px;height:84px;flex-shrink:0;border-radius:8px;background:#dededb;display:grid;place-items:center}.store-art svg{width:66px;height:66px;fill:#b7b7b3;stroke:#50504e;stroke-width:2}.store-product .eyebrow{font-size:8px;color:#92929b}.store-product h3{font-size:20px;margin:9px 0 7px}.store-product p{font-size:12px}.store-product p span{color:#ddd}.store-checkout{display:grid;grid-template-columns:auto auto;align-items:center;gap:10px 18px;text-align:right}.store-checkout>span:first-child{font:11px monospace;color:#aaaab4}.store-checkout>span:last-child{grid-column:1/-1;font-size:10px;color:#82828d}.store-checkout button:disabled{opacity:.6;cursor:default}.store-checkout .button{min-width:135px}.lab{border-radius:12px;border-color:#2c2c30}.lab-toolbar{background:#101012}.architecture-options button{border-radius:9px;transition:background .18s,border-color .18s}.architecture-options button:hover{background:#19191d;border-color:#55555d}.architecture-options button[aria-pressed=true]{background:#1b1b1f;border-color:#72727a}.lab-story{background:#131316}.lab-story p{font-size:13px;line-height:1.75}.lab-transport{background:#101012}.lab-transport .subtle{font-size:12px}.lab-transport .button{border-radius:7px}.tradeoff-grid p{font-size:12px}.tradeoff-grid h3{font-size:15px}.lab-premise{font-size:13px}.lab-toolbar>.eyebrow,.lab-toolbar .eyebrow{letter-spacing:.8px;color:#85858f}@media(max-width:700px){.demo-store{margin:18px 16px 0;padding:16px;flex-direction:column;align-items:stretch;gap:18px}.store-art{width:64px;height:64px}.store-art svg{width:52px;height:52px}.store-product{gap:15px}.store-product h3{font-size:18px}.store-checkout{grid-template-columns:1fr auto;text-align:left}.store-checkout>span:last-child{text-align:left;font-size:9px}.lab-story p{font-size:12px}.lab-premise{font-size:12px}.tradeoff-grid h3{font-size:13px}}

.scenario-flow{display:grid;grid-template-columns:1.1fr 1fr;gap:32px;padding-bottom:24px}.flow-figure{margin:0;min-width:0}.flow-figure h3{font-size:20px;margin:0 0 10px}.flow-figure figcaption p{font-size:12px;line-height:1.7;max-width:440px}.flow-figure svg{width:100%;height:auto;display:block;margin-top:22px}.flow-wire{fill:none;stroke:#50505a;stroke-width:1.4}.flow-node rect{fill:#151519;stroke:#34343d;transition:fill .2s,stroke .2s}.flow-node-title{fill:#dddde5;font:12px sans-serif}.flow-node-detail{fill:#90909d;font:9px monospace}.flow-node[role=button]{cursor:pointer}.flow-node[role=button]:hover rect,.flow-node:focus-visible rect{stroke:#a4a4b2}.flow-node.is-current rect{fill:#272731;stroke:#c1c1cf}.flow-node.is-complete rect{stroke:#62626d}.flow-packet{opacity:0;fill:#eee}.playing .is-current>.flow-packet{animation:propagate 1.6s ease-in-out infinite}.english-algorithm{min-width:0;border-left:1px solid #29292f;padding-left:28px}.english-algorithm h4{font-size:15px;letter-spacing:0;margin:0 0 9px}.english-algorithm>p{font-size:11px;line-height:1.7;color:#898993}.english-algorithm ol{list-style:none;counter-reset:algorithm;margin:20px 0;padding:0}.english-algorithm li{counter-increment:algorithm;position:relative;padding-left:26px}.english-algorithm li:before{content:counter(algorithm,decimal-leading-zero);position:absolute;left:0;top:12px;color:#62626d;font:9px monospace}.english-algorithm button{display:block;width:100%;border:0;border-left:2px solid transparent;border-radius:0 5px 5px 0;background:transparent;text-align:left;padding:9px 10px 9px calc(10px + var(--indent)*14px);font:12px/1.6 monospace;color:#a3a3af;cursor:pointer;transition:background .15s,color .15s}.english-algorithm button:hover{background:#ffffff06;color:#eee}.english-algorithm button.is-current{border-color:#c3c3d0;background:#ffffff08;color:#eee}.english-algorithm .algorithm-note{padding-top:16px;border-top:1px solid #2b2b32}.english-algorithm #algorithm-mode{margin-top:12px;color:#a2a2ad}.replication-layout{border:1px solid #2b2b32;margin:0 0 18px;border-radius:7px;padding:0 15px}.replication-layout>summary{font-size:12px;padding:14px 0}.replication-layout #propagation-svg{margin:0}.mobile-replicas{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;padding:0 0 20px}.mobile-replicas>div{border:1px solid #303038;border-radius:6px;background:#121216;padding:14px}.mobile-replicas span{display:block;font:9px monospace;color:#95959e}.mobile-replicas strong{display:block;font:17px monospace;color:#eee;margin:10px 0}.mobile-replicas small{font:9px monospace;color:#92929d}@media(max-width:850px){.scenario-flow{grid-template-columns:1fr;gap:24px}.english-algorithm{border-left:0;border-top:1px solid #29292f;padding:24px 0 0}.flow-figure svg{max-width:600px;margin:20px auto 0}}@media(max-width:700px){.scenario-flow{padding:0 12px 20px}.flow-figure h3{font-size:18px}.english-algorithm button{font-size:11px}.mobile-replicas{padding:0 10px 18px;gap:7px}.mobile-replicas>div{padding:11px 8px}.mobile-replicas strong{font-size:15px}.replication-layout{margin-inline:10px}.flow-node-title{font-size:13px}.flow-node-detail{font-size:10px}}@media(prefers-reduced-motion:reduce){.flow-packet{display:none}.flow-node rect,.english-algorithm button{transition:none}}

.store-product{padding:5px 0}.store-product h3{font-size:22px;letter-spacing:-.4px}.store-product p{font-size:13px}.demo-store{padding:24px;background:#121215}.store-product .eyebrow{font-size:9px;letter-spacing:1px}@media(max-width:700px){.demo-store{padding:18px}.store-product h3{font-size:20px}}

.flow-viewport{overflow-x:auto;overscroll-behavior-x:contain}.flow-scroll-hint{display:none}@media(max-width:700px){.flow-viewport svg{min-width:560px}.flow-scroll-hint{display:block;margin-top:8px;font-size:10px;color:#858590}.flow-node-title{font-size:13px}.flow-node-detail{font-size:10px}}
/* Keep the English and engine steps aligned beneath each scenario's flow. */
.scenario-flow{grid-template-columns:minmax(0,1fr)}
.flow-figure svg{max-width:650px;margin:22px auto 0}
.english-algorithm{border-left:0;border-top:1px solid #29292f;padding:28px 0 0}
.algorithm-columns{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:24px;padding:16px 12px 12px 38px;border-bottom:1px solid #29292f;font:11px/1.5 sans-serif;color:#c6c6ce}
.english-algorithm ol{margin-top:4px}
.english-algorithm button{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:24px;padding:12px 10px;align-items:start}
.algorithm-english{padding-left:calc(var(--indent)*12px);font:13px/1.7 sans-serif}
.algorithm-code{white-space:pre-wrap;overflow-wrap:anywhere;font:11px/1.8 monospace;color:#a4adc2}
.english-algorithm button.is-current .algorithm-code{color:#d8dff0}
.english-algorithm .algorithm-contract{max-width:850px;line-height:1.9}
@media(max-width:700px){
 .algorithm-columns{display:none}
 .english-algorithm button{grid-template-columns:minmax(0,1fr);gap:8px;padding:12px 8px}
 .algorithm-code{padding:10px 12px;background:#0d0d11;border:1px solid #26262d;border-radius:5px;font-size:10px}
 .algorithm-english{font-size:12px;padding-left:0}
 .english-algorithm li:before{top:15px}
}
/* A single scenario, its state and log; deeper details are optional. */
.kv-lab>.section-intro{margin-bottom:26px}.kv-lab .lab-toolbar{padding:20px 28px}.kv-lab .lab-transport{position:sticky;top:72px;z-index:4;background:#121216;border-top:1px solid #29292f;border-bottom:1px solid #29292f;padding:14px 28px}.kv-lab .scenario-flow{padding-bottom:8px}.kv-lab .flow-figure svg[data-flow=store]{max-width:290px;min-width:0;margin:16px auto}.kv-lab .flow-figure h3{font-size:18px}.kv-lab .lab-story{border-top:1px solid #29292f}.algorithm-disclosure{margin:0;padding:0 28px;border-top:1px solid #29292f}.algorithm-disclosure>summary{font-size:13px;padding:20px 0;cursor:pointer}.algorithm-disclosure .english-algorithm{border-top:0;padding-top:10px}.storage-explanation{margin-top:26px;padding:0 24px;border:1px solid #29292f;border-radius:7px}.storage-explanation summary{padding:20px 0;font-size:14px;cursor:pointer}.storage-explanation p{font-size:13px;line-height:1.8;color:#a3a3af}.storage-explanation .architecture-options{margin:20px 0}.kv-lab .architecture-decision{gap:20px}.kv-lab .architecture-decision p{font-size:13px;color:#aaa}.kv-lab .flow-scroll-hint{margin-top:10px}@media(max-width:700px){.kv-lab .lab-transport{top:0;gap:12px;padding:12px}.kv-lab .lab-toolbar{padding:18px;gap:14px;align-items:start}.kv-lab .lab-toolbar>.eyebrow{display:none}.algorithm-disclosure{padding:0 16px}.kv-lab .flow-figure svg[data-flow=store]{width:100%;max-width:260px;min-width:0}.kv-lab .architecture-decision{flex-wrap:wrap}.kv-lab .flow-figure:has(svg[data-flow=store]) .flow-scroll-hint{display:none}}
.demo-store>div:last-child{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:14px}.demo-store #store-receipt{flex-basis:100%;margin:0}.flow-figure svg[data-compact=true]{min-width:0;max-width:380px}.flow-figure:has(svg[data-compact=true]) .flow-scroll-hint{display:none}@media(max-width:700px){.demo-store>div:last-child{justify-content:flex-start;gap:12px}}
