:root{--lilac:#a99be6;--lilac-l:#e6e1fa;--silver:#c9d1dc;--silver-d:#9aa6b6;--slate:#8a94a6}
body{background:#f2f4f9}
.stars-bg{position:absolute;inset:0;pointer-events:none;overflow:hidden;border-radius:inherit;z-index:0}
.stars-bg i{position:absolute;border-radius:50%;background:#fff}
.stars-bg i.pb{background:#c7d4f0}
.stars-bg i.tw{animation:tw var(--d,4s) ease-in-out infinite;animation-delay:var(--dl,0s)}
.stars-bg.faint i{background:#b9c4dc}
@keyframes tw{0%,100%{opacity:var(--o,.8)}50%{opacity:.1}}

/* top bar */
.gx-top{position:relative;overflow:hidden;color:#fff;background:radial-gradient(ellipse 40% 120% at 85% 0%,rgb(98 84 180 / .45),transparent 70%),linear-gradient(120deg,#16223a,#22345a 60%,#38527c)}
.gx-top-in{position:relative;z-index:1;display:flex;align-items:center;gap:18px;padding-top:14px;padding-bottom:14px;flex-wrap:wrap}
.gx-brand{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none;font-weight:600;font-size:17px;line-height:1.1}
.gx-brand small{display:block;font-weight:400;font-size:11.5px;opacity:.75}
.gx-orb{width:30px;height:30px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff,#c7d4f0 30%,#5675a6 70%,#22345a);box-shadow:0 0 14px rgb(169 155 230 / .7)}
.gx-tabs{display:flex;gap:4px;margin-left:auto;background:rgb(255 255 255 / .08);padding:4px;border-radius:12px}
.gx-tabs a{color:#dfe7f3;text-decoration:none;font-size:14px;font-weight:500;padding:7px 14px;border-radius:9px}
.gx-tabs a.on{background:#fff;color:#38527c}
.gx-user{font-size:13px;opacity:.85}
.gx-head{display:flex;justify-content:space-between;align-items:flex-end;gap:14px;flex-wrap:wrap;margin:24px 0 16px}
.gx-head h2{margin:0}
.ex{color:#6a5bc4;font-weight:600}
.site-switch{display:flex;gap:4px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:4px}
.site-switch button{border:0;background:none;font:inherit;font-size:14px;padding:6px 14px;border-radius:9px;color:var(--muted);cursor:pointer}
.site-switch button.on{background:#38527c;color:#fff}
.gx-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px;align-items:start}
.gx-main{display:grid;gap:18px;min-width:0}
.gx-side{display:grid;gap:18px;position:sticky;top:12px}
.grid.kpis{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:0}
.kpi{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px 16px}
.kpi span{font-size:12.5px;color:var(--muted)} .kpi b{display:block;font-size:22px;color:#38527c;line-height:1.2}
.kpi.warn b{color:#c46f0e}
.kpi .spark{display:block;width:100%;height:26px;margin-top:6px}
.legend .lg-off{background:var(--slate)}
.pill.lilac{background:var(--lilac-l);color:#5747b0}

/* topology */
.topo-stage{position:relative;border-radius:14px;background:radial-gradient(ellipse 60% 80% at 50% 0%,#eef1fa,#f8f9fd 70%);border:1px solid #e3e8f2;overflow:hidden}
.topo2{position:relative;z-index:1;display:block;width:100%;height:auto;font-family:inherit}
.topo2 .track{fill:none;stroke:#dde4f0;stroke-width:8;stroke-linecap:round}
.topo2 .track.off{stroke:#d5d9e1;stroke-width:3;stroke-dasharray:4 6}
.topo2 .ant{fill:none;stroke-width:3;stroke-dasharray:6 10;stroke-linecap:round;animation:ant linear infinite}
.topo2 .slug{fill:none;stroke-width:7;stroke-linecap:round;stroke-dasharray:2 98;animation:slug linear infinite}
.topo2 .c-ok{stroke:#38527c} .topo2 .slug.c-ok{stroke:#a99be6}
.topo2 .c-warn{stroke:#e8891c} .topo2 .slug.c-warn{stroke:#f6b25e}
.topo2 g.glow{animation:glow 2s ease-in-out infinite}
@keyframes ant{to{stroke-dashoffset:-16}} @keyframes slug{to{stroke-dashoffset:-100}}
@keyframes glow{0%,100%{filter:drop-shadow(0 0 1px #e8891c)}50%{filter:drop-shadow(0 0 6px #e8891c)}}
.topo2 .lbl{font-size:13px;font-weight:600;fill:#1f2a3d}
.topo2 .sub{font-size:11px;fill:#5f6b7d}
.topo2 .sub.w{fill:#b35f00;font-weight:600} .topo2 .sub.o{fill:#6b7385;font-weight:600}
.topo2 .chip rect{fill:#fff;stroke:#d7dfeb} .topo2 .chip text{font-size:11px;font-weight:600;fill:#1f2a3d}
.topo2 .chip.w rect{fill:#fde9d0;stroke:#e8891c} .topo2 .chip.w text{fill:#8a4800}
/* device bodies */
.topo2 .body{stroke:#c2cad6;stroke-width:1}
.topo2 .face{fill:#e9edf3}
.topo2 .screen{fill:#1f2a3d}
.topo2 .bar{fill:#a99be6;animation:barh 2.4s ease-in-out infinite;transform-box:fill-box;transform-origin:bottom}
@keyframes barh{50%{transform:scaleY(.4)}}
.topo2 .port{fill:#3a4558}
.topo2 .led{fill:#a99be6;animation:blink var(--b,1.1s) steps(2,jump-none) infinite;animation-delay:var(--bd,0s)}
.topo2 .led.idle{fill:#c3cad6;animation:none}
.topo2 .led.w{fill:#e8891c}
@keyframes blink{0%{opacity:1}50%{opacity:.15}100%{opacity:1}}
.topo2 .statusbar{fill:#a99be6}
.topo2 .dev.warn .statusbar{fill:#e8891c}
.topo2 .ring{fill:none;stroke-width:3.5;stroke:#a99be6;animation:ring 3s ease-in-out infinite}
.topo2 .dev.warn .ring{stroke:#e8891c}
.topo2 .dev.off .ring{stroke:#b9c0cc;stroke-dasharray:3 4;animation:none}
.topo2 .dev.off .disc{opacity:.7}
@keyframes ring{0%,100%{stroke-opacity:1;filter:drop-shadow(0 0 2px currentColor)}50%{stroke-opacity:.55;filter:drop-shadow(0 0 7px #a99be6)}}
.topo2 .dev.warn .ring{animation-name:ringw}
@keyframes ringw{0%,100%{stroke-opacity:1}50%{stroke-opacity:.5;filter:drop-shadow(0 0 7px #e8891c)}}
.topo2 .dev{cursor:pointer}

/* issues + inline ad */
.issues2{list-style:none;margin:0;padding:0}
.issues2>li{display:flex;gap:12px;padding:14px 0;border-bottom:1px solid var(--line)}
.issues2>li:last-child{border:0}
.issues2 .dot{flex:none;width:10px;height:10px;border-radius:50%;margin-top:7px;background:#a99be6}
.issues2 .warn .dot{background:#e8891c} .issues2 .off .dot{background:var(--slate)}
.issues2 b{display:block;font-size:14.5px} .issues2 .txt>span{font-size:13.5px;color:var(--muted)}
.ad-inline{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px;padding:9px 12px;border-radius:10px;background:#f3f1fc;border:1px dashed #c9c0f0;font-size:13px;color:#3c3470}
.ad-inline a{font-weight:600;color:#38527c;white-space:nowrap}
.ad-inline .ad-label{margin:0}
.ad-label{font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;font-weight:600;opacity:.75;margin:0 0 6px}

/* sidebar ad */
.ad-card{position:relative;overflow:hidden;border-radius:16px;padding:20px;color:#fff;background:radial-gradient(ellipse 70% 60% at 85% 10%,rgb(98 84 180 / .45),transparent 70%),linear-gradient(150deg,#1a2a44,#2c4170)}
.ad-card>*:not(.stars-bg){position:relative;z-index:1}
.ad-card h4{margin:0 0 6px;font-size:17px}
.ad-card p{font-size:13.5px;opacity:.92;margin:0 0 14px}
.ad-card .ad-label{opacity:.7}
.side-mini h4{margin:0 0 10px}
.isp{display:grid;gap:8px}
.isp div{display:flex;justify-content:space-between;font-size:14px} .isp b{font-weight:500;color:var(--muted)} .isp span{font-weight:600;color:#38527c}

/* footer strip ad */
.ad-strip{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:16px;margin:26px 0 0;padding:16px 22px;border-radius:14px;color:#fff;background:linear-gradient(110deg,#16223a,#2c4170 70%,#4a5fa0)}
.ad-strip>*:not(.stars-bg){position:relative;z-index:1}
.ad-strip p{margin:0;font-size:14px}

/* AP view */
.ap-pick{display:flex;gap:10px;overflow-x:auto;padding:2px 2px 12px;margin-bottom:6px;-webkit-overflow-scrolling:touch}
.ap-pick button{flex:none;display:flex;align-items:center;gap:10px;border:1.5px solid var(--line);background:#fff;border-radius:14px;padding:8px 14px 8px 8px;font:inherit;font-size:14px;cursor:pointer;color:var(--ink)}
.ap-pick button.on{border-color:#38527c;box-shadow:0 0 0 3px rgb(56 82 124 / .12)}
.ap-pick svg{width:34px;height:34px}
.ap-pick small{display:block;color:var(--muted);font-size:11.5px;text-align:left}
.strip{display:grid;grid-template-columns:repeat(30,minmax(0,1fr));gap:4px}
.strip button{height:46px;border:2px solid transparent;border-radius:7px;cursor:pointer;padding:0;font:inherit;font-size:11px;font-weight:600;color:#1f2a3d}
.strip .s0{background:#dfe5f1} .strip .s1{background:#cfc6f3} .strip .s2{background:#e8891c;color:#fff} .strip .s3{background:repeating-linear-gradient(135deg,#c3c9d4 0 4px,#e3e7ee 4px 8px)}
.strip button.sel{border-color:#1a2a44}
.sv0{background:#dfe5f1} .sv1{background:#cfc6f3} .sv2{background:#e8891c} .sv3{background:#b9c0cc}
.strip-axis{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);margin-top:6px}
.ap-detail{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:18px;margin-top:18px}
.tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:12px 0}
.tile{background:#f4f6fb;border-radius:12px;padding:10px 12px}
.tile span{font-size:12px;color:var(--muted)} .tile b{display:block;font-size:20px;color:#38527c}
.tile.w b{color:#c46f0e}
.chart{width:100%;height:auto;display:block}
.chart .b{fill:#b8c6e0} .chart .b.w{fill:#e8891c} .chart text{font-size:10px;fill:#7b8492}
.tl2{list-style:none;margin:8px 0 0;padding:0}
.tl2 li{display:flex;gap:10px;padding:9px 0;border-bottom:1px solid var(--line);font-size:14px}
.tl2 li:last-child{border:0}
.tl2 time{flex:none;width:92px;font-size:12.5px;font-weight:600;color:var(--muted)}
.tl2 .w time{color:#b35f00} .tl2 .o time{color:#6b7385}
.tips{list-style:none;margin:8px 0 0;padding:0}
.tips li{position:relative;padding:10px 12px 10px 38px;background:#f6f4fd;border-radius:10px;margin-bottom:8px;font-size:14px}
.tips li::before{content:"💡";position:absolute;left:12px;top:9px}
.api-note{font-size:12px;color:var(--muted);margin-top:10px}

/* ads guide */
.ads-guide{display:grid;grid-template-columns:320px minmax(0,1fr);gap:22px}
.ads-guide .wide{grid-column:1/-1}
.guide-n{font-weight:600;margin:0 0 8px}
.guide-n span{display:block;font-weight:400;font-size:13px;color:var(--muted)}
body[data-screen=ads] .ad-strip[data-ad=footer]{display:none}

@media (max-width:1000px){.gx-layout{grid-template-columns:1fr}.gx-side{position:static;grid-template-columns:1fr 1fr}.ap-detail{grid-template-columns:1fr}.ads-guide{grid-template-columns:1fr}}
@media (max-width:640px){
  .gx-tabs{order:3;margin-left:0;width:100%}.gx-tabs a{flex:1;text-align:center;padding:7px 4px;font-size:13px}.gx-user{margin-left:auto}
  .gx-side{grid-template-columns:1fr}
  .grid.kpis{grid-template-columns:1fr 1fr}
  .strip{grid-template-columns:repeat(10,minmax(0,1fr))}.strip button{height:38px}
  .tiles{grid-template-columns:1fr 1fr}
  .ad-strip{flex-direction:column;align-items:flex-start}.ad-strip .btn{width:100%;text-align:center}
  .tl2 time{width:80px}
}
@media (prefers-reduced-motion:reduce){.stars-bg i.tw,.topo2 .ant,.topo2 .slug,.topo2 g.glow,.topo2 .led,.topo2 .ring,.topo2 .bar{animation:none!important}}
.chart{height:120px}
.chart-ax{display:flex;justify-content:space-between;font-size:11px;color:#7b8492;margin-top:4px}
