/* The graphic layers never participate in carousel sizing or intercept a tap. */
.hero-currents {display:none}
[data-preview=blue] .topic-hero {background:linear-gradient(108deg,#f7faff 4%,#e8f3ff 54%,#cce7ff)}
[data-preview=blue] .hero-currents {
  position:absolute;inset:0;z-index:-1;display:block;overflow:hidden;pointer-events:none;
  mask-image:linear-gradient(90deg,transparent 2%,#0008 30%,black 65%);
}
.hero-currents i {
  position:absolute;width:105%;height:105%;left:10%;bottom:-74%;border-radius:50%;
  border-top:clamp(9px,1.6vw,26px) solid #c3ddfc;
  background:linear-gradient(177deg,#f6fcffb8 2%,#b1d8ff78 19%,transparent 45%);
  box-shadow:0 -2px 0 #f4fbff;transform:rotate(-12deg);
}
.hero-currents i+i {left:-7%;bottom:-86%;border-width:4px;border-color:#8bc6ef99;transform:rotate(7deg)}
[data-preview=blue] .portal .launch {
  position:relative;background:linear-gradient(180deg,#f2f8ff,white 87%);
  box-shadow:0 -16px 24px -22px #5385bc65;
}
[data-preview=blue] .facility-band {background:linear-gradient(180deg,#edf4ff 74%,#fff)}
.network-canvas {position:relative}
.network-trace {pointer-events:none;position:absolute;inset:0;width:100%;height:100%;overflow:visible;fill:none}
/* Coloured trails are confined to a few illustrated routes so the printed place names remain readable. */
.network-trace path {stroke-linecap:round;stroke-linejoin:round}
.trace-track {stroke:#8ce1ff;stroke-opacity:.48;stroke-width:1.45}
.trace-packet {opacity:0;stroke-width:3.5;stroke-dasharray:12 110}
.request-path {stroke:#ffdc75;filter:drop-shadow(0 0 2px #e49711)}
.response-path {stroke:#75f9ff;filter:drop-shadow(0 0 2px #0abed7)}
.trace-origin {fill:#fff1c4;stroke:#dda84a;stroke-width:1}
.hub-core {fill:#fffae4;stroke:#ffc75c;stroke-width:1.5}
.hub-ring {stroke:#ffe19c;stroke-width:1.6;transform-box:fill-box;transform-origin:center}
.map-scroll .network-canvas {width:max(920px,100%)}
.map-scroll .network-canvas img {width:100%}
.trace-toolbar,.trace-controls,.trace-key,.trace-key span {display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.trace-toolbar {background:#0e2144;color:white;padding:6px 15px;justify-content:space-between}
.trace-key {font-size:13px;font-weight:600}
.trace-key span {gap:6px}
.trace-key span::before {content:"";width:16px;height:4px;border-radius:4px;background:#ffdc75}
.trace-key span+span::before {background:#75f9ff}
dialog .trace-toolbar {margin-bottom:14px}
.trace-controls {display:none;gap:4px}
.trace-controls button {border:0;color:white;background:transparent;padding:6px 9px;min-height:36px;font-size:13px}
.trace-controls button:hover,.trace-controls button:focus-visible {background:#294468}
@media(max-width:700px){.trace-toolbar {padding:5px 9px;gap:4px}.trace-key{gap:9px}.trace-controls button{min-height:44px}.trace-packet{stroke-width:4.4}}
@media (prefers-reduced-motion:no-preference) {
  .hero-currents i {animation:current-sweep 8s ease-in-out infinite alternate;animation-play-state:paused}
  .hero-currents i+i {animation:current-return 9s ease-in-out infinite alternate;animation-play-state:paused}
  .in-view .hero-currents i {animation-play-state:running}
  @keyframes current-sweep {to{transform:translate(-4%,-7%) rotate(-6deg)}}
  @keyframes current-return {to{transform:translate(4%,4%) rotate(1deg)}}
  .api-diagram em::before,.api-diagram em::after {
    animation:api-arrow 1.9s linear infinite;animation-play-state:paused;
  }
  .api-diagram em::after {animation-delay:-.95s}
  .api-diagram em:last-of-type::before {animation-delay:-.38s}
  .api-diagram em:last-of-type::after {animation-delay:-1.33s}
  .model-feature.in-view .api-diagram em::before,.model-feature.in-view .api-diagram em::after {animation-play-state:running}
  @keyframes api-arrow {
    from {left:0;opacity:.3}
    16%,82% {opacity:1}
    to {left:calc(100% - 12px);opacity:.3}
  }
  .trace-enabled .trace-controls,dialog .trace-controls {display:flex}
  .network-trace .trace-packet {animation:request-travel 5.8s var(--offset) linear infinite;animation-play-state:paused}
  .network-trace .response-path {animation-name:response-travel}
  .network-trace .hub-ring {animation:hub-wave 2.9s ease-out infinite;animation-play-state:paused}
  :is(.map-playing, .topic-hero.in-view .hero-network) .network-trace :is(.trace-packet,.hub-ring) {animation-play-state:running}
  @keyframes request-travel {
    0%{stroke-dashoffset:12;opacity:.55} 4%{opacity:1}
    44%{stroke-dashoffset:-99;opacity:1} 48%,100%{stroke-dashoffset:-101;opacity:0}
  }
  @keyframes response-travel {
    0%,48%{stroke-dashoffset:-100;opacity:0} 52%{opacity:1}
    94%{stroke-dashoffset:9;opacity:1} 100%{stroke-dashoffset:12;opacity:0}
  }
  @keyframes hub-wave {0%{opacity:.85;transform:scale(.8)} 85%,100%{opacity:0;transform:scale(2.2)}}
  #cooperation .panel .content {animation:role-enter .27s ease-out}
  @keyframes role-enter {from{opacity:.75}to{opacity:1}}
}

.topic-art > img {display:block;width:100%;height:100%;object-fit:inherit;object-position:inherit}
.hero-network {position:absolute;inset:0;pointer-events:none}
.hero-hub-label {
  position:absolute;left:84.67%;bottom:calc(57.76% + 12px);transform:translateX(-50%);
  padding:2px 7px;border:1px solid #ffdc88;border-radius:4px;background:#112341;
  color:#fff4d7;font-size:clamp(12px,1.1vw,16px);line-height:1.35;font-weight:650;white-space:nowrap;
}
@media(max-width:800px){
  /* Position the trace against the mobile artwork itself, above the normal-flow image. */
  [data-preview] .portal .topic-hero .topic-art {position:relative;inset:auto}
}

/* Keep the direction legible even when the visitor requests static visuals. */
.model-feature .api-diagram {display:flex}
.api-diagram em {position:relative;height:16px;border:0;background:linear-gradient(#94b7ed,#94b7ed) center / 100% 1px no-repeat}
.api-diagram em::before,.api-diagram em::after {
  content:"";position:absolute;top:3px;left:30%;width:12px;height:10px;background:#205cc5;
  clip-path:polygon(0 0,40% 0,100% 50%,40% 100%,0 100%,60% 50%);
}
.api-diagram em::after {left:65%}
@media(max-width:700px){.model-feature .api-diagram {margin:17px auto 21px}.model-feature p {max-width:100%}}
