/* One 20s cycle: four context exchanges, followed by a quiet human-review hold. */
.brain-platform--animated .platform-map{display:block}
.platform-network{--platform-gap:18px;position:relative;isolation:isolate;display:grid;grid-template-columns:minmax(0,1fr) minmax(66px,.85fr) minmax(0,1fr);gap:var(--platform-gap);align-items:center}
.platform-network>.platform-agents,.platform-network>.platform-core{position:relative;z-index:1}
.platform-network .platform-agents>span:after{right:calc(-1 * var(--platform-gap));left:auto;width:var(--platform-gap)}
.platform-network .platform-agents--right>span:after{right:auto;left:calc(-1 * var(--platform-gap))}
.platform-network.has-platform-routes .platform-agents>span:after{display:none}
.platform-flow-lines{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:0;fill:none;stroke-linecap:round}
.platform-flow-base{stroke:#8db7c33b;stroke-width:1}
.platform-flow-trace{stroke:#b6dde5;stroke-width:2.2;stroke-dasharray:8 92;opacity:0;animation:platform-context-travel 20s linear var(--step-delay) infinite}
.platform-flow-light{stroke:#356675;stroke-width:8;stroke-dasharray:8 92;opacity:0;filter:blur(3px);animation:platform-context-travel 20s linear var(--step-delay) infinite}
.brain-platform--animated [data-platform-agent]{animation:platform-agent-focus 20s ease var(--step-delay) infinite}
.brain-platform--animated [data-platform-agent]:before{content:'';position:absolute;right:10px;top:11px;width:4px;height:4px;border-radius:50%;background:#a8d2dd;opacity:0;animation:platform-agent-light 20s ease var(--step-delay) infinite}
.brain-platform--animated .platform-core i{animation:platform-context-core 4s ease-in-out infinite;transform-origin:center}
.platform-sequence{display:grid;min-height:44px;align-items:center;margin:24px 0 0;text-align:center;position:relative}
.platform-sequence>span{grid-area:1/1;font-size:10px;line-height:1.7;color:#c6cacc;opacity:0;transform:translateY(5px);animation:platform-context-caption 20s ease var(--step-delay) infinite}
.platform-sequence>span:last-of-type{color:#c5e2e7}
.platform-sequence-static{display:none}
.brain-platform--animated:not(.has-platform-motion) .platform-sequence>span{display:none}
.brain-platform--animated:not(.has-platform-motion) .platform-sequence-static{display:block;font-size:10px;line-height:1.8;color:#c6cacc}
.brain-platform--animated .platform-connections{margin-top:6px;padding-top:17px;font-size:9px;color:#8faebd}
.brain-platform--animated figcaption{align-items:center}
.platform-review{display:inline-flex;align-items:center;gap:6px;position:relative;color:#c6dce3;animation:platform-review-focus 20s ease infinite}
.platform-review svg{width:12px;height:14px;flex:none;stroke:currentColor;fill:none;stroke-width:1.4}

@keyframes platform-context-travel{
  0%{stroke-dashoffset:0;opacity:0}
  1.5%{opacity:.9}
  9%{stroke-dashoffset:-93;opacity:.9}
  10%{stroke-dashoffset:-100;opacity:0}
  11%{stroke-dashoffset:-100;opacity:0}
  12%{opacity:.85}
  19%{stroke-dashoffset:0;opacity:.85}
  20%,100%{stroke-dashoffset:0;opacity:0}
}
@keyframes platform-agent-focus{
  0%,20%,100%{border-color:#c6cacc33;box-shadow:none}
  3%,16%{border-color:#94c3cfb3;box-shadow:0 0 0 1px #35667530,inset 0 0 24px #35667524,0 0 20px #35667518}
}
@keyframes platform-agent-light{0%,20%,100%{opacity:0}3%,16%{opacity:.85}}
@keyframes platform-context-core{0%,100%{transform:scale(1);opacity:.5}45%,60%{transform:scale(1.07);opacity:.9}}
@keyframes platform-context-caption{
  0%{opacity:0;transform:translateY(5px)}
  2%,17%{opacity:1;transform:translateY(0)}
  20%,100%{opacity:0;transform:translateY(-4px)}
}
@keyframes platform-review-focus{0%,78%,100%{color:#a8bec8}83%,97%{color:#e1f0f1;text-shadow:0 0 18px #8db7c355}}

@media(max-width:1100px){.platform-network{--platform-gap:13px}.platform-sequence>span{font-size:9px}.platform-sequence{margin-top:20px}}
@media(max-width:900px){.platform-network{--platform-gap:28px}.platform-sequence>span{font-size:11px}.platform-sequence{margin-top:25px}.brain-platform--animated .platform-connections{font-size:10px}}
@media(max-width:540px){.platform-network{--platform-gap:11px}.platform-sequence{min-height:40px;margin-top:19px}.platform-sequence>span{font-size:9px;max-width:250px;margin-inline:auto}.brain-platform--animated .platform-connections{font-size:8px;padding-top:15px}.platform-review{gap:4px}.platform-review svg{width:10px;height:12px}.brain-platform--animated figcaption{gap:15px}.brain-platform--animated [data-platform-agent]:before{right:7px;top:8px;width:3px;height:3px}.platform-flow-trace{stroke-width:1.7}.platform-flow-light{stroke-width:6}}
@media(max-width:350px){.platform-network{--platform-gap:9px;grid-template-columns:minmax(0,1fr) minmax(60px,.85fr) minmax(0,1fr)}.platform-sequence>span{font-size:8px;max-width:210px}.brain-platform--animated figcaption{gap:12px;font-size:9px}}
@media(prefers-reduced-motion:reduce){
  .brain-platform--animated *{animation:none!important;transition:none!important}
  .platform-flow-trace,.platform-flow-light,.brain-platform--animated [data-platform-agent]:before{display:none}
  .platform-sequence>span{display:none}
  .platform-sequence-static{display:block;font-size:10px;line-height:1.8;color:#c6cacc}
  .brain-platform--animated .platform-core i{transform:none;opacity:.6}
  .platform-review{color:#d2e6eb}
}
