/* «AI-ը աշխատանքում» — multi-agent simulation player. Dark «screen» in both themes. */
.as { border: 1px solid var(--y-25); border-radius: 22px; padding: 16px; color: #fff;
  background: radial-gradient(900px 400px at 30% 0%, #ffd00012, #0000 60%), radial-gradient(700px 400px at 100% 100%, #8ab4ff10, #0000 60%), #06070b; }
.as-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.as-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.as-tab { padding: 8px 14px; border-radius: 999px; font-size: 12.5px; color: var(--w75); border: 1px solid var(--line2); background: #ffffff08; transition: all .2s; }
.as-tab:hover { color: #fff; border-color: var(--y-35); }
.as-tab.on { color: #000; background: var(--y); border-color: var(--y); box-shadow: 0 0 20px #ffd00066; }
.as-ctl { display: flex; gap: 6px; }
.as-tab.as-live { color: #7bd88f; border-color: #7bd88f66; background: #7bd88f12; animation: as-livepulse 2s ease-in-out infinite; }
.as-tab.as-live.on { color: #000; background: #7bd88f; border-color: #7bd88f; box-shadow: 0 0 22px #7bd88f77; animation: none; }
@keyframes as-livepulse { 50% { box-shadow: 0 0 18px #7bd88f55; } }
.as-ask { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 0 0 12px; }
.as-ask[hidden] { display: none; }
.as-in { min-width: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid #7bd88f66; background: #0b0d12; color: #fff; font-size: 14px; outline: none; }
.as-in:focus { border-color: #7bd88f; box-shadow: 0 0 0 3px #7bd88f22; }
.as-go { padding: 0 18px; border-radius: 12px; background: #7bd88f; color: #000; font-weight: 600; font-size: 13px; }
.as-go:disabled { opacity: .7; }
.as-ex { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.as-exb { font-size: 11.5px; padding: 5px 10px; border-radius: 999px; border: 1px dashed var(--line2); color: var(--w75); background: #ffffff06; }
.as-exb:hover { border-color: #7bd88f88; color: #fff; }
.as-btn { min-width: 36px; height: 34px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line2); background: #ffffff0a; color: #fff; font-size: 13px; }
.as-btn:hover { border-color: var(--y-35); color: var(--y); }
.as-lead { margin: 12px 2px 12px; font-size: 13px; color: var(--w75); min-height: 18px; }
.as-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); grid-template-areas: "stage side" "chat chat"; gap: 12px; }
@media (max-width: 1100px) { .as-grid { grid-template-columns: 1fr; grid-template-areas: "stage" "side" "chat"; } }
.as-stage { grid-area: stage; position: relative; border-radius: 16px; border: 1px solid var(--line); overflow: hidden;
  background: radial-gradient(ellipse at 50% 50%, #12100a, #05060a 70%); }
.as-svg { display: block; width: 100%; height: auto; }

/* edges + packets */
.as-edge { fill: none; stroke: #ffffff1c; stroke-width: 1.4; stroke-dasharray: 3 5; transition: stroke .3s; }
.as-edge.act { stroke: #ffd00099; stroke-width: 2; stroke-dasharray: none; filter: url(#as-glow); }
.as-trail { fill: none; stroke: #ffe680; stroke-width: 2.6; stroke-linecap: round; filter: url(#as-glow); opacity: .9; }
.as-pkt circle { fill: #fff3b0; filter: url(#as-glow); }
.as-pkt rect { fill: #ffd000; filter: url(#as-glow); }
.as-pkt text { font: 700 11px var(--mono); fill: #000; text-anchor: middle; }
.as-pkt.k-check rect { fill: #7bd88f; } .as-pkt.k-block rect { fill: #ff6b5a; } .as-pkt.k-ok circle { fill: #7bd88f; }

/* nodes */
.as-node { transition: opacity .3s; }
.as-node .as-core { fill: #0d1016; stroke: #ffd00099; stroke-width: 1.6; transition: all .3s; }
.as-node .as-halo { fill: #ffd000; opacity: 0; transition: opacity .3s; filter: url(#as-glow); }
.as-node .as-t { font: 500 13px var(--sans); fill: #fff; text-anchor: middle; }
.as-node .as-s { font: 10.5px var(--sans); fill: #ffffff80; text-anchor: middle; }
.as-node .as-glyph { font: 600 18px var(--sans); fill: var(--y); text-anchor: middle; }
.as-node .as-badge { font: 600 8.5px var(--mono); letter-spacing: .08em; text-anchor: middle; }
.as-st-live .as-badge { fill: #7bd88f; } .as-st-part .as-badge { fill: #ffd000; } .as-st-next .as-badge { fill: #8ab4ff; }
.as-st-next .as-core { stroke: #8ab4ff66; stroke-dasharray: 4 3; } .as-st-next .as-glyph { fill: #8ab4ff; }
.as-agent .as-core { stroke: #5fd4c4aa; } .as-agent .as-glyph { fill: #5fd4c4; font-size: 14px; }
.as-human .as-core { stroke: #8ab4ffcc; } .as-human .as-glyph { fill: #8ab4ff; }
.as-guard .as-core { stroke: #7bd88fcc; } .as-guard .as-glyph { fill: #7bd88f; }
.as-orch .as-core { fill: #2a2104; stroke: var(--y); stroke-width: 2.2; }
.as-node.act .as-halo { opacity: .28; }
.as-node.act .as-core { stroke-width: 3; }
.as-node.think .as-halo { animation: as-think .6s ease-in-out infinite; }
@keyframes as-think { 50% { opacity: .55; } }
.as-node.alarm .as-core { stroke: #ff6b5a; fill: #2a0b08; } .as-node.alarm .as-halo { fill: #ff6b5a; opacity: .45; animation: as-think .4s infinite; }
.as-orch .as-halo { animation: as-breathe 3s ease-in-out infinite; }
@keyframes as-breathe { 50% { opacity: .18; } }
.as-legend { display: flex; flex-wrap: wrap; gap: 12px; padding: 8px 12px 10px; border-top: 1px solid var(--line); font-size: 11px; color: var(--w55); }
/* agent «brain»: dashed ring + orbiting knowledge dots (norms / rules / experience) */
.as-ring { fill: none; stroke: #5fd4c455; stroke-width: 1.2; stroke-dasharray: 2 4; }
.as-orbit { animation: as-orbit 14s linear infinite; }
.as-node:nth-of-type(even) .as-orbit { animation-duration: 19s; animation-direction: reverse; }
@keyframes as-orbit { to { transform: rotate(360deg); } }
.as-kd { filter: url(#as-glow); }
.as-kd-0 { fill: #ff9a3c; } .as-kd-1 { fill: #ffd000; } .as-kd-2 { fill: #7bd88f; }
.as-st-next .as-kd { opacity: .35; } .as-st-next .as-ring { stroke: #8ab4ff40; }
.as-agent .as-t { font-size: 14px; font-weight: 600; }
.as-agent.act .as-ring { stroke: #5fd4c4; stroke-dasharray: none; }
.as-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.as-legend i.live { background: #7bd88f; } .as-legend i.part { background: #ffd000; } .as-legend i.next { background: #8ab4ff; }
.as-demo { margin-left: auto; color: var(--w40); }

/* side panels */
.as-side { grid-area: side; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.as-panel { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #0b0d12d9; min-width: 0; }
.as-k { margin: 0 0 6px; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--y); }
.as-it { display: block; font-size: 15px; font-weight: 500; }
.as-id { margin: 4px 0 0; font-size: 12.5px; color: var(--w75); line-height: 1.6; min-height: 40px; }
.as-json { margin: 8px 0 0; max-height: 170px; overflow: auto; padding: 10px; border-radius: 10px; background: #000; border: 1px solid #ffd00033;
  font: 11px/1.5 var(--mono); color: #ffe680; white-space: pre-wrap; word-break: break-word; }
.as-json:empty { display: none; }
.as-json.block { color: #ffb3a8; border-color: #ff6b5a66; }
.as-bh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.as-bh b { font-size: 15px; font-weight: 500; color: #5fd4c4; } .as-bh span { font-size: 11px; color: var(--w55); }
.as-load { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.as-load span { font-size: 11px; padding: 3px 8px; border-radius: 999px; border: 1px solid #5fd4c455; background: #5fd4c414; color: #d6fff9;
  animation: as-in .5s both; animation-delay: var(--d); }
@keyframes as-in { from { opacity: 0; transform: translateY(6px) scale(.95); } }
.as-know { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--w75); }
.as-know li { display: flex; align-items: center; gap: 6px; } .as-know span { margin-left: auto; color: var(--w45); }
.as-know i { width: 7px; height: 7px; border-radius: 50%; } .k-ok i { background: #7bd88f; } .k-warn i { background: #ffd000; } .k-missing i { background: #ff6b5a99; }
.as-m { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; font-size: 12px; color: var(--w75); margin-top: 6px; }
.as-m.small b { font-size: 10.5px; color: var(--w55); font-weight: 400; }
.as-m b { font-weight: 500; color: #fff; }
.as-mbar { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: #ffffff10; overflow: hidden; }
.as-mbar i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #7bd88f, #ffd000); transition: width .5s; }
.as-mbar i.hot { background: linear-gradient(90deg, #ffd000, #ff6b5a); box-shadow: 0 0 14px #ff6b5a; }
.as-m:first-of-type { grid-template-columns: 1fr auto; }
.as-chk.ok { color: #7bd88f; } .as-chk.block { color: #ff6b5a; }

/* shared chat */
.as-chat { grid-area: chat; }
.as-msgs { display: flex; flex-direction: column; gap: 8px; max-height: 250px; min-height: 120px; overflow: auto; padding-right: 4px; }
.as-msg { max-width: 78%; padding: 9px 12px; border-radius: 14px; border: 1px solid var(--line2); background: #ffffff08; animation: as-in .4s both; }
.as-msg b { display: flex; gap: 8px; align-items: baseline; font-size: 11.5px; font-weight: 500; color: #5fd4c4; }
.as-msg b em { font-style: normal; font-size: 10px; color: #8ab4ff; }
.as-msg p { margin: 3px 0 0; font-size: 13px; line-height: 1.55; color: #fff; }
.as-w-user { align-self: flex-end; background: #ffd00014; border-color: #ffd00044; } .as-w-user b { color: var(--y); }
.as-w-human { background: #8ab4ff14; border-color: #8ab4ff44; } .as-w-human b { color: #8ab4ff; }
.as-at { color: var(--y); font-weight: 500; }
.as-mj { margin: 6px 0 0; padding: 6px 8px; border-radius: 8px; background: #000; font: 10.5px/1.45 var(--mono); color: #ffe680; white-space: pre-wrap; }
@media (prefers-reduced-motion: reduce) { .as-node .as-halo, .as-load span, .as-msg { animation: none !important; } }
