/* AEXGrid / Live channels
 * App-like foreground terminals; saturated armor; a pinned optical stage.
 * Imported after global.css so the document-reading fallback stays intact.
 */
:root { --active-color: var(--cyan); --channel-top: 103px; --channel-bottom: 64px; --stream-duration: 1450ms; }
.channel-plane { display: flow-root; position: relative; transform-origin: 50% 46%; }

/* The terminal is the actual label and click target, not an extra caption. */
.agent-node { width: 152px; height: 158px; display: block; color: var(--text); }
.agent-node__index { position: absolute; top: 0; left: 0; right: 0; height: 13px; text-align: center; font-size: 8px; line-height: 13px; }
.agent-node__index span { font-size: 7px; letter-spacing: .12em; }
.agent-node__figure { position: absolute; top: 12px; left: 50%; margin-left: -42px; width: 84px; height: 110px; }
.agent-node__figure .robot { width: 84px; height: 110px; opacity: 1; filter: drop-shadow(0 0 1px color-mix(in srgb, var(--agent-color) 30%, transparent)); }
.agent-node__halo { width: 112px; height: 108px; left: -14px; top: 0; opacity: .28; border-radius: 0; background: radial-gradient(ellipse, color-mix(in srgb, var(--agent-color) 18%, transparent), transparent 67%); }
.agent-node__charge { position: absolute; inset: 11px -4px 17px; border: 1px solid var(--agent-color); opacity: 0; pointer-events: none; }
.agent-board { position: absolute; z-index: 4; left: 2px; right: 2px; top: 94px; height: 46px; border: 1px solid color-mix(in srgb, var(--agent-color) 73%, #070707); background: #050505; box-shadow: 0 4px 0 #050505b3, inset 0 0 14px color-mix(in srgb, var(--agent-color) 4%, transparent); transition: border-color 160ms, box-shadow 180ms; }
.agent-board::before { content: ''; position: absolute; width: 3px; height: 3px; left: 7px; bottom: 7px; border-left: 1px solid var(--agent-color); border-bottom: 1px solid var(--agent-color); opacity: .5; }
.agent-board__code { display: flex; flex-direction: column; gap: 3px; position: absolute; top: 7px; left: 10px; width: 26px; }
.agent-board__code i { display: block; height: 1px; width: 26px; background: var(--agent-color); opacity: .6; }
.agent-board__code i:last-child { width: 18px; opacity: .35; }
.agent-board__status { position: absolute; top: 7px; right: 9px; width: 4px; height: 4px; background: var(--agent-color); opacity: .5; }
.agent-node__label { position: absolute; top: 17px; left: 6px; right: 6px; display: flex; align-items: center; justify-content: center; min-height: 21px; font-size: 13px; font-weight: 580; letter-spacing: -.1px; color: #e2eaf5; }
.agent-node__descriptor { position: absolute; top: 146px; left: -8px; right: -8px; text-align: center; font-size: 8px; line-height: 12px; color: #a2b5c8; }
.agent-node__socket { display: block; position: absolute; top: 20px; width: 5px; height: 5px; border: 1px solid var(--agent-color); background: #0b0b0b; }
.agent-node[data-side='left'] .agent-node__socket { right: -3px; }
.agent-node[data-side='right'] .agent-node__socket { left: -3px; }
.agent-board__corners { position: absolute; top: -1px; left: -1px; right: -1px; bottom: -1px; pointer-events: none; border: 1px solid var(--agent-color); opacity: .75; clip-path: polygon(0 0, 8% 0, 8% 4%, 0 4%, 0 96%, 8% 96%, 8% 100%, 0 100%, 100% 100%, 92% 100%, 92% 96%, 100% 96%, 100% 4%, 92% 4%, 92% 0, 100% 0, 100% 100%, 0 100%); }
.agent-node.is-selected .agent-board { border-color: var(--agent-color); box-shadow: 0 0 14px color-mix(in srgb, var(--agent-color) 15%, transparent), inset 0 -8px 22px color-mix(in srgb, var(--agent-color) 7%, transparent); }
.agent-node.is-selected .agent-node__label, .agent-node:hover .agent-node__label { color: var(--agent-color); }
.agent-node.is-selected .agent-board__status, .agent-node.is-selected .agent-node__socket { opacity: 1; background: var(--agent-color); box-shadow: 0 0 7px color-mix(in srgb, var(--agent-color) 60%, transparent); }
.agent-node.is-selected .robot { filter: drop-shadow(0 0 3px color-mix(in srgb, var(--agent-color) 30%, transparent)); }
.agent-node:hover .agent-board, .agent-node:focus-visible .agent-board { border-color: var(--agent-color); box-shadow: 0 0 12px color-mix(in srgb, var(--agent-color) 14%, transparent); }
.agent-node.is-activating .agent-node__charge { animation: emitter-charge 660ms ease-out both; }
.agent-node.is-activating .agent-board { animation: board-charge 700ms ease-out both; }
.agent-node.is-activating .agent-core, .agent-node.is-activating .agent-eyes { filter: drop-shadow(0 0 4px var(--agent-color)); }
@keyframes emitter-charge { 0% { opacity: .75; transform: scale(.72); } 35% { opacity: .9; } 100% { opacity: 0; transform: scale(1.36); } }
@keyframes board-charge { 0% { box-shadow: 0 0 0 transparent; } 25% { box-shadow: 0 0 20px color-mix(in srgb, var(--agent-color) 38%, transparent), inset 0 0 18px color-mix(in srgb, var(--agent-color) 15%, transparent); } 100% { box-shadow: 0 0 12px color-mix(in srgb, var(--agent-color) 15%, transparent); } }

/* A burst settles into a continuing signal train along the SELECTED route only. */
.route__base { stroke: #55788e; opacity: .27; }
.route__bloom { stroke: currentColor; stroke-width: 7; opacity: 0; transition: opacity 220ms; }
.route__core { stroke-width: 1.5; }
.route.is-active .route__bloom { opacity: .10; }
.route.is-active .route__core { opacity: .95; filter: drop-shadow(0 0 2px currentColor); }
.route.is-bursting .route__bloom { opacity: .28; }
.route.is-bursting .route__core { stroke-width: 2; }
.route__stream { fill: none; stroke: #e5ffff; stroke-width: 2.3; opacity: 0; filter: drop-shadow(0 0 3px currentColor); display: none; }
.route.is-active .route__stream { display: block; animation: selected-current var(--stream-duration) linear infinite; animation-delay: var(--stream-delay, 0ms); }
@keyframes selected-current {
  0% { stroke-dashoffset: 12; opacity: 0; }
  8% { opacity: .88; }
  87% { opacity: .88; }
  100% { stroke-dashoffset: -102; opacity: 0; }
}
.route__packet { stroke: #f1ffff; filter: drop-shadow(0 0 4px currentColor); }
.route__ripple { fill: none; stroke: currentColor; stroke-width: .6; transform-box: fill-box; transform-origin: center; }
.route__port { filter: drop-shadow(0 0 2px currentColor); }
[data-motion='paused'] .route__stream { visibility: hidden; }
[data-reduced-motion='true'] .route__stream { display: none !important; }

/* Invisible semantic scroll tracks. Content occupies ONE fixed stage. No
 * scroll-jacking, duplicate content, nested scrollbar or animated page sliding.
 */
.channel-mode .section, .channel-mode .section--home { display: block; min-height: 0; padding: 0; }
.channel-mode .section__inner { position: fixed; top: calc(var(--channel-top) + var(--scene-inset, 0px)); left: 50%; margin: 0; transform: translate3d(-50%, var(--reader-offset, 0px), 0); visibility: hidden; pointer-events: none; }
.channel-mode .section.is-on-stage .section__inner { visibility: visible; pointer-events: auto; }
.channel-mode .section[aria-hidden='true'] .section__inner { pointer-events: none; }
.channel-mode main { overflow-anchor: none; }
/* Keep readable overflow behind the header and bottom controls, not on top of
 * them. The content can always be reached by the normal document scroll. */
.channel-mode .scene-chrome { background: linear-gradient(transparent, #070707 30%); }
.channel-mode .section-heading { margin-bottom: 24px; }
.channel-mode .section--home .section-title { font-size: clamp(42px, 3.55vw, 54px); }
.channel-mode .section--home .section-title > span { font-size: .94em; }
.channel-mode .section--home .eyebrow { margin-bottom: 14px; }
.channel-mode .section--home .section-description { margin-top: 13px; font-size: 14px; }
.channel-mode .section--home .section-heading { margin-bottom: 20px; }
.channel-mode .home-actions { margin-top: 15px; }
.channel-mode .home-actions .button { min-height: 44px; }
.section-progress__tracks .is-active { background: var(--active-color); }
.header-nav a[aria-current]::after { background: var(--active-color); }
.reading-control { position: absolute; left: 142px; bottom: 14px; min-height: 44px; border: 0; background: transparent; color: #a9bbc8; font: 9px var(--font-mono); display: inline-flex; align-items: center; gap: 8px; padding: 0 9px; pointer-events: auto; }
.reading-control:hover { color: var(--cyan); }
.reading-control__mark { display: block; width: 12px; height: 9px; border: 1px solid var(--active-color); position: relative; }
.reading-control__mark::after { content: ''; position: absolute; width: 4px; height: 1px; left: 3px; bottom: -4px; background: var(--active-color); }

@media (min-width: 1121px) and (max-height: 800px) and (pointer: fine) {
  .channel-mode .section-title, .channel-mode .section--home .section-title { font-size: 41px; }
  .channel-mode .section-heading { margin-bottom: 18px; }
  .channel-mode .section--home .section-heading { margin-bottom: 15px; }
  .channel-mode .section--home .section-description { font-size: 13px; margin-top: 10px; }
  .channel-mode .section--home .eyebrow { margin-bottom: 10px; }
  .channel-mode .home-actions { margin-top: 12px; }
  .channel-mode .section--home .section-title > span { font-size: .91em; }
  .reading-control { bottom: 7px; }
}

@media (max-width: 1120px), (max-height: 659px), (pointer: coarse) {
  .agent-network { --nav-columns: 6; height: 92px; background: #080808f5; }
  .agent-navigation { grid-template-columns: repeat(var(--nav-columns), minmax(0, 1fr)); grid-auto-rows: 68px; gap: 10px 0; padding: 7px 15px 17px; }
  .agent-node { height: 68px; width: auto; position: relative; }
  .agent-node__index, .agent-node__descriptor { display: none; }
  .agent-node__figure { width: 34px; height: 45px; top: 0; left: 50%; margin-left: -17px; }
  .agent-node__figure .robot { width: 34px; height: 45px; }
  .agent-node__halo { width: 60px; height: 56px; left: -13px; top: -4px; }
  .agent-node__charge { inset: 0 -3px 3px; }
  .agent-board { top: 34px; left: 50%; right: auto; transform: translateX(-50%); width: min(112px, calc(100% - 12px)); height: 30px; }
  .agent-board__code { top: 5px; left: 6px; width: 13px; gap: 2px; }
  .agent-board__code i { width: 13px; }
  .agent-board__code i:last-child { width: 9px; }
  .agent-board__status { width: 3px; height: 3px; top: 5px; right: 5px; }
  .agent-board::before { display: none; }
  .agent-node__label { font-size: 11px; top: 10px; bottom: 2px; min-height: 16px; line-height: 1; }
  .agent-node__socket, .agent-node[data-side] .agent-node__socket { top: auto; bottom: -3px; left: calc(50% - 2px); right: auto; width: 4px; height: 4px; }
  .agent-node:focus-visible { outline-offset: -2px; }
  .section, .section--home { padding-top: 192px; }
  .channel-mode .section__inner, .channel-fx { width: min(840px, calc(100% - 2 * var(--content-gutter))); }
  .reading-control { bottom: 12px; left: 140px; font-size: 9px; min-height: 36px; padding: 0 10px; border: 1px solid #35485a; background: #0c0c0c; }
  .scene-chrome { height: 58px; }
  .channel-mode .section--home .section-title { font-size: clamp(35px, 5vw, 52px); }
  .channel-mode .section--home .section-description { font-size: 14px; }
}
@media (max-width: 679px) {
  .agent-network { --nav-columns: 3; height: 163px; }
  .agent-navigation { grid-auto-rows: 66px; row-gap: 11px; padding: 6px 12px 14px; }
  .agent-node { height: 66px; }
  .agent-board { width: min(130px, calc(100% - 14px)); }
  .agent-node__label { font-size: 11px; }
  .section, .section--home { padding-top: 253px; }
  .channel-mode .section--home .section-title { font-size: 37px; }
  .channel-mode .section--home .section-title > span { font-size: .97em; }
  .channel-mode .section--home .section-description { font-size: 13px; margin-top: 15px; }
  .channel-mode .home-actions { margin-top: 16px; }
  .channel-mode .section-heading { margin-bottom: 24px; }
  .channel-fx__label { font-size: 6px; left: 4px; bottom: 8px; }
}
@media (max-width: 350px) {
  .channel-mode .section--home .section-title { font-size: 32px; }
  .agent-board { width: calc(100% - 10px); }
  .agent-node__label { font-size: 10px; }
}
@media (min-width: 600px) and (max-height: 540px) {
  .agent-network { --nav-columns: 6; height: 81px; }
  .agent-navigation { grid-auto-rows: 62px; padding-top: 3px; padding-bottom: 16px; }
  .agent-node { height: 62px; }
  .agent-node__figure, .agent-node__figure .robot { width: 28px; height: 37px; }
  .agent-node__figure { margin-left: -14px; }
  .agent-board { top: 29px; height: 27px; }
  .agent-node__label { font-size: 10px; top: 9px; }
  .reading-control { left: 132px; bottom: 7px; }
  .section, .section--home { padding-top: 164px; }
}
@media (prefers-reduced-motion: reduce) {
  .channel-fx { display: none !important; }
  .agent-node__charge, .route__stream { display: none !important; }
}
@media print {
  .channel-mode .section { height: auto !important; min-height: 0; padding: 20px 0; }
  .channel-mode .section__inner { position: static; visibility: visible; width: 100%; transform: none; }
  .channel-fx, .reading-control { display: none !important; }
}

/* Second-pass optical fitting: generous at 900px, tighter vertical composition
 * at 720px. Typography is not globally scaled down to fake a fit. */
@media (min-width: 1121px) and (min-height: 801px) and (pointer: fine) {
  .channel-mode .workflow-tree { padding-top: 16px; padding-bottom: 16px; }
  .channel-mode .workflow-rooms { margin-top: 31px; }
  .channel-mode .workflow-review { min-height: 76px; padding-top: 12px; padding-bottom: 12px; }
  .channel-mode .section--workflow .section-heading { margin-bottom: 20px; }
  .channel-mode .section--workflow .context-note { margin-top: 12px; }
  .channel-mode .connection-map { min-height: 235px; padding-top: 36px; padding-bottom: 21px; }
  .channel-mode .connection-panel { padding-top: 21px; padding-bottom: 21px; min-height: 158px; }
  .channel-mode .section--connections .section-heading { margin-bottom: 20px; }
  .channel-mode .download-placeholder__copy { padding-top: 26px; padding-bottom: 23px; }
  .channel-mode .download-art { min-height: 280px; }
  .channel-mode .download-detail-row { padding-top: 17px; padding-bottom: 17px; }
  .channel-mode .site-footer { margin-top: 24px; padding-top: 17px; }
}
@media (min-width: 1121px) and (max-height: 800px) and (pointer: fine) {
  .channel-mode .section--home .demo-stage { width: min(100%, 640px); margin-left: auto; margin-right: auto; }
  .channel-mode .home-actions { width: min(100%, 640px); margin-left: auto; margin-right: auto; margin-top: 8px; }
  .channel-mode .home-actions__note { font-size: 9px; }
  .channel-mode .feature-panel, .channel-mode .feature-illustration { min-height: 296px; }
  .channel-mode .feature-panel__copy { padding-top: 18px; padding-bottom: 18px; }
  .channel-mode .editorial-tabs [role='tab'] { min-height: 49px; }
  .channel-mode .section--features .context-note { margin-top: 10px; }
  .channel-mode .workflow-tree { padding-top: 10px; padding-bottom: 10px; }
  .channel-mode .workflow-root { padding-top: 5px; padding-bottom: 5px; }
  .channel-mode .workflow-root .robot { width: 34px; height: 44px; }
  .channel-mode .workflow-rooms { margin-top: 25px; }
  .channel-mode .workflow-room { padding-top: 8px; padding-bottom: 8px; }
  .channel-mode .workflow-manager .robot { width: 28px; height: 37px; }
  .channel-mode .workflow-worker .robot { width: 28px; height: 37px; }
  .channel-mode .worker-branches { height: 20px; }
  .channel-mode .workflow-review { min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
  .channel-mode .section--workflow .context-note { margin-top: 10px; }
  .channel-mode .connection-map { min-height: 184px; padding-top: 30px; padding-bottom: 18px; }
  .channel-mode .connection-map .diagram-coordinate { top: 10px; }
  .channel-mode .connection-tabs [role='tab'] { min-height: 45px; }
  .channel-mode .connection-panel { min-height: 130px; padding-top: 15px; padding-bottom: 15px; gap: 22px; }
  .channel-mode .connection-panel h3 { margin-bottom: 7px; }
  .channel-mode .connection-panel > div > p { line-height: 1.75; }
  .channel-mode .download-placeholder { grid-template-columns: 29% 71%; }
  .channel-mode .download-placeholder__copy { padding: 20px 25px; }
  .channel-mode .download-placeholder__copy h3 { font-size: 25px; margin-top: 10px; }
  .channel-mode .download-placeholder__copy > p:not(.download-reason) { max-width: none; margin-top: 10px; line-height: 1.8; }
  .channel-mode .download-placeholder__copy .button { margin-top: 14px; }
  .channel-mode .download-art { min-height: 248px; padding-bottom: 4px; }
  .channel-mode .download-art .robot { width: 87px; height: 114px; }
  .channel-mode .download-art__platform { width: 126px; }
  .channel-mode .download-detail-row { padding: 14px 22px; }
  .channel-mode .site-footer { margin-top: 17px; padding-top: 12px; }
}
.channel-mode .channel-plane { transform-origin: 50% calc((100svh - var(--channel-top) - var(--channel-bottom)) * .46 - var(--scene-inset, 0px) - var(--reader-offset, 0px)); }
.channel-mode .section:not(.is-on-stage) .ambient { animation-play-state: paused; }
@media (min-width: 1121px) and (min-height: 801px) and (pointer: fine) {
  .channel-mode .site-footer { margin-top: 18px; }
}
@media (min-width: 1121px) and (max-height: 800px) and (pointer: fine) {
  .channel-mode .section--workflow .section-heading { margin-bottom: 14px; }
  .channel-mode .workflow-tree { padding-top: 7px; padding-bottom: 7px; }
  .channel-mode .worker-branches { height: 18px; }
  .channel-mode .section--connections .section-heading { margin-bottom: 14px; }
  .channel-mode .connection-panel { padding-top: 14px; padding-bottom: 14px; }
  .channel-mode .site-footer { margin-top: 12px; }
}

/* One-pass replacement: the old page is the exact complement of the new one. */
.channel-mode .section.is-transition-source .section__inner { visibility: visible; pointer-events: none; }
