/* A local signal room: actual check events supply every node and packet. */
.activity-panel {
  --signal-cyan: #00cfb0;
  --signal-ok: #76e6ad;
  --signal-warn: #efbc69;
  --signal-crit: #ff7d8a;
  --signal-unknown: #94a4b5;
  --signal-blue: #83bfe9;
  --scene-text: #e4edf2;
  --scene-muted: #8fa7b5;
  padding: 0;
  overflow: hidden;
  border: 1px solid #2a3e4a;
  background: #101b25;
  color: var(--scene-text);
  box-shadow: 0 18px 50px #07101924;
}
.activity-panel[hidden], .activity-panel [hidden] { display: none !important; }
.activity-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 24px; background: #15202c; border-bottom: 1px solid #2a3e4a; }
.activity-title-group { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.activity-title-group h2 { margin: 0; color: #edf5f7; font-size: 18px; line-height: 1.4; font-weight: 650; letter-spacing: -.025em; }
.activity-signal-mark { display: inline-flex; align-items: center; gap: 3px; height: 20px; }
.activity-signal-mark i { width: 3px; height: 8px; background: var(--signal-cyan); border-radius: 1px; }
.activity-signal-mark i:nth-child(2) { height: 18px; }
.activity-signal-mark i:nth-child(3) { height: 12px; opacity: .65; }
.activity-mode { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #39515e; border-radius: 4px; padding: 3px 7px; color: #b8cdd8; font-size: 11px; font-weight: 550; line-height: 1.5; }
.activity-mode::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--signal-cyan); }
.activity-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.activity-controls .activity-speed { display: flex; align-items: center; margin: 0; }
.activity-panel .activity-control, .activity-panel .activity-speed select { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; margin: 0; padding: 7px 10px; border: 1px solid #364b5a; border-radius: 5px; background: #1b2b38; color: #cedde5; font: inherit; font-size: 12px; line-height: 1.4; box-shadow: none; cursor: pointer; }
.activity-panel .activity-control:hover, .activity-panel .activity-speed select:hover { border-color: #64818e; background: #213643; color: #f1fafb; }
.activity-panel .activity-control[aria-pressed=true] { border-color: #00cfb0; color: var(--signal-cyan); background: #143b3c; }
.activity-control svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.activity-panel .activity-control-icon { width: 36px; padding-inline: 8px; }
.activity-speed select { color-scheme: dark; max-width: 145px; }
.activity-panel :is(button, select, a, [tabindex]):focus-visible { outline: 2px solid #92f7e4; outline-offset: 3px; }
.activity-stage { position: relative; isolation: isolate; min-height: 430px; background-color: #0b151e; background-image: radial-gradient(ellipse at 16% 47%, #163e452e, transparent 43%), linear-gradient(#6580900a 1px, transparent 1px), linear-gradient(90deg, #6580900a 1px, transparent 1px); background-size: auto, 36px 36px, 36px 36px; }
.activity-stage::after { content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none; opacity: .2; background: repeating-linear-gradient(0deg, transparent 0 3px, #0004 3px 4px); }
.activity-stage-topline, .activity-stage-bottomline { display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #8ca5b2; font-size: 11px; line-height: 1.5; padding: 16px 24px; }
.activity-stage-topline { position: absolute; top: 0; inset-inline: 0; pointer-events: none; }
.activity-stage-topline b { margin-inline: 7px; color: #3b6574; font-weight: 400; }
.activity-stage-direction { display: inline-flex; align-items: center; gap: 9px; }
.activity-stage-direction i { width: 35px; height: 1px; background: #446977; position: relative; }
.activity-stage-direction i::after { content: ''; position: absolute; right: 0; top: -2px; width: 4px; height: 4px; border-top: 1px solid #6a98a3; border-right: 1px solid #6a98a3; transform: rotate(45deg); }
.activity-scene { display: block; width: 100%; height: clamp(350px, 36vw, 500px); min-height: 350px; overflow: visible; }
.activity-stage-bottomline { position: relative; padding-top: 0; min-height: 36px; }
.activity-stage-bottomline [role=status] { max-width: 75%; }
.activity-readonly { white-space: nowrap; color: #8198a7; }
.scene-hub-orbit { fill: none; stroke: #25434e; stroke-width: 1; stroke-dasharray: 2 8; }
.scene-hub-calibration { fill: none; stroke: #3b6974; stroke-width: 1; }
.scene-hub-ring { fill: #0c2029; stroke: #235862; stroke-width: 1; }
.scene-hub-arc { fill: none; stroke: #00cfb0; stroke-width: 2; opacity: .7; }
.scene-hub-body { fill: #152b37; stroke: #518394; stroke-width: 1; }
.scene-hub-detail { stroke: #34586a; stroke-width: 9; fill: none; }
.scene-hub-vents { stroke: #83bfe9; stroke-width: 3; opacity: .8; }
.scene-hub-light { fill: var(--signal-cyan); }
.scene-hub-paddle { fill: var(--signal-cyan); filter: drop-shadow(0 0 5px #00cfb055); }
.scene-hub-label { fill: #e0eff4; font-size: 19px; font-weight: 600; letter-spacing: -.4px; }
.scene-hub-caption { fill: #819eae; font-size: 11px; }
.scene-link { fill: none; stroke: #2b4a58; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.scene-link.is-running, .scene-link[data-level=running] { stroke: #388675; }
.scene-link-highlight { fill: none; stroke: url(#activity-wire-gradient); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.scene-link-junction { fill: #0d1e29; stroke: #3a6472; stroke-width: 1; }
.scene-node { --node-color: var(--signal-unknown); }
.scene-node[data-level=running], .scene-node.is-running { --node-color: var(--signal-cyan); }
.scene-node[data-level=ok], .scene-node.is-ok { --node-color: var(--signal-ok); }
.scene-node[data-level=warn], .scene-node.is-warn { --node-color: var(--signal-warn); }
.scene-node[data-level=crit], .scene-node.is-crit { --node-color: var(--signal-crit); }
.scene-node-body { fill: #132430; stroke: #355262; stroke-width: 1; }
.scene-node:hover .scene-node-body { fill: #18313d; stroke: #698694; }
.scene-node-edge, .scene-node-paddle { fill: var(--node-color); }
.scene-node-icon { fill: none; stroke: #81a5b7; stroke-width: 1.25; }
.scene-node-name { fill: #dcebf2; font-size: 14px; font-weight: 550; }
.scene-node-meta { fill: #91a9b7; font-size: 11px; }
.scene-node-status { fill: var(--node-color); font-size: 10px; font-weight: 600; }
.scene-node-dot { fill: var(--node-color); }
.scene-pulse { fill: var(--signal-cyan); filter: drop-shadow(0 0 4px #00cfb066); }
.scene-pulse.is-ok, .scene-pulse[data-level=ok] { fill: var(--signal-ok); }
.scene-pulse.is-warn, .scene-pulse[data-level=warn] { fill: var(--signal-warn); }
.scene-pulse.is-crit, .scene-pulse[data-level=crit] { fill: var(--signal-crit); }
.scene-pulse.is-unknown, .scene-pulse[data-level=unknown] { fill: var(--signal-unknown); }
.scene-pulse-trail { stroke: var(--signal-cyan); stroke-width: 2; stroke-linecap: round; opacity: .2; }
.activity-scene-empty { position: absolute; inset: 65px 24px 65px 35%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.activity-scene-empty p { margin: 16px 0 5px; color: #d5e4eb; font-size: 17px; }
.activity-scene-empty>span:last-child { max-width: 280px; color: #8fa7b5; font-size: 12px; line-height: 1.6; }
.activity-empty-signal { display: block; width: 58px; height: 1px; background: #327277; box-shadow: -12px -8px 0 -0.1px #254750, 12px 8px 0 -0.1px #254750; }
.activity-telemetry { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 24px; border-top: 1px solid #263c49; background: #12212c; }
.activity-counters { display: flex; flex-wrap: wrap; gap: 25px; margin: 0; }
.activity-counters>div { display: flex; align-items: baseline; gap: 9px; }
.activity-counters dt { color: #8fa7b5; font-size: 11px; }
.activity-counters dd { margin: 0; color: #dce9ef; font-size: 16px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.activity-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; list-style: none; padding: 0; margin: 0; color: #9eb4c0; font-size: 10px; }
.activity-legend li { display: flex; align-items: center; gap: 5px; }
.activity-legend i { width: 5px; height: 5px; border-radius: 1px; background: var(--signal-unknown); }
.activity-legend .signal-outbound { background: var(--signal-cyan); }
.activity-legend .signal-ok { background: var(--signal-ok); }
.activity-legend .signal-warn { background: var(--signal-warn); }
.activity-legend .signal-crit { background: var(--signal-crit); }
.activity-console { margin: 0; border-top: 1px solid #2b3d49; background: #0b141d; }
.activity-console-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 24px; border-bottom: 1px solid #1e303c; }
.activity-console-heading h3 { margin: 0; color: #a4bdca; font-size: 11px; line-height: 1.5; font-weight: 500; }
.activity-console-heading h3 span { color: #00cfb0; font-size: 14px; margin-right: 5px; }
.activity-panel .activity-console-follow { padding: 3px 0 3px 12px; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: #879fac; font: inherit; font-size: 11px; cursor: pointer; }
.activity-panel .activity-console-follow::before { content: ''; display: inline-block; width: 5px; height: 5px; margin-inline-end: 6px; border-radius: 50%; background: #6b7b88; }
.activity-panel .activity-console-follow[aria-pressed=true] { color: #a0dace; }
.activity-panel .activity-console-follow[aria-pressed=true]::before { background: var(--signal-cyan); }
.activity-console-scroll { height: 132px; overflow: auto; padding: 10px 24px; scrollbar-width: thin; scrollbar-color: #38505f #0b141d; }
.activity-console ol { list-style: none; padding: 0; margin: 0; }
.activity-console li, .activity-console-line { display: flex; align-items: baseline; gap: 12px; min-height: 23px; color: #a6bfca; font-family: ui-monospace, 'Cascadia Code', 'Liberation Mono', monospace; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.activity-console time, .console-time { flex: 0 0 auto; color: #708e9e; font-variant-numeric: tabular-nums; }
.activity-console .console-status, .activity-console [data-level] { color: var(--signal-unknown); }
.activity-console .is-ok, .activity-console [data-level=ok] { color: var(--signal-ok); }
.activity-console .is-warn, .activity-console [data-level=warn] { color: var(--signal-warn); }
.activity-console .is-crit, .activity-console [data-level=crit] { color: var(--signal-crit); }
.activity-console .is-running, .activity-console [data-level=running] { color: var(--signal-cyan); }
.activity-console a { color: #b6d6e5; text-decoration-color: #476575; text-underline-offset: 3px; }
.activity-panel.is-expanded { display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0; overflow: auto; }
.activity-panel.is-expanded .activity-stage { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 350px; }
.activity-panel.is-expanded .activity-scene { height: min(65vh, 760px); }
.activity-panel.is-expanded .activity-console-scroll { height: 115px; }
@media (max-width: 900px) {
  .activity-heading { align-items: flex-start; flex-wrap: wrap; }
  .activity-telemetry { flex-wrap: wrap; gap: 12px; }
  .activity-controls { margin-inline-start: auto; }
  .activity-panel .activity-control, .activity-panel .activity-speed select { min-height: 40px; }
}
@media (max-width: 600px) {
  .activity-heading { padding: 16px; gap: 13px; }
  .activity-title-group { gap: 9px; }
  .activity-title-group h2 { font-size: 17px; }
  .activity-controls { width: 100%; margin: 0; gap: 5px; }
  .activity-panel .activity-control, .activity-panel .activity-speed select { min-height: 44px; padding: 9px 8px; font-size: 11px; }
  .activity-panel .activity-control-icon { width: 44px; margin-inline-start: auto; }
  .activity-stage { min-height: 350px; background-size: auto, 28px 28px, 28px 28px; }
  .activity-scene { min-height: 350px; height: 400px; }
  .activity-stage-topline, .activity-stage-bottomline { padding-inline: 16px; font-size: 10px; gap: 10px; }
  .activity-stage-direction { display: none; }
  .activity-stage-bottomline { min-height: 43px; }
  .activity-readonly { display: none; }
  .activity-stage-bottomline [role=status] { max-width: 100%; }
  .activity-telemetry { padding: 13px 16px; }
  .activity-counters { width: 100%; justify-content: space-between; gap: 12px; }
  .activity-counters>div { gap: 6px; }
  .activity-legend { gap: 12px; }
  .activity-console-heading { padding-inline: 16px; }
  .activity-console-scroll { padding-inline: 16px; height: 139px; }
  .activity-console li, .activity-console-line { gap: 8px; font-size: 10px; }
  .activity-scene-empty { inset: 90px 18px 45px; background: #0b151ee8; }
}
@media (prefers-reduced-motion: reduce) {
  .activity-panel *, .activity-panel *::before, .activity-panel *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .scene-pulse, .scene-hub-paddle { filter: none; }
}
.activity-scene-overflow { position: absolute; right: 24px; bottom: 44px; color: #8eabb8; font-size: 11px; }
.activity-console-heading h3 .activity-console-count { display: inline-block; min-width: 18px; margin-inline-start: 5px; margin-inline-end: 0; padding: 0 4px; border: 1px solid #304651; border-radius: 3px; color: #9bb4c1; font-size: 10px; text-align: center; font-variant-numeric: tabular-nums; }
.scene-node.is-active .scene-node-body { stroke: #508b8d; }
.scene-node.is-active .scene-node-paddle { filter: drop-shadow(0 0 4px #00cfb044); }
@media (max-width: 600px) { .activity-scene-overflow { right: 16px; } }
@media (prefers-reduced-motion: reduce) { .scene-node.is-active .scene-node-paddle { filter: none; } }

.activity-panel { margin-bottom: 24px; }
.activity-mode { min-width: 150px; min-height: 38px; justify-content: center; text-align: center; max-width: 180px; }
.activity-mode[data-mode=recorded]::before { background: var(--signal-warn); }
.activity-mode[data-mode=recorded] { color: #efc887; border-color: #655137; }
.activity-panel[data-scene-layout=compact] .scene-node-name { font-size: 22px; }
.activity-panel[data-scene-layout=compact] .scene-node-meta { font-size: 18px; }
.activity-panel[data-scene-layout=compact] .scene-node-status { font-size: 16px; }
.scene-pulse-label { fill: #b0cbd8; font-size: 11px; font-weight: 500; pointer-events: none; }
.activity-panel[data-scene-layout=compact] .scene-pulse-label { font-size: 18px; }
.scene-hub-orbit { transform-origin: 0 0; animation: activity-orbit 70s linear infinite; }
.scene-hub-light { animation: activity-breathe 5s ease-in-out infinite; }
@keyframes activity-orbit { to { transform: rotate(360deg); } }
@keyframes activity-breathe { 50% { opacity: .4; } }
.activity-panel[data-paused=true] .scene-hub-orbit,
.activity-panel[data-paused=true] .scene-hub-light { animation-play-state: paused; }
.activity-dialog { position: fixed; inset: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; padding: 0; margin: 0; border: 0; background: #0b151e; color: #e4edf2; }
.activity-dialog::backdrop { background: #03080bee; }
.activity-panel.is-expanded { margin: 0; }
.activity-panel.is-expanded .activity-heading { position: sticky; top: 0; z-index: 3; }
@media (prefers-reduced-motion: reduce) { .scene-hub-orbit, .scene-hub-light { animation: none; } }

.scene-impact { fill: none; stroke: var(--signal-cyan); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
@media (max-width: 600px) {
  .activity-controls { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px 44px 44px; }
  .activity-controls .activity-control { width: 44px; padding-inline: 0; }
  .activity-controls .activity-control > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .activity-speed select { width: 100%; max-width: none; }
  .activity-panel .activity-control-icon { margin: 0; }
}

@media (max-width: 600px) {
  .activity-console ol { min-width: 660px; }
  .activity-console li { white-space: nowrap; overflow-wrap: normal; font-size: 11px; }
  .activity-panel[data-scene-layout=compact] .scene-node-name { font-size: 24px; }
  .activity-panel[data-scene-layout=compact] .scene-node-meta { font-size: 20px; }
  .activity-panel[data-scene-layout=compact] .scene-node-status { font-size: 18px; }
  .activity-panel[data-scene-layout=compact] .scene-pulse-label { display: none; }
}

@media (max-width: 600px) {
  .activity-panel[data-scene-layout=compact] .scene-hub-label { font-size: 30px; }
  .activity-panel[data-scene-layout=compact] .scene-hub-caption { display: none; }
}

/* All domains keep a permanent place; expanded stations are only temporary focus. */
.activity-field { display: flex; align-items: center; padding-top: 40px; }
.activity-field > .activity-scene { flex: 1 1 0; width: 0; min-width: 0; }
.activity-map { flex: 0 0 180px; align-self: stretch; margin: 16px 16px 20px 0; padding: 14px 0 0 16px; border-left: 1px solid #294451; }
.activity-map-heading { display: flex; align-items: center; justify-content: space-between; min-height: 28px; gap: 8px; }
.activity-map h3 { margin: 0; color: #c7dce5; font-size: 12px; font-weight: 550; }
.activity-map h3 span { margin-left: 5px; color: #7698a8; font-variant-numeric: tabular-nums; }
.activity-map-key { margin: 3px 0 15px; color: #8ba8b7; font-size: 10px; line-height: 1.6; }
.activity-map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(24px, 1fr)); align-content: start; gap: 4px; max-height: 290px; padding: 3px; overflow: auto; scrollbar-width: thin; scrollbar-color: #38505f #0b151e; }
.activity-panel .activity-map-dot { --dot-color: var(--signal-unknown); display: grid; place-items: center; min-width: 24px; min-height: 24px; margin: 0; padding: 0; border: 1px solid transparent; border-radius: 5px; background: transparent; box-shadow: none; cursor: pointer; }
.activity-map-dot::before { content: ''; width: 7px; height: 7px; border-radius: 2px; background: var(--dot-color); transition: background .5s, box-shadow .5s; }
.activity-map-dot[data-level=running] { --dot-color: var(--signal-cyan); }
.activity-map-dot[data-level=ok] { --dot-color: var(--signal-ok); }
.activity-map-dot[data-level=warn] { --dot-color: var(--signal-warn); }
.activity-map-dot[data-level=crit] { --dot-color: var(--signal-crit); }
.activity-panel .activity-map-dot:hover { background: #1b303c; border-color: #4b6a78; }
.activity-map-dot.is-open::before { box-shadow: 0 0 0 3px #86dccd17, 0 0 10px var(--dot-color); }
.activity-panel .activity-map-dot[aria-pressed=true] { border-color: #e2b870; background: #5f482333; }
.activity-map-detail { min-height: 56px; margin: 14px 0 0; color: #9dbac8; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.activity-panel [data-map-unpin] { width: 28px; min-height: 28px; padding: 0; margin: 0; border: 1px solid #617384; border-radius: 4px; background: #172b37; color: #e6cc9f; font-size: 18px; line-height: 1; cursor: pointer; box-shadow: none; }
.scene-node { cursor: pointer; }
.scene-node-content { animation: activity-station-in .7s ease-out both; }
.scene-node.is-leaving .scene-node-content { animation: activity-station-out .5s ease-in both; }
.scene-node[data-pinned=true] .scene-node-body { stroke: #e2b870; }
@keyframes activity-station-in { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: translateX(0); } }
@keyframes activity-station-out { to { opacity: 0; transform: translateX(22px); } }
.activity-scene-empty { right: 220px; pointer-events: none; }
.activity-panel.is-expanded .activity-field { width: 100%; }
@media (max-width: 600px) {
  .activity-field { flex-direction: column; padding-top: 35px; }
  .activity-field > .activity-scene { flex: none; width: 100%; }
  .activity-map { flex: none; align-self: stretch; width: auto; margin: 0 16px 18px; padding: 12px 0 0; border-left: 0; border-top: 1px solid #294451; }
  .activity-map-key { margin-bottom: 9px; }
  .activity-map-grid { max-height: 156px; }
  .activity-map-detail { min-height: 38px; margin-top: 9px; }
  .activity-scene-empty { inset: 65px 16px 280px; background: #0b151ee8; }
  .activity-panel.is-expanded .activity-scene { height: 350px; }
}
@media (prefers-reduced-motion: reduce) {
  .scene-node-content { animation: none; }
}

.activity-panel[data-paused=true] .scene-node-content { animation: none; }

/* Private worker-origin route: a horizontal hop rail shares the existing signal scene. */
.activity-route { padding: 16px 24px; border-top: 1px solid #294451; background: #101f2a; }
.activity-route-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; }
.activity-route-context { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; min-width: 0; }
.activity-route-context strong { color: #c7dce5; font-size: 12px; font-weight: 550; }
.activity-route-context span { color: #91b7c6; font-size: 12px; overflow-wrap: anywhere; }
.activity-route-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.activity-route .activity-control { min-height: 34px; font-size: 11px; }
.activity-panel .activity-route button:disabled { cursor: default; opacity: .45; }
.activity-route-state { margin: 10px 0 4px; color: #a8c7d1; font-size: 12px; line-height: 1.6; }
.activity-route-note { margin: 0; max-width: 85ch; color: #8ba6b4; font-size: 11px; line-height: 1.7; }
.activity-route-details { margin-top: 12px; border-top: 1px solid #294451; padding-top: 10px; color: #a8c0cd; font-size: 12px; }
.activity-route-details summary { cursor: pointer; line-height: 1.8; }
.activity-route-details summary span { margin-inline-start: 10px; color: #8ba6b4; font-size: 11px; }
.activity-route-details ol { margin: 12px 0 0; padding-inline-start: 30px; max-height: 300px; overflow: auto; scrollbar-width: thin; }
.activity-route-details li { padding: 5px 8px; line-height: 1.7; overflow-wrap: anywhere; border-top: 1px solid #263c493d; font-variant-numeric: tabular-nums; }
.activity-route-details li::marker { color: #7297a7; }
.activity-route-details code { padding: 0; background: transparent; color: #d4e8ef; font-size: 12px; }
.activity-field > [data-scene-scroll] { flex: 1 1 0; width: 0; min-width: 0; }
[data-scene-scroll] { overflow-x: hidden; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: #416474 #0b151e; overscroll-behavior-inline: contain; }
[data-scene-scroll] > .activity-scene { width: 100%; }
.activity-panel[data-route-active=true] [data-scene-scroll] { align-self: stretch; }
.activity-panel[data-route-active=true] [data-scene-scroll] > .activity-scene { min-height: 350px; max-width: 100%; }
.activity-panel[data-route-active=true] .scene-node-name { font-size: 14px; }
.activity-panel[data-route-active=true] .scene-node-meta { font-size: 11px; }
.activity-panel[data-route-active=true] .scene-node-status { font-size: 10px; }
.activity-panel[data-route-active=true] .scene-hub-label { font-size: 19px; }
.activity-panel[data-route-active=true] .scene-hub-caption { font-size: 11px; display: block; }
.scene-route-hop { --route-ink: #7194a5; }
.scene-route-paddle { fill: var(--route-ink); }
.scene-route-ttl { fill: #86a8b7; font-size: 12px; font-variant-numeric: tabular-nums; }
.scene-route-ip { fill: #d4e8ef; font-size: 13px; font-family: ui-monospace, 'Cascadia Code', 'Liberation Mono', monospace; }
.scene-route-ptr { fill: #89a9b9; font-size: 11px; }
.scene-route-rtt { fill: #9abac9; font-size: 11px; font-variant-numeric: tabular-nums; }
.scene-route-hop.is-traversed { --route-ink: #00cfb0; }
.scene-route-hop.is-current .scene-route-paddle { filter: drop-shadow(0 0 5px #00cfb077); }
.scene-route-hop.is-silent { --route-ink: #68808e; }
.scene-route-hop.is-silent .scene-route-paddle { fill: transparent; stroke: var(--route-ink); stroke-width: 1.5; stroke-dasharray: 3 3; }
.scene-route-hop.is-silent .scene-route-ip { fill: #91a8b4; }
.scene-route-hop.is-silent.is-current .scene-route-paddle { filter: none; }
@media (max-width: 600px) {
  .activity-route { padding: 14px 16px; }
  .activity-route-heading { align-items: flex-start; }
  .activity-route-actions { width: 100%; }
  .activity-route .activity-control { min-height: 44px; padding: 9px; }
  .activity-route-details summary span { display: block; margin-inline-start: 15px; }
  .activity-field > [data-scene-scroll] { flex: none; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .scene-route-hop.is-current .scene-route-paddle { filter: none; }
}

.activity-panel[data-route-active=true][data-scene-layout=compact] .scene-node-name { font-size: 22px; }
.activity-panel[data-route-active=true][data-scene-layout=compact] .scene-node-meta { font-size: 18px; }
.activity-panel[data-route-active=true][data-scene-layout=compact] .scene-node-status { font-size: 16px; }
.activity-panel[data-route-active=true][data-scene-layout=compact] .scene-route-ttl { font-size: 16px; }

.activity-canvas { position: relative; }
.activity-hop-detail { position: absolute; top: 12px; left: 18px; right: 18px; z-index: 1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 3px 16px; align-items: center; padding: 10px 14px; border: 1px solid #2a4857; border-radius: 6px; background: #10212beb; color: #d4e8ef; font-size: 12px; line-height: 1.5; pointer-events: none; }
.activity-hop-index { grid-column: 1; grid-row: 1 / 3; color: #91b6c5; }
.activity-hop-ip { grid-column: 2; grid-row: 1; padding: 0; background: none; color: #e2f2f7; font-size: 12px; overflow-wrap: anywhere; }
.activity-hop-hostname { grid-column: 2; grid-row: 2; color: #93b4c2; overflow-wrap: anywhere; }
.activity-hop-rtt { grid-column: 3; grid-row: 1 / 3; color: #64d8bd; font-variant-numeric: tabular-nums; }
.scene-route-hop { cursor: pointer; }
.activity-panel .route-hop-choice { display: block; width: 100%; min-height: 44px; padding: 4px 0; border: 0; border-radius: 3px; background: transparent; box-shadow: none; color: inherit; font: inherit; text-align: start; overflow-wrap: anywhere; }
.activity-panel .route-hop-choice:hover, .activity-panel .route-hop-choice:focus-visible { color: #e2f2f7; background: #19333f; }
.activity-panel[data-route-active=true][data-scene-layout=compact] .activity-canvas { padding-top: 120px; }
.activity-panel[data-scene-layout=compact] .activity-hop-detail { left: 12px; right: 12px; gap: 3px 8px; padding: 8px 10px; font-size: 11px; }
.activity-panel[data-scene-layout=compact] .activity-hop-ip { font-size: 11px; }

.activity-hop-hostname { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.scene-route-hop:hover .scene-route-paddle { stroke: #a6e4db; stroke-width: 2; }

.scene-route-hit { fill: transparent; pointer-events: all; }
[data-scene-pulses], [data-scene-links] { pointer-events: none; }

/* A shared stage keeps the event stream beside the probe map, including fullscreen. */
.activity-stage > .activity-console {
  position: absolute; z-index: 2; inset: 55px auto 48px 0;
  width: 34%; display: flex; flex-direction: column; min-height: 0;
  border: 0; background: linear-gradient(90deg, #0b151ef5 82%, #0b151e00);
  padding: 0 24px;
}
.activity-stage > .activity-console .activity-console-heading {
  flex-wrap: wrap; gap: 6px 12px; padding: 0 0 14px; border: 0;
}
.activity-stage > .activity-console .activity-console-heading h3 {
  color: #c7dce5; font: 600 14px/1.5 system-ui, sans-serif;
}
.activity-stage > .activity-console .activity-console-follow { padding: 0; }
.activity-stage > .activity-console .activity-console-scroll {
  flex: 1; height: auto; min-height: 0; padding: 0 8px 0 0;
  background: transparent; mask-image: linear-gradient(transparent, #000 18px);
}
.activity-console li {
  display: grid; grid-template-columns: 55px minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, .8fr) 54px;
  align-items: baseline; gap: 8px; min-height: 34px; padding: 7px 0;
  border-bottom: 1px solid #29445180; white-space: normal;
  font: 11px/1.6 system-ui, sans-serif;
}
.activity-console .console-check { color: #a5bfcc; }
.activity-console .console-domain { font-weight: 550; color: #d3e4ec; }
.activity-console .console-status { display: none; }
.activity-console .console-result { font-size: 11px; }
.activity-console .console-duration { color: #8da8b7; white-space: nowrap; text-align: right; }
.activity-console time, .console-duration { font: 11px/1.6 ui-monospace, monospace; }
.activity-console li:nth-last-child(n+7) { opacity: .65; }
.activity-console li:hover, .activity-console li:focus-within { opacity: 1; }
.activity-stage .activity-field { margin-left: 34%; min-height: 510px; }
.activity-stage .activity-map { flex-basis: 126px; padding-left: 12px; }
.activity-stage .activity-scene { min-height: 460px; height: 510px; }
.activity-stage-topline > span:first-child { margin-left: 34%; }
.activity-stage .activity-scene-empty { left: 40%; }
.activity-panel.is-expanded .activity-stage { min-height: 0; }
.activity-panel.is-expanded .activity-field { flex: 1; min-height: 0; width: 66%; }
.activity-panel.is-expanded .activity-canvas { align-self: stretch; display: flex; align-items: center; }
.activity-panel.is-expanded .activity-scene { height: 100%; min-height: 350px; }
.activity-panel.is-expanded .activity-stage > .activity-console .activity-console-scroll { height: auto; }
@media (min-width: 1400px) {
  .activity-stage .activity-map { flex-basis: 150px; }
  .activity-stage > .activity-console { padding-left: 30px; padding-right: 30px; }
}
@media (max-width: 900px) {
  .activity-stage > .activity-console { position: relative; inset: auto; width: 100%; height: 310px; padding: 20px 24px 0; }
  .activity-stage .activity-field { margin-left: 0; }
  .activity-stage-topline { display: none; }
  .activity-stage .activity-scene-empty { top: 360px; left: 24px; }
  .activity-panel.is-expanded .activity-stage { flex: none; min-height: 760px; }
  .activity-panel.is-expanded .activity-field { flex: none; width: 100%; }
}
@media (max-width: 600px) {
  .activity-stage > .activity-console { padding-inline: 16px; }
  .activity-console ol { min-width: 620px; }
  .activity-stage .activity-map { flex-basis: auto; }
  .activity-stage .activity-field { min-height: 0; }
}

.activity-panel[data-scene-layout=wide]:not([data-route-active=true]) .scene-node-name { font-size: 18px; }
.activity-panel[data-scene-layout=wide]:not([data-route-active=true]) .scene-node-meta { font-size: 14px; }
.activity-panel[data-scene-layout=wide]:not([data-route-active=true]) .scene-node-status { font-size: 13px; }
.activity-panel[data-scene-layout=wide]:not([data-route-active=true]) .scene-hub-caption { font-size: 15px; }

/* Critical outcomes stand out without making old successful events blink. */
.activity-console li[data-level=crit] {
  background: #601e2c80; border-left: 3px solid #ff7287;
  border-bottom-color: #a94b5e80; padding-inline: 10px; opacity: 1;
}
.activity-console li[data-level=crit] .console-check,
.activity-console li[data-level=crit] .console-domain { color: #ffe2e7; }
.activity-console li[data-level=crit] .console-result { color: #ff9bad; font-weight: 650; }
.scene-node[data-level=crit] .scene-node-body { fill: #421f2c; stroke: #ff7287; }
.scene-node[data-level=crit].is-active .scene-node-body {
  animation: activity-critical 1.6s ease-in-out infinite;
}
@keyframes activity-critical {
  50% { fill: #743044; stroke: #ffb3c1; }
}
.activity-panel[data-paused=true] .scene-node[data-level=crit] .scene-node-body { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .scene-node[data-level=crit].is-active .scene-node-body { animation: none; }
}


.activity-console li > :is(.console-check, .console-domain, .console-result, .console-duration) {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Active problems belong to the room, not to its temporary animated journeys. */
.activity-critical {
  position: absolute; z-index: 4; right: 20px; bottom: 48px;
  width: min(320px, calc(100% - 40px)); color: #f4e2e7;
  background: rgb(18 16 27 / 88%); border: 1px solid #df456a99; border-radius: 5px;
  box-shadow: 0 12px 32px #0006, 0 0 24px #fa254b12, inset 0 1px 0 #ffb0c51a;
  overflow: hidden; isolation: isolate;
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
}
.activity-critical[hidden], .activity-critical [hidden] { display: none; }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .activity-critical { background: rgb(18 16 27 / 66%); }
}
.activity-critical::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background:
    linear-gradient(#ff91ac, #ff91ac) left top / 22px 2px no-repeat,
    linear-gradient(#ff91ac, #ff91ac) left top / 2px 16px no-repeat,
    linear-gradient(#ff91ac, #ff91ac) right bottom / 22px 2px no-repeat,
    linear-gradient(#ff91ac, #ff91ac) right bottom / 2px 16px no-repeat,
    repeating-linear-gradient(0deg, transparent 0 3px, #ffabc405 3px 4px);
}
.activity-critical::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  border: 1px solid #ff668b; border-radius: inherit; z-index: -1;
  background: linear-gradient(135deg, #f62b542b, transparent 70%);
  animation: critical-panel-pulse 4.8s ease-in-out infinite;
}
.activity-critical-heading { display: flex; align-items: center; gap: 9px; padding: 13px 15px 10px; }
.activity-critical-heading h3 { margin: 0; font: 650 14px/1.4 system-ui, sans-serif; text-shadow: 0 0 14px #ff46633b; }
.activity-critical-beacon {
  display: grid; place-items: center; flex: 0 0 22px; height: 22px;
  border-radius: 4px; background: #bd2549; color: #fff; font-weight: 800;
  animation: critical-beacon-pulse 4.8s ease-in-out infinite;
}
.activity-critical-count {
  margin-left: auto; min-width: 24px; padding: 2px 6px; border-radius: 6px;
  text-align: center; background: #642438; color: #ffdbe3; font: 700 12px/1.5 system-ui;
}
.activity-critical-list {
  list-style: none; padding: 0 15px; margin: 0; max-height: min(210px, 30vh);
  overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #a54b61 #211923;
}
.activity-critical-domain { padding: 10px 0; border-top: 1px solid #69404d; }
.activity-critical-domain summary { cursor: pointer; color: #fff0f4; font: 600 13px/1.5 system-ui; }
.activity-critical-name { overflow-wrap: anywhere; }
.activity-critical-domain-count { margin-left: 8px; color: #e6aab9; font-size: 11px; }
.activity-critical-checks { list-style: none; margin: 8px 0 0; padding: 0; }
.activity-critical-checks li { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 12px; margin-top: 8px; }
.activity-critical-link { color: #edc8d2; font: 12px/1.5 system-ui; overflow-wrap: anywhere; text-decoration: none; }
.activity-critical-link:hover { color: white; text-decoration: underline; }
.activity-critical-age { color: #d3a5b2; white-space: nowrap; font: 11px/1.7 system-ui; }
.activity-critical-state { grid-column: 1/-1; color: #c2a5af; font: 11px/1.5 system-ui; }
.activity-critical-connection { margin: 0; padding: 0 15px 10px; color: #ffcf9c; font: 12px/1.5 system-ui; }
.activity-critical :is(summary, a):focus-visible { outline: 2px solid #ffadbf; outline-offset: 3px; border-radius: 2px; }
@keyframes critical-panel-pulse {
  0%,100% { opacity: .18; box-shadow: inset 0 0 16px #ff315414; }
  50% { opacity: .95; box-shadow: inset 0 0 28px #ff31543d; }
}
@keyframes critical-beacon-pulse {
  0%,100% { box-shadow: 0 0 0 1px #ff749933, 0 0 5px #ff315422; }
  50% { box-shadow: 0 0 0 1px #ff749999, 0 0 16px #ff31548c; }
}
@media (max-width: 900px) {
  .activity-critical { position: sticky; bottom: 12px; right: auto; margin: 0 16px 14px auto; width: min(320px, calc(100% - 32px)); }
  .activity-critical-list { max-height: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  .activity-critical::after { animation: none; opacity: .65; }
  .activity-critical-beacon { animation: none; }
}
@media (min-width: 901px) {
  .activity-panel[data-has-critical=true] .activity-map { flex-basis: 320px; align-self: flex-start; margin-top: 0; padding-top: 0; }
  .activity-panel[data-has-critical=true] .activity-map-grid { max-height: 72px; }
  .activity-panel[data-has-critical=true] .activity-map-detail { min-height: 0; max-height: 34px; overflow: auto; margin-top: 8px; line-height: 1.5; }
}

/* Shared glass instruments; only unresolved incidents keep a red alarm pulse. */
:is(.activity-panel.signal-frame, .activity-panel .signal-frame, .activity-panel .activity-hop-detail) {
  isolation: isolate; border: 1px solid #53bda45c; border-radius: 5px;
  background: rgb(12 26 35 / 88%); box-shadow: 0 8px 24px #0003, inset 0 1px 0 #b0ffef0d;
  backdrop-filter: blur(12px) saturate(115%);
  -webkit-backdrop-filter: blur(12px) saturate(115%);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :is(.activity-panel.signal-frame, .activity-panel .signal-frame, .activity-panel .activity-hop-detail) { background: rgb(12 26 35 / 66%); }
}
:is(.activity-panel.signal-frame, .activity-panel .signal-frame, .activity-panel .activity-hop-detail)::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background:
    linear-gradient(#64e7caad, #64e7caad) left top / 22px 2px no-repeat,
    linear-gradient(#64e7caad, #64e7caad) left top / 2px 16px no-repeat,
    linear-gradient(#64e7caad, #64e7caad) right bottom / 22px 2px no-repeat,
    linear-gradient(#64e7caad, #64e7caad) right bottom / 2px 16px no-repeat,
    repeating-linear-gradient(0deg, transparent 0 3px, #b2ffe803 3px 4px);
}
.activity-panel.signal-frame, .activity-map.signal-frame,
.activity-route.signal-frame, .activity-telemetry.signal-frame { position: relative; }
.activity-stage > .activity-console.signal-frame {
  inset: 56px auto 48px 16px; width: calc(34% - 32px); padding: 14px 16px;
}
.activity-stage .activity-map.signal-frame { padding: 10px 12px; }
.activity-panel .activity-route.signal-frame { margin: 12px 16px 18px; padding: 14px 16px; }
.activity-panel .activity-telemetry.signal-frame { margin: 12px 16px 8px; padding: 12px 16px; }
.activity-panel .activity-hop-detail { border-color: #64e7caad; }
.activity-panel :is(.signal-frame, .activity-hop-detail, .activity-critical) {
  transform-origin: top left;
  animation: signal-frame-reveal .64s cubic-bezier(.16,1,.3,1) both;
}
.activity-panel .activity-console.signal-frame { animation-delay: 40ms; }
.activity-panel .activity-map.signal-frame { animation-delay: 100ms; }
.activity-panel .activity-critical { animation-delay: 120ms; }
.activity-panel .activity-telemetry.signal-frame { animation-delay: 160ms; }
.activity-panel .activity-route.signal-frame { animation-delay: 200ms; }
.activity-panel .activity-hop-detail { animation-delay: 0ms; }
@keyframes signal-frame-reveal {
  from { opacity: .12; transform: translateY(8px) scale(.985); clip-path: inset(0 0 85% 0 round 5px); }
  to { opacity: 1; transform: none; clip-path: inset(-24px round 5px); }
}
@media (max-width: 900px) {
  .activity-stage > .activity-console.signal-frame { inset: auto; margin: 16px 16px 0; width: calc(100% - 32px); padding: 14px 16px; }
  .activity-stage .activity-map.signal-frame { margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .activity-panel :is(.signal-frame, .activity-hop-detail, .activity-critical) { animation: none; }
}

/* Opt-in long-view presentation. Motion reduces static exposure, not an OLED guarantee. */
.activity-panel[data-tv=true] { padding: 8px; background: #0b151e; }
.activity-panel[data-tv=true]::before { background: none; }
.activity-panel[data-tv=true] > * { animation: activity-tv-drift 173s ease-in-out infinite; animation-play-state: paused; }
.activity-panel[data-tv=true] .activity-stage {
  --tv-grid-step: 36px;
  background-size: auto, var(--tv-grid-step) var(--tv-grid-step), var(--tv-grid-step) var(--tv-grid-step);
  animation: activity-tv-drift 173s ease-in-out infinite, activity-tv-grid 240s linear infinite;
  animation-play-state: paused;
}
.activity-panel[data-tv=true] .activity-stage::after {
  animation: activity-tv-stripes 67s linear infinite;
  animation-play-state: paused;
}
.activity-panel[data-tv=true][data-tv-motion=true] > *,
.activity-panel[data-tv=true][data-tv-motion=true] .activity-stage::after { animation-play-state: running; }
.activity-panel[data-tv=true] .activity-scene { transition: opacity 1s ease; }
.activity-panel[data-tv=true][data-tv-motion=true][data-tv-changing=true] .activity-scene { opacity: 0; }
.activity-panel[data-tv-reversed=true] .scene-hub-paddle { transform: translateX(-185px); }
.activity-panel[data-tv=true] :is(.scene-hub-ring, .scene-hub-body, .scene-node-body) { fill: none; }
.activity-panel[data-tv=true] .scene-hub-detail { stroke-width: 2; }
.activity-panel[data-tv=true] .scene-hub-paddle { filter: none; }
.activity-panel[data-tv=true] .activity-map-dot.is-open::before { box-shadow: none; }
.activity-panel[data-tv=true] :is(.scene-hub-wash, .scene-hub-orbit, .scene-hub-calibration,
  .scene-hub-arc, .scene-link, .scene-hub-detail, .scene-hub-vents, .scene-node-body) { transition: opacity 3s ease; }
.activity-panel[data-tv=true][data-tv-quiet=true] :is(.scene-hub-wash, .scene-hub-orbit,
  .scene-hub-calibration, .scene-hub-arc, .scene-link, .scene-hub-detail, .scene-hub-vents,
  .scene-node-body) { opacity: .35; }
@keyframes activity-tv-drift {
  0%, 100% { transform: translate(-4px, -3px); }
  25% { transform: translate(4px, -2px); }
  50% { transform: translate(3px, 4px); }
  75% { transform: translate(-3px, 3px); }
}
@keyframes activity-tv-grid {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 0 0, var(--tv-grid-step) var(--tv-grid-step), var(--tv-grid-step) var(--tv-grid-step); }
}
@keyframes activity-tv-stripes {
  0%, 100% { background-position: 0 0; opacity: .06; }
  50% { opacity: .12; }
  100% { background-position: 0 4px; }
}
@media (max-width: 600px) {
  .activity-panel[data-tv=true] .activity-stage { --tv-grid-step: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .activity-panel[data-tv=true] > * { transform: none; }
  .activity-panel[data-tv=true] .activity-scene { opacity: 1; }
}
