/* AI Operations (Level 1.5) — professional layer over the RuntimeLens dark theme.
   Indigo/violet accent, rounded surfaces, gradient section headers. */

:root {
  --ax-indigo: #818cf8;
  --ax-violet: #a78bfa;
  --ax-card: #131926;
  --ax-card2: #0f1420;
  --ax-line: #263041;
  --ax-emerald: #34d399;
  --ax-amber: #fbbf24;
  --ax-rose: #fb7185;
  --ax-sky: #38bdf8;
  --ax-slate: #94a3b8;
}

.ax-wrap { display: grid; grid-template-columns: 288px 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .ax-wrap { grid-template-columns: 1fr; } }

/* Rail */
.ax-rail { position: sticky; top: 12px; background: var(--ax-card); border: 1px solid var(--ax-line); border-radius: 16px; padding: 14px; }
.ax-rail-head { display: flex; align-items: center; gap: 10px; }
.ax-rail-head b { font-size: 14px; display: block; }
.ax-logo { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(135deg, #4f46e5, #7c3aed); font-size: 18px; }
.ax-meter { margin: 12px 0; padding: 10px; border-radius: 12px; background: rgba(129, 140, 248, 0.1); border: 1px solid rgba(129, 140, 248, 0.3); }
.ax-meter-val { margin: 2px 0 0; font-size: 20px; font-weight: 700; color: var(--ax-indigo); }
.ax-meter-val span { font-size: 11px; color: var(--muted); font-weight: 500; }
.ax-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ax-navstep { display: flex; gap: 10px; width: 100%; text-align: left; align-items: flex-start; background: transparent; border: 1px solid transparent; border-radius: 12px; padding: 9px 10px; color: var(--text); cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.ax-navstep:hover { background: rgba(255, 255, 255, 0.04); }
.ax-navstep.active { background: rgba(129, 140, 248, 0.12); border-color: rgba(129, 140, 248, 0.4); }
.ax-navstep b { font-size: 12.5px; display: block; }
.ax-navstep .ax-sub { font-size: 11px; line-height: 1.25; display: block; }
.ax-navn { flex: 0 0 auto; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 999px; font-size: 11px; font-weight: 700; background: #263041; color: #cbd5e1; }
.ax-navstep.active .ax-navn { background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; }

/* Content */
.ax-content { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.ax-header { position: relative; overflow: hidden; border-radius: 16px; padding: 18px 20px; color: #eef; background: linear-gradient(90deg, #312e81, #4c1d95 55%, #3730a3); box-shadow: 0 4px 14px rgba(30, 27, 75, 0.35); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ax-header h3 { margin: 0; font-size: 18px; }
.ax-header p { margin: 2px 0 0; font-size: 13px; color: rgba(255, 255, 255, 0.85); max-width: 640px; }

.ax-card { background: var(--ax-card); border: 1px solid var(--ax-line); border-radius: 14px; padding: 16px; }
.ax-card.ax-nopad { padding: 0; overflow: hidden; }
.ax-card.ax-accent { background: linear-gradient(160deg, rgba(129, 140, 248, 0.08), rgba(167, 139, 250, 0.05)); border-color: rgba(129, 140, 248, 0.3); }
.ax-card.ax-danger { border-color: rgba(251, 113, 133, 0.35); background: rgba(251, 113, 133, 0.05); }
.ax-card.ax-okborder { border-color: rgba(52, 211, 153, 0.4); }

.ax-grid { display: grid; gap: 12px; }
.ax-g2 { grid-template-columns: repeat(2, 1fr); }
.ax-g3 { grid-template-columns: repeat(3, 1fr); }
.ax-g4 { grid-template-columns: repeat(4, 1fr); }
.ax-g6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 820px) { .ax-g2, .ax-g3, .ax-g4, .ax-g6 { grid-template-columns: repeat(2, 1fr); } }

.ax-tile { background: var(--ax-card2); border: 1px solid var(--ax-line); border-radius: 14px; padding: 14px; text-align: center; }
.ax-tile.ax-accent { background: linear-gradient(160deg, rgba(129, 140, 248, 0.12), rgba(167, 139, 250, 0.06)); border-color: rgba(129, 140, 248, 0.35); }
.ax-big { margin: 2px 0 0; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ax-unit { font-size: 11px; color: var(--muted); font-weight: 500; }
.ax-micro { margin: 0; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.ax-h { margin: 0 0 8px; font-size: 14px; font-weight: 700; }
.ax-sub { color: var(--muted); font-size: 12.5px; }
.ax-list { margin: 6px 0 0; padding-left: 18px; color: #cbd5e1; font-size: 12.5px; display: flex; flex-direction: column; gap: 4px; }
.ax-quote { font-style: italic; color: var(--muted); font-size: 13px; margin: 6px 0; }
.ax-cites { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ax-cites span { background: #0b0f17; border: 1px solid var(--ax-line); border-radius: 6px; padding: 2px 8px; font-size: 11px; color: #cbd5e1; }

/* pipeline */
.ax-pipe { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.ax-pipe-node { background: var(--ax-card2); border: 1px solid var(--ax-line); border-radius: 12px; padding: 8px 12px; }
.ax-pipe-node b { font-size: 13px; }
.ax-pipe-node span { display: block; font-size: 11px; color: var(--muted); max-width: 190px; }
.ax-arrow { color: var(--ax-indigo); font-weight: 700; }

/* rows */
.ax-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--ax-line); }
.ax-row:last-child { border-bottom: 0; }
.ax-row2 { padding: 8px 0; border-bottom: 1px solid var(--ax-line); }
.ax-row2:last-child { border-bottom: 0; }
.ax-rowtop { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ax-rowend { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.ax-svc { flex: 1; font-size: 13px; }
.ax-mini { font-size: 11px; color: var(--muted); }
.ax-conf { margin: 4px 0 0; font-size: 11px; font-weight: 700; color: var(--ax-indigo); }
.ax-sym { margin: 2px 0; font-size: 12px; color: #cbd5e1; }
.ax-grp { margin: 12px 0 6px; font-size: 11px; font-weight: 700; color: var(--muted); }
.ax-empty { border: 1px dashed var(--ax-line); border-radius: 10px; padding: 12px; text-align: center; color: var(--muted); font-size: 12px; }

.ax-dot { width: 9px; height: 9px; border-radius: 999px; flex: 0 0 auto; }
.ax-bar { flex: 1; height: 6px; border-radius: 999px; background: #263041; overflow: hidden; min-width: 60px; }
.ax-bar i { display: block; height: 100%; border-radius: 999px; transition: width 0.2s ease; }

/* sources */
.ax-src { background: var(--ax-card2); border: 1px solid var(--ax-line); border-radius: 12px; padding: 10px; }
.ax-src b { font-size: 12.5px; display: block; }
.ax-src .ax-sub { font-size: 11px; display: block; margin: 2px 0 4px; }

/* table */
.ax-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ax-table th { text-align: left; padding: 10px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); border-bottom: 1px solid var(--ax-line); }
.ax-table td { padding: 9px 12px; border-bottom: 1px solid var(--ax-line); }
.ax-table tr:last-child td { border-bottom: 0; }
.ax-table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.ax-mono { font-family: ui-monospace, monospace; font-size: 11.5px; color: #cbd5e1; }
.ax-tag { background: #1e2636; border-radius: 5px; padding: 1px 6px; font-size: 10px; font-weight: 700; color: #cbd5e1; }

/* triage */
.ax-rc, .ax-step { border: 1px solid var(--ax-line); border-radius: 12px; padding: 11px; margin-top: 8px; }
.ax-rc-rec { border-color: rgba(129, 140, 248, 0.5); background: rgba(129, 140, 248, 0.08); }
.ax-step-done { border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.07); }
.ax-rank { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 999px; background: #263041; color: #cbd5e1; font-size: 11px; font-weight: 700; margin-right: 4px; }
.ax-cmd { font-family: ui-monospace, monospace; font-size: 11px; color: var(--muted); margin: 6px 0 0; }
.ax-rollback { margin-top: 10px; background: var(--ax-card2); border: 1px solid var(--ax-line); border-radius: 10px; padding: 10px; font-size: 12px; }
.ax-gate { margin-top: 12px; border: 2px dashed var(--ax-amber); border-radius: 12px; padding: 14px; background: rgba(251, 191, 36, 0.06); }
.ax-gate b { color: var(--ax-amber); }
.ax-exec { margin-top: 10px; background: rgba(129, 140, 248, 0.1); border-radius: 8px; padding: 8px 10px; font-size: 12px; color: var(--ax-indigo); }
.ax-committed, .ax-learn { border: 1px solid rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.08); border-radius: 10px; padding: 8px 10px; font-size: 12px; margin-top: 8px; }

/* buttons + pills */
.ax-btn { appearance: none; border: 0; border-radius: 10px; padding: 9px 15px; font-size: 13px; font-weight: 700; color: #fff; cursor: pointer; background: linear-gradient(90deg, #4f46e5, #7c3aed); box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3); margin-top: 10px; }
.ax-btn:hover { filter: brightness(1.1); }
.ax-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ax-btn.ghost { background: transparent; border: 1px solid var(--ax-line); color: #cbd5e1; box-shadow: none; }
.ax-btn.success { background: linear-gradient(90deg, #059669, #10b981); box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3); }
.ax-header .ax-btn { margin-top: 0; background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.25); box-shadow: none; }
.ax-input { background: #0b0f17; border: 1px solid var(--ax-line); border-radius: 10px; padding: 9px 11px; color: var(--text); font-size: 13px; width: 100%; }
.ax-input:focus { outline: 2px solid var(--ax-indigo); outline-offset: 1px; }

.ax-pill { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 700; }
.ax-indigo { background: rgba(129, 140, 248, 0.18); color: #c7d2fe; }
.ax-emerald { background: rgba(52, 211, 153, 0.18); color: #a7f3d0; }
.ax-amber { background: rgba(251, 191, 36, 0.18); color: #fde68a; }
.ax-rose { background: rgba(251, 113, 133, 0.18); color: #fecdd3; }
.ax-sky { background: rgba(56, 189, 248, 0.18); color: #bae6fd; }
.ax-slate { background: rgba(148, 163, 184, 0.18); color: #e2e8f0; }

.ax-txt-emerald { color: var(--ax-emerald); font-weight: 700; }
.ax-txt-amber { color: var(--ax-amber); font-weight: 700; }
.ax-txt-rose { color: var(--ax-rose); font-weight: 700; }
.ax-txt-sky { color: var(--ax-sky); font-weight: 700; }
.ax-txt-violet { color: var(--ax-violet); font-weight: 700; }
.ax-txt-slate { color: var(--ax-slate); font-weight: 700; }
.ax-bg-emerald { background: var(--ax-emerald); }
.ax-bg-amber { background: var(--ax-amber); }
.ax-bg-rose { background: var(--ax-rose); }
.ax-bg-sky { background: var(--ax-sky); }
.ax-bg-indigo { background: linear-gradient(90deg, #6366f1, #a78bfa); }
.ax-bg-slate { background: var(--ax-slate); }

/* ── Telemetry demo buttons ─────────────────────────────────────── */
.axd-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.axd-back { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--ax-line); color: #cbd5e1; border-radius: 10px; padding: 6px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.axd-back:hover { background: rgba(255,255,255,0.05); }

/* ── Animated AI anomaly-flow diagram ───────────────────────────── */
.axd-flow { display: grid; grid-template-columns: 1.1fr 0.5fr 1fr 0.5fr 1.1fr; gap: 8px; align-items: stretch; }
@media (max-width: 900px) { .axd-flow { grid-template-columns: 1fr; } .axd-lane { display: none !important; } }
.axd-col { display: flex; flex-direction: column; gap: 8px; }
.axd-coltitle { margin: 0 0 2px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); text-align: center; }
.axd-node { position: relative; background: var(--ax-card2); border: 1px solid var(--ax-line); border-radius: 12px; padding: 9px 11px 9px 26px; }
.axd-node b { font-size: 12.5px; display: block; }
.axd-node .ax-sub { font-size: 10.5px; }
.axd-emit { position: absolute; left: 10px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: #34d399; animation: axd-pulse 1.8s ease-in-out infinite; }
.axd-lane { position: relative; min-height: 100%; }
.axd-lane::before { content: ''; position: absolute; top: 12%; bottom: 12%; left: 50%; width: 2px; margin-left: -1px; background: repeating-linear-gradient(to bottom, rgba(129,140,248,0.5) 0 6px, transparent 6px 12px); }
.axd-dot { position: absolute; left: 50%; margin-left: -4px; width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle, #a78bfa, #6366f1); box-shadow: 0 0 8px rgba(129,140,248,0.8); animation: axd-travel 2s linear infinite; }
@keyframes axd-travel { 0% { top: 8%; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: 90%; opacity: 0; } }
.axd-lane-out .axd-dot { background: radial-gradient(circle, #fca5a5, #f43f5e); box-shadow: 0 0 8px rgba(244,63,94,0.7); }
.axd-hubcol { justify-content: center; }
.axd-hub { position: relative; text-align: center; border-radius: 16px; padding: 18px 12px; color: #fff; background: linear-gradient(160deg, #4338ca, #6d28d9); border: 1px solid rgba(129,140,248,0.5); }
.axd-hub b { display: block; font-size: 15px; }
.axd-hub span { font-size: 11px; color: #d6d3ff; }
.axd-hub-steps { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 8px; }
.axd-hub-steps span { background: rgba(255,255,255,0.15); border-radius: 999px; padding: 2px 8px; font-size: 10px; color: #fff; }
.axd-hub-ring { position: absolute; inset: 0; border-radius: 16px; animation: axd-ring 2.2s ease-out infinite; }
@keyframes axd-ring { 0% { box-shadow: 0 0 0 0 rgba(129,140,248,0.5); } 70%,100% { box-shadow: 0 0 0 16px rgba(129,140,248,0); } }
.axd-alert { opacity: 0; background: rgba(244,63,94,0.1); border: 1px solid rgba(244,63,94,0.35); border-radius: 10px; padding: 8px 10px; font-size: 11.5px; color: #fecdd3; animation: axd-pop 0.5s ease forwards; }
.axd-alert.proactive { background: rgba(52,211,153,0.1); border-color: rgba(52,211,153,0.35); color: #a7f3d0; }
@keyframes axd-pop { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.axd-legend { text-align: center; margin-top: 4px; }

/* ── Unified observability dashboard (payments) ─────────────────── */
.axu-journey { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; }
.axu-stage { flex: 1; min-width: 120px; background: var(--ax-card2); border: 1px solid var(--ax-line); border-radius: 12px; padding: 10px; text-align: center; }
.axu-stage b { display: block; font-size: 12.5px; }
.axu-stage .ax-sub { font-size: 11px; }
.axu-stage.ok { border-left: 3px solid var(--ax-emerald); }
.axu-stage.warn { border-left: 3px solid var(--ax-amber); }
.axu-stage.bad { border-left: 3px solid var(--ax-rose); }
.axu-sep { align-self: center; color: var(--ax-indigo); font-weight: 700; }
@media (max-width: 820px) { .axu-sep { display: none; } }

/* ── Reduced-brightness violet/indigo palette (applied last, wins) ── */
:root {
  --ax-indigo: #6f77c9;
  --ax-violet: #8a7cc0;
}
.ax-logo,
.ax-navstep.active .ax-navn,
.axd-hub { background: linear-gradient(135deg, #2c2a70, #45277e) !important; }
.ax-btn { background: linear-gradient(90deg, #2c2a70, #45277e) !important; box-shadow: 0 2px 8px rgba(30, 27, 75, 0.28) !important; }
.ax-header { background: linear-gradient(90deg, #262463, #38206a 55%, #2b2975) !important; box-shadow: 0 4px 14px rgba(20, 18, 50, 0.35) !important; }
.ax-bg-indigo { background: linear-gradient(90deg, #4a4e94, #7268a4) !important; }
.ax-dot,
.axd-dot { background: radial-gradient(circle, #8a7cc0, #5a5ea8) !important; box-shadow: 0 0 7px rgba(90, 94, 168, 0.6) !important; }
.axd-lane-out .axd-dot { background: radial-gradient(circle, #d88, #b5455f) !important; box-shadow: 0 0 7px rgba(181, 69, 95, 0.55) !important; }
.ax-navstep.active { background: rgba(111, 119, 201, 0.1) !important; border-color: rgba(111, 119, 201, 0.32) !important; }
.ax-tile.ax-accent,
.ax-card.ax-accent { background: linear-gradient(160deg, rgba(111, 119, 201, 0.09), rgba(138, 124, 192, 0.05)) !important; border-color: rgba(111, 119, 201, 0.28) !important; }

/* ── AI RAG Collection diagram ──────────────────────────────────── */
.axr-flow { grid-template-columns: 1.3fr 0.4fr 1.1fr 0.4fr 0.9fr; }
.axr-srcgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
@media (max-width: 640px) { .axr-srcgrid { grid-template-columns: 1fr; } }
.axr-src { position: relative; background: var(--ax-card2); border: 1px solid var(--ax-line); border-radius: 10px; padding: 7px 8px 7px 22px; }
.axr-src b { font-size: 11px; font-weight: 600; }
.axr-src .axd-emit { left: 8px; width: 7px; height: 7px; margin-top: -3.5px; }
.axr-mcp { position: relative; text-align: center; border-radius: 12px; padding: 12px 10px; background: rgba(52, 211, 153, 0.08); border: 1px solid rgba(52, 211, 153, 0.32); }
.axr-mcp b { display: block; font-size: 13px; }
.axr-mcp span { font-size: 10.5px; color: var(--muted); }
.axr-mcp-badge { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); background: #059669; color: #fff; font-size: 9px; font-weight: 700; padding: 2px 9px; border-radius: 999px; letter-spacing: 0.05em; }
.axr-down { text-align: center; color: var(--ax-indigo); font-weight: 700; margin: 8px 0; letter-spacing: 5px; }
.axr-store { position: relative; text-align: center; border-radius: 16px; padding: 16px 12px; color: #fff; background: linear-gradient(160deg, #0f766e, #155e75); border: 1px solid rgba(45, 212, 191, 0.4); }
.axr-store b { display: block; font-size: 15px; }
.axr-store span { font-size: 11px; color: #a7f3d0; }
.axr-store-stat { margin-top: 8px; background: rgba(255, 255, 255, 0.12); border-radius: 8px; padding: 8px; font-size: 11.5px; line-height: 1.5; }

/* ── Approval popup (L1 payment dashboard) ──────────────────────── */
.ax-modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(3, 6, 12, 0.72); display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px); }
.ax-modal { width: 100%; max-width: 560px; max-height: 86vh; overflow-y: auto; background: var(--ax-card); border: 1px solid var(--ax-line); border-radius: 16px; padding: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.ax-modal .ax-rowend { display: flex; justify-content: flex-end; gap: 8px; }

/* ── Code-remediation flow (L1 code-fix alert) ──────────────────── */
.axc-steps { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.axc-step { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding: 3px 9px; border: 1px solid var(--ax-line); border-radius: 999px; }
.axc-step b { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 999px; background: #263041; color: #cbd5e1; font-size: 10px; }
.axc-step.active { color: #e6edf3; border-color: rgba(129, 140, 248, 0.6); background: rgba(129, 140, 248, 0.1); }
.axc-step.active b { background: var(--ax-indigo); color: #fff; }
.axc-step.done { color: var(--ax-emerald); border-color: rgba(52, 211, 153, 0.4); }
.axc-step.done b { background: var(--ax-emerald); color: #05261a; }
.axc-step-sep { color: var(--muted); font-size: 11px; }

.axc-file { font-family: ui-monospace, monospace; color: var(--ax-indigo); }
.axc-diff { margin: 6px 0 0; padding: 10px 12px; border: 1px solid var(--ax-line); border-radius: 10px; background: #0b0f16; overflow-x: auto; font-family: ui-monospace, monospace; font-size: 12px; line-height: 1.5; }
.axc-diff span { display: block; white-space: pre; }
.axc-add { color: #56d364; background: rgba(52, 211, 153, 0.08); }
.axc-del { color: #f85149; background: rgba(248, 81, 73, 0.08); }
.axc-ctx { color: var(--muted); }

.axc-test { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13px; border-top: 1px solid var(--ax-line); }
.axc-test:first-of-type { border-top: 0; }
.axc-test span:nth-child(2) { flex: 1; }
.axc-spin { display: inline-block; animation: axc-rot 0.8s linear infinite; color: var(--ax-indigo); }
@keyframes axc-rot { to { transform: rotate(360deg); } }

/* ── Triage Chat ────────────────────────────────────────────────── */
.axchat-log { display: flex; flex-direction: column; gap: 10px; max-height: 52vh; overflow-y: auto; padding: 4px 2px 8px; }
.axchat-msg { border: 1px solid var(--ax-line); border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.axchat-user { align-self: flex-end; max-width: 80%; background: rgba(129, 140, 248, 0.1); border-color: rgba(129, 140, 248, 0.35); }
.axchat-bot { align-self: flex-start; max-width: 92%; background: var(--ax-card2); }
.axchat-md { margin-top: 4px; line-height: 1.5; }
.axchat-md p { margin: 6px 0; }
.axchat-md ul, .axchat-md ol { margin: 6px 0; padding-left: 20px; }
.axchat-md li { margin: 2px 0; }
.axchat-md code { font-family: ui-monospace, monospace; background: #0b0f17; border: 1px solid var(--ax-line); border-radius: 5px; padding: 1px 5px; font-size: 12px; }
.axchat-md h1, .axchat-md h2, .axchat-md h3, .axchat-md h4 { margin: 8px 0 4px; font-size: 14px; }
.axchat-md strong { color: #e6edf3; }
.axchat-input { display: flex; gap: 8px; margin-top: 10px; }
.axchat-input .ax-input { flex: 1; }
.axchat-input .ax-btn { margin-top: 0; }

/* ── SLO bars (block-level, fixed height — not the flex .ax-bar) ─── */
.ax-slobar { display: block; width: 100%; height: 7px; margin-top: 8px; border-radius: 999px; background: #263041; overflow: hidden; }
.ax-slobar i { display: block; height: 100%; border-radius: 999px; transition: width 0.3s ease; }
.ax-eb { display: flex; align-items: center; gap: 8px; }
.ax-eb .ax-slobar { margin-top: 0; flex: 0 0 auto; }

/* ── AI Analysis popup — LangGraph pipeline ─────────────────────── */
.axan-flow { margin-top: 8px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.axan-node { display: flex; align-items: baseline; gap: 10px; background: var(--ax-card2); border: 1px solid var(--ax-line); border-radius: 10px; padding: 8px 12px; }
.axan-node b { font-size: 12.5px; min-width: 110px; }
.axan-node span { font-size: 11px; color: var(--muted); }
.axan-ic { font-size: 14px; }
.axan-arrow { align-self: center; color: var(--ax-indigo); font-weight: 700; line-height: 1; }

/* ── Agentic Incident Loop ─────────────────────────────────────────── */

.il-section-title {
  margin: 20px 0 10px;
  font-size: 15px;
}

.il-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
}

.il-chip {
  border: 1px solid var(--border, #2a3038);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 12px;
  background: var(--panel-2, #161b22);
}

.il-phase {
  margin: 16px 0;
  border: 1px solid var(--border, #2a3038);
  border-radius: 10px;
  overflow: hidden;
}

.il-phase-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  padding: 10px 14px;
  background: var(--panel-2, #161b22);
  border-bottom: 1px solid var(--border, #2a3038);
}

.il-phase-title {
  font-weight: 600;
  letter-spacing: 0.04em;
}

.il-phase-agents {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 14px;
}

.il-tile {
  border: 1px solid var(--border, #2a3038);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--panel-2, #161b22);
}

.il-tile-title {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--muted, #8b949e);
}

.il-tile-value {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
}

.il-receipts {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border, #2a3038);
  border-radius: 10px;
  overflow: hidden;
}

.il-receipt {
  display: grid;
  grid-template-columns: 42px 190px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border, #2a3038);
  font-size: 12px;
}

.il-receipt:last-child {
  border-bottom: none;
}

.il-receipt-seq {
  color: var(--muted, #8b949e);
  font-variant-numeric: tabular-nums;
}

.il-receipt-agent {
  font-weight: 500;
}

.il-receipt-summary {
  color: var(--muted, #8b949e);
}

.il-receipt-hash {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--accent, #58a6ff);
}

@media (max-width: 720px) {
  .il-receipt {
    grid-template-columns: 34px 1fr;
  }
  .il-receipt-summary,
  .il-receipt-hash {
    grid-column: 2;
  }
}

.il-live-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 12px 0 6px;
  font-size: 12px;
}

.il-src {
  border: 1px solid var(--border, #2a3038);
  border-radius: 999px;
  padding: 2px 10px;
}

.il-src[data-on='yes'] {
  color: #3fb950;
  border-color: #23863633;
  background: #23863614;
}

.il-src[data-on='no'] {
  color: var(--muted, #8b949e);
}

.il-cites {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 13px;
}

.il-cites li {
  margin: 2px 0;
}
