.simulation-intro { margin-bottom: 44px; }
.simulation-intro h2 em { font-style: normal; color: var(--lime); }
.simulation-intro > div { align-self: end; max-width: 465px; }
.simulation-intro > div p { color: var(--muted); margin: 0; font-size: 17px; }
.simulation-intro > div p + p { margin-top: 10px; color: #e3ebdc; }
.simulation-shell { border: 1px solid #435440; border-radius: 5px; background: #152219; overflow: hidden; }
.simulation-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 28px; border-bottom: 1px solid var(--line); }
.simulation-label { display: inline-flex; align-items: center; gap: 9px; color: #d9e7c7; font: 11px var(--mono); white-space: nowrap; letter-spacing: .5px; }
.simulation-label > span { width: 6px; height: 6px; background: var(--lime); border-radius: 50%; }
.simulation-toolbar p { font-size: 12px; color: var(--muted); margin: 0; text-align: right; }
.sim-scenarios { display: flex; flex-wrap: wrap; gap: 8px; padding: 22px 28px 0; }
.sim-scenarios button { cursor: pointer; color: #c5d0be; background: transparent; border: 1px solid #465741; border-radius: 3px; padding: 9px 13px; font-size: 13px; }
.sim-scenarios button:hover { border-color: var(--lime); }
.sim-scenarios button[aria-pressed=true] { background: #dfea91; border-color: #dfea91; color: var(--dark); }
.sim-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0; padding: 30px 28px; }
.sim-diagram { padding-right: 32px; min-width: 0; }
.sim-holders { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.sim-node { border: 1px solid #4b5e46; border-radius: 4px; background: #1b2a20; transition: border-color .25s, background .25s, box-shadow .25s; }
.sim-holder { padding: 17px 17px 16px; }
.node-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 15px; }
.node-monogram { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid #70865e; color: var(--lime); font: 12px var(--mono); }
.share-label { font: 10px var(--mono); letter-spacing: .4px; color: #bccdab; }
.sim-node h3 { font-size: 17px; letter-spacing: -.35px; margin: 0 0 5px; }
.sim-node p { color: #b7c5af; font-size: 12px; line-height: 1.5; margin: 0; }
.node-status { display: block; margin-top: 15px; padding-top: 11px; border-top: 1px solid #3c4d36; font: 11px/1.5 var(--mono); color: #b7c5af; min-height: 29px; }
.sim-connectors { height: 78px; position: relative; }
.sim-connectors svg { width: 100%; height: 100%; display: block; fill: none; stroke-width: 1.5; }
.sim-connectors .wire { stroke: #657950; }
.sim-connectors > span { position: absolute; top: 8px; left: 0; right: 0; text-align: center; font-size: 10px; color: #c3d0b8; background: #152219; width: max-content; max-width: 90%; margin: auto; padding: 0 7px; }
.flow-packet { stroke: var(--lime); stroke-width: 3; stroke-dasharray: 9 280; stroke-dashoffset: 0; opacity: 0; }
.simulation-shell[data-stage="3"][data-outcome="approved"] .flow-packet,
.simulation-shell[data-stage="4"][data-outcome="approved"] .flow-packet { opacity: 1; }
.simulation-shell[data-playing=true][data-stage="3"] .flow-packet { animation: sealed-transit 1.6s linear infinite; }
@keyframes sealed-transit { from { stroke-dashoffset: 280; } to { stroke-dashoffset: 0; } }
.sim-broker { width: 87%; margin: 0 auto; padding: 17px; display: flex; gap: 13px; align-items: center; }
.sim-broker > img { width: 42px; height: auto; }
.sim-broker h3 { font-size: 19px; }
.broker-custody { margin-left: auto; padding-left: 14px; border-left: 1px solid #506044; font-size: 10px; color: #c1d0b2; text-align: center; max-width: 75px; line-height: 1.4; }
.broker-custody strong { display: block; color: var(--lime); font: 25px/1.1 var(--mono); margin-bottom: 5px; }
.sim-runtime-connector { display: flex; justify-content: center; position: relative; height: 49px; }
.sim-runtime-connector i { border-left: 1px solid #657950; height: 100%; }
.sim-runtime-connector span { position: absolute; top: 16px; left: calc(50% + 10px); font: 10px var(--mono); color: #bacba6; }
.sim-host { border: 1px dashed #4d6146; background: #121f16; padding: 14px; border-radius: 4px; }
.host-heading { display: flex; justify-content: space-between; gap: 10px; font: 9px/1.5 var(--mono); color: #b7c5af; margin-bottom: 12px; flex-wrap: wrap; }
.host-heading > span:last-child { color: #cdddba; }
.sim-runtime { padding: 16px; }
.runtime-heading { display: flex; align-items: center; gap: 11px; }
.runtime-lock { width: 27px; height: 32px; color: #c2d1b0; flex-shrink: 0; }
.runtime-badge { margin-left: auto; color: #b9c7b0; border: 1px solid #536647; border-radius: 3px; padding: 4px 7px; font: 10px var(--mono); white-space: nowrap; }
.sim-runtime .runtime-status { margin: 15px 0 12px; font-size: 12px; min-height: 36px; }
.runtime-checks { display: flex; flex-wrap: wrap; gap: 7px; }
.runtime-checks > span { padding: 4px 7px; border: 1px solid #455a3b; font: 10px/1.5 var(--mono); color: #d0debf; border-radius: 2px; }
.diagram-footnote { color: #aebbA5; font-size: 11px; line-height: 1.65; margin: 13px 0 0; }
.sim-story { border-left: 1px solid var(--line); padding-left: 30px; min-width: 0; }
.sim-story-top { font: 10px/1.5 var(--mono); color: #bdceaa; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 2px; }
.sim-narrative { min-height: 202px; }
.sim-narrative h3 { font-size: 30px; letter-spacing: -.8px; line-height: 1.16; margin: 24px 0 17px; color: var(--ink); max-width: 350px; }
.sim-narrative p { font-size: 15px; line-height: 1.7; color: #c0cdb7; margin: 0; }
.sim-facts { margin: 21px 0 25px; }
.sim-facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 12px; }
.sim-facts dt { color: #b7c5af; }.sim-facts dd { margin: 0; color: #e2edcf; text-align: right; }
.sim-playback { display: flex; flex-wrap: wrap; align-items: center; gap: 15px; }
.sim-playback .button { gap: 11px; padding: 11px 15px; font-size: 13px; }
.sim-next, .sim-reset { border: 0; background: transparent; color: #e2edcf; cursor: pointer; font-size: 13px; padding: 9px 0; }
.sim-next > span { margin-left: 5px; }.sim-next:disabled { opacity: .45; cursor: default; }
.sim-reset { margin-left: auto; font-size: 24px; line-height: 1; padding: 7px; }
.sim-evidence { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 22px; }
.sim-evidence > span { color: #bace9c; font: 10px/1.6 var(--mono); letter-spacing: .4px; }
.sim-evidence p { color: #b7c5af; font-size: 12px; line-height: 1.7; margin: 10px 0; }
.sim-evidence a { color: #e0edc9; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.sim-steps { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; padding: 0 28px; list-style: none; border-top: 1px solid var(--line); background: #18271c; }
.sim-steps li { min-width: 0; }.sim-steps button { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 19px 14px; color: #c1ceb6; border: 0; border-top: 2px solid transparent; background: transparent; font-size: 13px; cursor: pointer; }
.sim-steps button > span { font: 11px var(--mono); color: #b5c4a6; }.sim-steps button[aria-current=step] { color: var(--lime); border-top-color: var(--lime); }.sim-steps button[aria-current=step] > span { color: var(--lime); }
.sim-steps button:hover { background: #22321f; }
.simulation-scope { padding: 17px 28px; display: flex; gap: 25px; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); }
.simulation-scope p { font-size: 11px; line-height: 1.7; color: #adbea1; max-width: 750px; margin: 0; }.simulation-scope a { font-size: 12px; white-space: nowrap; color: #e0edc9; }
.sim-node[data-state=active] { border-color: #c8de88; box-shadow: 0 0 0 1px #c8de8820; }
.sim-node[data-state=approved] { border-color: #a6c977; }.sim-node[data-state=approved] .node-status { color: var(--lime); }
.sim-node[data-state=blocked] { border-color: #be956f; }.sim-node[data-state=blocked] .node-status { color: #f3c5a0; }
.simulation-shell[data-outcome=blocked] #sim-decision { color: #f3c5a0; }
.simulation-shell[data-stage="4"][data-outcome=approved] .sim-runtime { background: #26391f; border-color: var(--lime); }
.simulation-shell[data-stage="4"][data-outcome=approved] .runtime-badge { color: var(--dark); background: var(--lime); border-color: var(--lime); }
.simulation-shell[data-stage="4"][data-outcome=approved] .runtime-lock { color: var(--lime); }
.sim-noscript { padding: 22px 28px; color: var(--muted); }.sim-noscript a { text-decoration: underline; }
html:not(.js) .sim-playback, html:not(.js) .sim-scenarios, html:not(.js) .sim-steps { display: none; }
@media (max-width:1100px) { .sim-layout { grid-template-columns: 1.15fr 1fr; padding: 26px 22px; }.sim-diagram { padding-right: 23px; }.sim-story { padding-left: 23px; }.sim-holder { padding: 13px; }.sim-holders { gap: 15px; }.sim-node h3 { font-size: 15px; }.sim-broker { width: 95%; padding: 13px; }.sim-narrative h3 { font-size: 27px; }.sim-narrative { min-height: 226px; }.sim-runtime { padding: 13px; }.runtime-badge { padding: 4px; font-size: 9px; }.sim-scenarios button { padding: 9px 11px; font-size: 12px; } }
@media (max-width:900px) { .sim-layout { grid-template-columns: 1fr; gap: 30px; }.sim-diagram { padding-right: 0; max-width: 610px; width: 100%; margin: auto; }.sim-story { border-left: 0; border-top: 1px solid var(--line); padding: 28px 0 0; }.sim-narrative { min-height: 0; }.sim-narrative h3 { max-width: none; margin-top: 18px; }.sim-evidence { margin-top: 25px; }.simulation-toolbar { flex-direction: column; align-items: flex-start; gap: 9px; }.simulation-toolbar p { text-align: left; }.sim-facts { margin-top: 25px; } }
@media (max-width:540px) { .simulation-intro { margin-bottom: 30px; }.simulation-intro h2 { font-size: 33px; }.simulation-intro > div p { font-size: 16px; }.simulation-toolbar, .sim-scenarios { padding-left: 16px; padding-right: 16px; }.sim-scenarios { gap: 7px; padding-top: 16px; }.sim-scenarios button { padding: 9px 10px; font-size: 12px; }.sim-layout { padding: 24px 16px; }.sim-holders { gap: 10px; }.sim-holder { padding: 12px 10px; }.node-heading { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 12px; }.share-label { font-size: 9px; }.sim-node h3 { font-size: 14px; }.sim-node p { font-size: 11px; }.node-status { font-size: 10px; min-height: 41px; }.sim-connectors { height: 66px; }.sim-connectors > span { font-size: 9px; top: 7px; max-width: 100%; }.sim-broker { width: 100%; padding: 12px; gap: 9px; }.sim-broker > img { width: 34px; }.sim-broker h3 { font-size: 17px; }.broker-custody { padding-left: 10px; font-size: 9px; }.broker-custody strong { font-size: 22px; }.sim-runtime-connector span { font-size: 9px; }.sim-host { padding: 10px; }.host-heading { font-size: 9px; gap: 5px; }.sim-runtime { padding: 12px; }.runtime-heading { flex-wrap: wrap; gap: 8px; }.runtime-lock { width: 22px; }.runtime-heading > div { flex: 1; }.runtime-badge { margin-left: 30px; }.sim-runtime .runtime-status { min-height: 0; font-size: 12px; }.runtime-checks > span { font-size: 9px; }.sim-narrative h3 { font-size: 27px; }.sim-playback { gap: 12px; }.sim-playback .button { padding: 11px 13px; }.sim-next { font-size: 12px; }.sim-steps { padding: 0 10px; }.sim-steps button { flex-direction: column; gap: 7px; padding: 13px 3px; font-size: 11px; text-align: center; }.sim-steps button > span { font-size: 10px; }.simulation-scope { padding: 17px 16px; flex-direction: column; align-items: flex-start; gap: 10px; } }
@media (prefers-reduced-motion:reduce) { .flow-packet { animation: none !important; }.sim-node { transition: none; } }

/* Playback comes before the architecture, including on small screens. */
.sim-runbar { display:flex;align-items:center;justify-content:space-between;gap:20px;margin:22px 28px 0;padding-bottom:22px;border-bottom:1px solid var(--line); }
.sim-runbar > p { margin:0;font-size:12px;color:#b7c5af; }
.sim-runbar .sim-playback { flex-wrap:nowrap;gap:20px; }
.sim-holder { display:flex;flex-direction:column; }
.sim-holder > p { margin-bottom:15px; }
.sim-holder .node-status { margin-top:auto; }
.sim-story .sim-evidence { margin-top:22px; }
@media(max-width:540px) {
  .sim-runbar { margin:17px 16px 0;flex-direction:column;align-items:flex-start;gap:12px;padding-bottom:18px; }
  .sim-runbar .sim-playback { width:100%;gap:13px; }
  .sim-runbar > p { font-size:11px; }
  .share-label,.host-heading,.runtime-checks>span { font-size:10px; }
  .sim-connectors>span { font-size:10px; }
}
@media(max-width:360px) {
  .sim-runbar .sim-playback { gap:8px; }
  .sim-playback .button { padding:11px 10px;font-size:12px;gap:8px;white-space:nowrap; }
  .sim-next { white-space:nowrap; }
  .sim-next>span { display:none; }
}
