/* ════════════════════════════════════════════════════════════════════════
   KSHOT SENTINEL GRID — tactical AI-security command center
   Aesthetic: deep-space terminal · neon cyan rails · lime live-signals ·
   hot-red interdiction · Chakra Petch / IBM Plex Mono
   ════════════════════════════════════════════════════════════════════════ */

:root {
  /* ENTERPRISE LIGHT — white cards on a soft cool-gray canvas, deep-slate
     text, a confident blue accent. Variable names kept so every var() usage
     flips automatically; hardcoded dark-isms are overridden in the section
     right after :root. */
  --bg:        #f5f7fa;   /* canvas */
  --bg2:       #eef1f6;
  --surface:   #ffffff;   /* cards / panels */
  --surface2:  #f4f6f9;
  --surface3:  #eaeef4;
  --border:    #e4e8ee;
  --border2:   #d4dae2;
  --border3:   #c2cad6;

  /* text — slate on light */
  --text:      #0f172a;
  --text-dim:  #475569;
  --muted:     #64748b;

  /* signal palette — restrained, professional */
  --accent:    #2f5bea;   /* blue — primary */
  --accent2:   #1e40af;
  --accent-dk: #e6ecfd;   /* light blue tint (used as accent surface) */
  --volt:      #15a34a;   /* green — LIVE / pass */
  --good:      #16a34a;   /* allowed */
  --warn:      #d97706;   /* amber — error / partial */
  --bad:       #dc2626;   /* red — blocked */
  --hld:       #7c3aed;   /* violet — HLD / provisioned */
  --magenta:   #db2777;
  --flow:      #2f5bea;

  /* category hues — tuned for light surfaces */
  --cat-inbound:   #dc2626;
  --cat-agent:     #2f5bea;
  --cat-outbound:  #d97706;
  --cat-mcp:       #7c3aed;
  --cat-identity:  #16a34a;
  --cat-gateway:   #0891b2;
  --cat-a2a:       #db2777;
  --cat-telemetry: #0891b2;

  /* "glows" are now soft elevation + a crisp ring (enterprise, not arcade) */
  --glow-cyan: 0 0 0 1px rgba(47,91,234,.35), 0 6px 18px rgba(47,91,234,.12);
  --glow-red:  0 0 0 1px rgba(220,38,38,.35), 0 6px 18px rgba(220,38,38,.12);
  --shadow:    0 1px 2px rgba(15,23,42,.06), 0 4px 14px rgba(15,23,42,.06);
  --shadow-lg: 0 10px 34px rgba(15,23,42,.12);

  --font-display: 'Inter', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%; overflow: hidden;
  background: var(--bg); color: var(--text);
  font-family: var(--font-body);
  font-size: 14px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
code, .mono { font-family: var(--font-mono); font-size: 12px; }

/* global faint grid + scanline texture behind everything */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(47,91,234,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47,91,234,.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 30%, transparent 100%);
}

/* ── HEADER ──────────────────────────────────────────────────── */
header {
  padding: 0;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg2) 100%);
  display: flex; flex-direction: column;
  flex-shrink: 0; position: relative; z-index: 10;
}
.header-tabs-row {
  display: flex; align-items: stretch;
  height: 46px;
  border-bottom: 1px solid var(--border);
  padding: 0 10px;
  flex-shrink: 0;
  min-width: 0;   /* let children shrink instead of pushing the row past the viewport */
}
.header-tabs-row .topbar-brand { flex-shrink: 0; }
.header-cov-row {
  display: flex; align-items: center; gap: 10px;
  height: 60px; padding: 0 18px;
  flex-shrink: 0;
  position: relative;
}
.header-cov-row::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(47,91,234,.25), transparent);
}

.header-user-area {
  display: flex; align-items: center; gap: 12px;
  margin-left: auto; padding-right: 6px;
}
.header-live-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 1.5px; color: var(--volt);
  border: 1px solid rgba(22,163,74,.3); border-radius: 5px;
  padding: 4px 10px; background: rgba(22,163,74,.06);
}
.live-led {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--volt); box-shadow: 0 0 8px var(--volt);
  animation: led-pulse 1.6s ease-in-out infinite;
}
@keyframes led-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.org-credits-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; color: var(--text);
  border: 1px solid var(--border2); border-radius: 6px; padding: 4px 10px;
  background: linear-gradient(180deg, rgba(22,163,74,.07), transparent);
}
.org-credits-chip .occ-coin { color: var(--volt); }
.org-credits-chip b { color: var(--volt); font-weight: 700; letter-spacing: .3px; }
.org-credits-chip .occ-cr { color: var(--muted); }
.org-credits-chip .occ-org { color: var(--text-dim); }
.org-credits-chip.low { border-color: rgba(220,38,38,.5); }
.org-credits-chip.low b, .org-credits-chip.low .occ-coin { color: var(--bad); }
.org-credits-chip { cursor: pointer; transition: border-color .15s; }
.org-credits-chip:hover { border-color: var(--volt); }
.org-credits-chip.flash { animation: credits-flash .5s ease-in-out 3; }
@keyframes credits-flash { 0%,100% { box-shadow: none; } 50% { box-shadow: 0 0 0 2px var(--bad), 0 0 16px rgba(220,38,38,.5); } }

/* ── Billing / custom modals ── */
.billing-box {
  position: relative; width: 460px; max-width: calc(100% - 40px);
  background: linear-gradient(160deg, var(--surface), var(--surface2));
  border: 1px solid var(--border2); border-radius: 16px; padding: 26px 28px;
  box-shadow: 0 40px 90px rgba(0,0,0,.7), 0 0 50px rgba(47,91,234,.08);
}
.billing-box::before { content: ''; position: absolute; top: 0; left: 24px; right: 24px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.billing-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 9px; margin-top: 20px; }
.bill-coin { color: var(--volt); }
.billing-sub { font-size: 12px; color: var(--text-dim); margin: 6px 0 16px; line-height: 1.5; }
.billing-balance { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); margin-bottom: 14px; }
.billing-balance b { color: var(--volt); font-size: 15px; }
.billing-packs { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-bottom: 16px; }
.pack-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 6px;
  border: 1px solid var(--border2); border-radius: 10px; background: var(--surface2);
  color: var(--text); cursor: pointer; transition: all .15s;
}
.pack-btn:hover { border-color: var(--accent); background: rgba(47,91,234,.08); transform: translateY(-2px); }
.pack-credits { font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.pack-price { font-family: var(--font-mono); font-size: 11px; color: var(--volt); }
.billing-custom { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.billing-custom label { font-size: 11px; color: var(--muted); font-family: var(--font-mono); }
.billing-custom input {
  flex: 1; background: var(--bg2); border: 1px solid var(--border2); border-radius: 8px;
  color: var(--text); padding: 9px 12px; font-family: var(--font-mono); font-size: 13px;
}
.billing-usd { font-family: var(--font-mono); font-size: 12px; color: var(--volt); white-space: nowrap; }
.billing-buy-btn {
  width: 100%; padding: 13px; border: none; border-radius: 10px; cursor: pointer;
  background: linear-gradient(135deg, var(--accent2), var(--accent)); color: #ffffff;
  font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: .3px;
  box-shadow: 0 0 22px rgba(47,91,234,.3); transition: transform .1s;
}
.billing-buy-btn:hover { transform: translateY(-1px); }
.billing-buy-btn:disabled { opacity: .5; cursor: default; transform: none; }
.billing-note { font-size: 11px; color: var(--muted); text-align: center; margin-top: 12px; line-height: 1.5; font-family: var(--font-mono); }
.billing-ledger { margin-top: 16px; }
.ledger-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 7px; }
.ledger-row { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); padding: 3px 0; border-bottom: 1px solid var(--border); }
.ledger-row .pos { color: var(--good); } .ledger-row .neg { color: var(--text-dim); }
.custom-prompt {
  width: 100%; background: var(--bg2); border: 1px solid var(--border2); border-radius: 10px;
  color: var(--text); padding: 12px; font-family: var(--font-mono); font-size: 12.5px;
  resize: vertical; margin-bottom: 14px; line-height: 1.5;
}

/* ── Org switcher menu ── */
.org-chip-wrap { position: relative; display: inline-flex; }
.occ-caret { color: var(--muted); font-size: 11px; margin-left: 2px; }
.org-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 50; width: 248px;
  background: linear-gradient(160deg, var(--surface), var(--surface2));
  border: 1px solid var(--border2); border-radius: 12px; padding: 8px;
  box-shadow: 0 24px 60px rgba(0,0,0,.7);
}
.om-section { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; color: var(--muted); padding: 6px 8px 4px; }
.om-item {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%;
  background: transparent; border: 1px solid transparent; border-radius: 8px; cursor: pointer;
  color: var(--text); font-family: var(--font-body); font-size: 12.5px; padding: 8px 10px; text-align: left;
}
.om-item:hover { background: rgba(47,91,234,.07); }
.om-item.active { border-color: var(--accent); background: rgba(47,91,234,.1); }
.om-bal { font-family: var(--font-mono); font-size: 11px; color: var(--volt); white-space: nowrap; }
.om-div { height: 1px; background: var(--border); margin: 6px 4px; }
.om-act {
  display: block; width: 100%; text-align: left; background: transparent; border: none;
  color: var(--accent); font-family: var(--font-display); font-size: 12px; padding: 8px 10px;
  cursor: pointer; border-radius: 8px;
}
.om-act:hover { background: rgba(47,91,234,.07); }

/* ── Onboarding ── */
.onboarding-input {
  width: 100%; background: var(--bg2); border: 1px solid var(--border2); border-radius: 10px;
  color: var(--text); padding: 12px 14px; font-family: var(--font-body); font-size: 14px;
  margin-bottom: 14px;
}
.onboarding-input:focus { outline: none; border-color: var(--accent); }
.onboarding-orgs { margin-bottom: 8px; }

/* ── Members / roles ── */
.members-org { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); font-weight: 400; }
.members-invite { display: flex; gap: 8px; margin: 4px 0 16px; }
.invite-role { background: var(--bg2); border: 1px solid var(--border2); border-radius: 9px; color: var(--text);
  font-family: var(--font-body); font-size: 13px; padding: 0 10px; }
.members-list { display: flex; flex-direction: column; gap: 7px; max-height: 320px; overflow-y: auto; }
.mem-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; background: var(--surface); }
.mem-email { font-family: var(--font-mono); font-size: 12.5px; color: var(--text); }
.mem-pending { font-family: var(--font-mono); font-size: 11px; color: var(--warn); border: 1px solid rgba(217,119,6,.4);
  border-radius: 4px; padding: 1px 5px; margin-left: 6px; }
.mem-ctrl { display: flex; align-items: center; gap: 7px; }
.mem-role { background: var(--bg2); border: 1px solid var(--border2); border-radius: 7px; color: var(--text);
  font-family: var(--font-body); font-size: 12px; padding: 4px 8px; }
.mem-remove { background: transparent; border: 1px solid var(--border2); border-radius: 6px; color: var(--text-dim);
  width: 26px; height: 26px; cursor: pointer; }
.mem-remove:hover { color: var(--bad); border-color: var(--bad); }
.mem-rolebadge { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px; padding: 3px 9px;
  border-radius: 5px; border: 1px solid var(--border2); color: var(--text-dim); text-transform: uppercase; }
.mem-rolebadge.owner { color: var(--volt); border-color: rgba(22,163,74,.4); }
.mem-rolebadge.admin { color: var(--accent); border-color: var(--border2); }

/* ── Onboarding full-screen page ── */
#page-onboarding {
  position: fixed; inset: 0; z-index: 90;
  background: radial-gradient(ellipse 100% 100% at 50% -10%, #ffffff 0%, #eef1f6 60%);
  display: flex; flex-direction: column; overflow: auto;
}
.ob-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px; flex-shrink: 0; position: relative; z-index: 2;
}
.ob-brand { display: flex; align-items: center; gap: 10px; }
.ob-user { display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }
.ob-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 60px;
  padding: 20px 48px 60px; max-width: 1180px; margin: 0 auto; width: 100%;
  position: relative; z-index: 2; flex-wrap: wrap;
}
.ob-left { flex: 1; min-width: 320px; max-width: 560px; }
.ob-eyebrow {
  display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 2.5px; color: var(--accent); margin-bottom: 18px;
}
.ob-headline {
  font-family: var(--font-display); font-size: 42px; font-weight: 700; line-height: 1.1;
  color: var(--text); margin-bottom: 18px; letter-spacing: -.5px;
}
.ob-headline #ob-name-greet { color: var(--accent); }
.ob-lead { font-size: 15px; line-height: 1.65; color: var(--text-dim); margin-bottom: 24px; }
.ob-lead b { color: var(--text); }
.ob-points { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 12px; }
.ob-points li { font-size: 14px; color: var(--text-dim); display: flex; align-items: center; gap: 12px; }
.ob-points li span {
  font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--volt);
  min-width: 38px; text-align: center;
}
.ob-flowhint {
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
  padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px;
  background: rgba(47,91,234,.03);
}
.ob-flowhint b { color: var(--accent); }
.ob-card {
  width: 420px; max-width: 100%; flex-shrink: 0;
  background: linear-gradient(160deg, var(--surface), var(--surface2));
  border: 1px solid var(--border2); border-radius: 18px; padding: 30px;
  box-shadow: 0 40px 90px rgba(0,0,0,.7), 0 0 60px rgba(47,91,234,.1); position: relative;
}
.ob-card::before { content: ''; position: absolute; top: 0; left: 26px; right: 26px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.ob-step { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; color: var(--accent); margin-bottom: 10px; }
.ob-card-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.ob-card-sub { font-size: 13px; line-height: 1.55; color: var(--text-dim); margin-bottom: 20px; }
.ob-grant { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); text-align: center; margin-top: 14px; }
.ob-grant b { color: var(--volt); }
.ob-existing { margin-top: 18px; }
.ob-back {
  display: block; width: 100%; margin-top: 14px; background: transparent; border: none;
  color: var(--text-dim); font-family: var(--font-mono); font-size: 12px; cursor: pointer;
}
.ob-back:hover { color: var(--accent); }
@media (max-width: 880px) { .ob-headline { font-size: 32px; } .ob-wrap { gap: 32px; } }

/* ── Home / gentle intro ── */
#app-home { flex: 1; min-height: 0; overflow-y: auto; background:
  radial-gradient(ellipse 90% 60% at 50% -5%, rgba(47,91,234,.06) 0%, transparent 60%), var(--bg); }
.home-scroll { max-width: 1080px; margin: 0 auto; padding: 48px 40px 80px; }
.home-hero { margin-bottom: 46px; }
.home-eyebrow { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 2.5px; color: var(--accent); margin-bottom: 16px; }
.home-hero h1 { font-family: var(--font-display); font-size: 38px; font-weight: 700; line-height: 1.12;
  color: var(--text); letter-spacing: -.5px; margin-bottom: 16px; max-width: 760px; }
.home-hero p { font-size: 16px; line-height: 1.65; color: var(--text-dim); max-width: 680px; }
.home-hero b { color: var(--text); }
.home-section { margin-bottom: 44px; }
.home-sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 6px; }
.home-sec-head .hs-num { font-family: var(--font-display); font-size: 15px; color: var(--accent); opacity: .6; }
.home-sec-head h2 { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--text); }
.home-sec-sub { font-size: 14px; color: var(--text-dim); margin: 0 0 20px; line-height: 1.55; max-width: 720px; }
.home-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.home-card { border: 1px solid var(--border2); border-radius: 13px; padding: 18px;
  background: linear-gradient(160deg, var(--surface), var(--surface2)); transition: all .2s; }
.home-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 0 22px rgba(47,91,234,.1); }
.hc-ico { font-size: 22px; margin-bottom: 10px; }
.hc-name { font-family: var(--font-display); font-size: 14.5px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.hc-desc { font-size: 12.5px; line-height: 1.5; color: var(--text-dim); }
.home-threats { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.home-threat { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border);
  border-left: 3px solid var(--bad); border-radius: 0 10px 10px 0; padding: 13px 15px; background: var(--surface); }
.ht-ico { font-size: 18px; }
.ht-name { font-family: var(--font-display); font-size: 13.5px; font-weight: 600; color: var(--text); }
.ht-desc { font-size: 12px; line-height: 1.45; color: var(--text-dim); margin-top: 3px; }
.home-clouds { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.home-cloud { border: 1px solid var(--border2); border-radius: 14px; padding: 20px;
  background: linear-gradient(160deg, var(--surface), var(--surface2)); display: flex; flex-direction: column; gap: 12px; }
.home-cloud.soon { opacity: .6; }
.home-cloud-top { display: flex; align-items: center; justify-content: space-between; }
.hcl-name { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--text); }
.hcl-status { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; color: var(--muted);
  border: 1px solid var(--border2); border-radius: 5px; padding: 2px 8px; }
.hcl-status.live { color: var(--volt); border-color: rgba(22,163,74,.4); background: rgba(22,163,74,.06); }
.hcl-stack { font-family: var(--font-mono); font-size: 11px; line-height: 1.5; color: var(--text-dim); flex: 1; }
.hcl-btn { padding: 11px; border: none; border-radius: 9px; cursor: pointer; font-family: var(--font-display);
  font-weight: 700; font-size: 13px; background: linear-gradient(135deg, var(--accent2), var(--accent)); color: #ffffff; }
.hcl-btn:disabled { background: var(--surface2); color: var(--muted); cursor: default; border: 1px solid var(--border2); }
.home-footer { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-align: center;
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }

/* ── Home diagrams (animated) ── */
.dgm-wrap { border: 1px solid var(--border2); border-radius: 16px; padding: 24px;
  background: linear-gradient(160deg, var(--surface), var(--surface2)); }
.dgm-svg { width: 100%; height: auto; display: block; }
.agi-node { fill: #ffffff; stroke: #d4dae2; stroke-width: 1.5; }
.agi-node.accent { stroke: var(--accent); }
.agi-node.agent { fill: #eef2ff; stroke: var(--accent); stroke-width: 2; filter: drop-shadow(0 0 14px rgba(47,91,234,.25)); }
.agi-node.atk { stroke: rgba(220,38,38,.5); }
.agi-node.agent.danger { stroke: var(--bad); filter: drop-shadow(0 0 14px rgba(220,38,38,.3)); }
.agi-t { fill: #0f172a; font-family: var(--font-display); font-weight: 600; font-size: 15px; text-anchor: middle; }
.agi-t.lg { font-size: 16px; } .agi-t.sm { font-size: 12.5px; }
.agi-sub { fill: #64748b; font-family: var(--font-mono); font-size: 11px; text-anchor: middle; }
.agi-loop { fill: var(--accent); font-family: var(--font-mono); font-size: 11px; text-anchor: middle; }
.agi-cap { fill: var(--muted); font-family: var(--font-mono); font-size: 11px; text-anchor: middle; letter-spacing: 1px; }
.agi-mini { fill: var(--muted); font-family: var(--font-mono); font-size: 11px; text-anchor: end; }
.agi-edge { stroke: #3a5570; stroke-width: 2; fill: none; }
.agi-edge.flow { stroke: var(--accent); stroke-dasharray: 6 6; animation: agi-dash 1s linear infinite; opacity: .85; }
.agi-edge.danger { stroke: var(--bad); stroke-dasharray: 5 5; animation: agi-dash 1s linear infinite; opacity: .7; }
@keyframes agi-dash { to { stroke-dashoffset: -24; } }
.agi-pkt { fill: var(--accent); filter: drop-shadow(0 0 5px var(--accent)); }
.atk-badge circle { fill: #fef2f2; stroke: var(--bad); stroke-width: 1.5; animation: atk-pulse 1.6s ease-in-out infinite; }
.atk-badge text { font-size: 15px; text-anchor: middle; }
@keyframes atk-pulse { 0%,100% { filter: drop-shadow(0 0 2px var(--bad)); } 50% { filter: drop-shadow(0 0 11px var(--bad)); } }
.dgm-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 18px; }
.dgm-step { font-size: 12.5px; color: var(--text-dim); line-height: 1.5; border-left: 2px solid var(--accent); padding-left: 12px; }
.dgm-step b { color: var(--text); display: block; font-family: var(--font-display); margin-bottom: 2px; }
.dgm-note { margin-top: 14px; font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.dgm-note b { color: var(--text-dim); }
.dgm-threats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.dgm-threats span { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text);
  border: 1px solid var(--border); border-left: 3px solid var(--bad); border-radius: 0 8px 8px 0; padding: 8px 12px; background: var(--surface); }
.dgm-threats i { font-style: normal; font-size: 15px; }
.dgm-threats small { color: var(--muted); font-family: var(--font-mono); font-size: 11px; }
.shield-wrap { fill: rgba(47,91,234,.02); stroke: var(--accent); stroke-width: 1; stroke-dasharray: 3 6; opacity: .4; }
.shield-tag { fill: var(--accent); opacity: .55; font-family: var(--font-display); font-size: 11px; letter-spacing: 3px; text-anchor: middle; }
.def-node { fill: #ffffff; stroke: #d4dae2; stroke-width: 1.5; }
.def-node.agent { stroke: var(--accent); fill: #eef2ff; }
.dgm-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.dgm-cta span { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }
.dgm-cta .hcl-btn { width: auto; padding: 11px 22px; }
@media (max-width: 760px) { .dgm-steps { grid-template-columns: 1fr; } }

/* learning-path phase cards on home */
.home-phases { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.home-phase { border: 1px solid var(--border2); border-radius: 14px; padding: 18px;
  background: linear-gradient(160deg, var(--surface), var(--surface2)); display: flex; flex-direction: column; gap: 9px; transition: all .2s; }
.home-phase:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 0 22px rgba(47,91,234,.1); }
.home-phase.sec { border-left: 3px solid var(--volt); }
.hp-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; color: var(--accent); }
.home-phase.sec .hp-tag { color: var(--volt); }
.hp-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--text); }
.hp-goal { font-size: 12.5px; line-height: 1.5; color: var(--text-dim); flex: 1; }
.hp-pats { display: flex; flex-wrap: wrap; gap: 5px; }
.hp-pats span { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim);
  border: 1px solid var(--border2); border-radius: 5px; padding: 2px 6px; }
.hp-open { align-self: flex-start; margin-top: 4px; background: transparent; border: none;
  color: var(--accent); font-family: var(--font-display); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.hp-open:hover { text-decoration: underline; }

/* ── Learn view ── */
#app-learn { flex: 1; min-height: 0; overflow-y: auto; background:
  radial-gradient(ellipse 90% 60% at 50% -5%, rgba(22,163,74,.05) 0%, transparent 60%), var(--bg); }
.learn-scroll { max-width: 860px; margin: 0 auto; padding: 36px 40px 80px; }
.learn-back { background: transparent; border: 1px solid var(--border2); border-radius: 8px; color: var(--text-dim);
  font-family: var(--font-mono); font-size: 12px; padding: 7px 12px; cursor: pointer; margin-bottom: 24px; }
.learn-back:hover { color: var(--accent); border-color: var(--accent); }
.learn-head .lh-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; color: var(--accent); margin-bottom: 8px; }
.learn-head h1 { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.learn-head p { font-size: 15px; line-height: 1.6; color: var(--text-dim); margin-bottom: 18px; max-width: 700px; }
.lh-nav { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 30px; }
.lh-pill { background: var(--surface); border: 1px solid var(--border2); border-radius: 8px; color: var(--text-dim);
  font-family: var(--font-display); font-size: 12px; padding: 7px 13px; cursor: pointer; transition: all .15s; }
.lh-pill:hover { color: var(--text); }
.lh-pill.active { color: #ffffff; background: linear-gradient(135deg, var(--accent2), var(--accent)); border-color: transparent; }
.learn-module { border: 1px solid var(--border2); border-radius: 14px; padding: 22px; margin-bottom: 16px;
  background: linear-gradient(160deg, var(--surface), var(--surface2)); }
.lm-name { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 14px; }
.lm-points { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 9px; }
.lm-points li { font-size: 13.5px; line-height: 1.5; color: var(--text-dim); padding-left: 18px; position: relative; }
.lm-points li::before { content: '▸'; position: absolute; left: 0; color: var(--accent); }
.lm-lab { font-family: var(--font-mono); font-size: 12px; color: var(--volt); padding: 8px 12px;
  background: rgba(22,163,74,.05); border: 1px solid rgba(22,163,74,.2); border-radius: 8px; display: inline-block; }
.lm-try { display: block; margin-top: 14px; padding: 11px 16px; border: none; border-radius: 9px; cursor: pointer;
  background: linear-gradient(135deg, var(--accent2), var(--accent)); color: #ffffff; font-family: var(--font-display); font-weight: 700; font-size: 13px; }
.lm-try:hover { transform: translateY(-1px); }
.header-user-email { font-size: 11px; color: var(--text-dim); font-family: var(--font-mono); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-signout-btn {
  background: transparent; border: 1px solid var(--border2);
  color: var(--text-dim); font-size: 11px; font-family: var(--font-display);
  padding: 5px 12px; border-radius: 6px; cursor: pointer; letter-spacing: .3px;
  transition: all .15s;
}
.header-signout-btn:hover { border-color: var(--accent); color: var(--accent); }

/* coverage cells (telemetry gauges) */
.cov-pills { display: flex; gap: 7px; flex: 1; overflow: hidden; align-items: center; }
.cov-cell {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 7px 12px 6px; border: 1px solid var(--border2);
  border-radius: 8px; background: linear-gradient(180deg, var(--surface2), var(--surface));
  min-width: 78px; position: relative; overflow: hidden;
  cursor: default; flex-shrink: 0;
}
.cov-cell::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--muted);
}
.cov-cell::after {
  content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at 0 50%, currentColor, transparent 70%);
}
.cov-cell.cat-inbound::before  { background: var(--cat-inbound); }
.cov-cell.cat-agent::before    { background: var(--cat-agent); }
.cov-cell.cat-outbound::before { background: var(--cat-outbound); }
.cov-cell.cat-mcp::before      { background: var(--cat-mcp); }
.cov-cell.cat-identity::before { background: var(--cat-identity); }
.cov-cell.cat-gateway::before  { background: var(--cat-gateway); }
.cov-cell.cat-a2a::before      { background: var(--cat-a2a); }
.cov-cell.cat-telemetry::before{ background: var(--cat-telemetry); }
.cov-cell .label {
  font-size: 11px; color: var(--muted); white-space: nowrap;
  text-transform: uppercase; letter-spacing: 1px; font-family: var(--font-mono);
}
.cov-cell .val {
  font-size: 18px; font-weight: 700; color: var(--text-dim); line-height: 1.1;
  font-family: var(--font-display); letter-spacing: -.5px;
}
.cov-cell.good    { border-color: rgba(22,163,74,.4); }
.cov-cell.good .val   { color: var(--good); text-shadow: 0 0 14px rgba(22,163,74,.5); }
.cov-cell.partial { border-color: rgba(217,119,6,.4); }
.cov-cell.partial .val{ color: var(--warn); }
.cov-cell.bad     { border-color: rgba(220,38,38,.4); }
.cov-cell.bad .val    { color: var(--bad); text-shadow: 0 0 14px rgba(220,38,38,.5); }
.cov-cell-overall {
  border-color: var(--accent) !important; min-width: 92px;
  background: linear-gradient(180deg, rgba(47,91,234,.1), var(--surface)) !important;
  box-shadow: inset 0 0 18px rgba(47,91,234,.08);
}
.cov-cell-overall::before { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.cov-cell-overall .label { color: var(--accent) !important; }

.js-compat { display: none; }

/* progress bar */
#progress-bar-wrap {
  display: none; width: 200px; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 6px; height: 26px; position: relative; overflow: hidden;
}
#progress-bar-fill {
  height: 100%; width: 0%; transition: width .3s;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  box-shadow: 0 0 16px rgba(47,91,234,.5);
}
#progress-bar-text {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-size: 11px; color: #fff !important; font-weight: 600;
  font-family: var(--font-mono); text-shadow: 0 1px 3px rgba(0,0,0,.7); letter-spacing: .5px;
}

.header-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; margin-left: auto; }

/* ── CLOUD TABS (header) ─────────────────────────────────────── */
.header-cloud-tabs { display: flex; gap: 4px; align-items: stretch; flex-shrink: 0; height: 100%; }
.sidebar-cloud-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 0 18px; border: none; border-bottom: 2px solid transparent;
  font-size: 12px; font-weight: 600; cursor: pointer;
  background: transparent; color: var(--text-dim);
  transition: all .15s; white-space: nowrap;
  font-family: var(--font-display); letter-spacing: 1px; border-radius: 0;
  position: relative;
}
.sidebar-cloud-btn:hover:not(:disabled) { color: var(--text); background: rgba(47,91,234,.04); }
.sidebar-cloud-btn.active {
  color: var(--accent); border-bottom-color: var(--accent);
  background: linear-gradient(180deg, rgba(47,91,234,.08), transparent);
}
.sidebar-cloud-btn.active::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--accent); box-shadow: 0 0 10px var(--accent);
}
.sidebar-cloud-btn:disabled { opacity: .3; cursor: not-allowed; }
.sidebar-cloud-btn.batch-running:not(.active) { color: var(--accent); }
.sidebar-cloud-btn.batch-running::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; margin-right: -4px;
  background: var(--accent); box-shadow: 0 0 6px var(--accent);
  animation: batch-pulse 1.2s ease-in-out infinite;
}
@keyframes batch-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.sidebar-cloud-btn .cloud-logo { width: 16px; height: 16px; flex-shrink: 0; }

/* ── WORKSPACE ───────────────────────────────────────────────── */
.workspace {
  display: flex; flex-direction: row;
  flex: 1; min-height: 0; overflow: hidden;
  position: relative; z-index: 1;
}

/* ── LEFT SIDEBAR — Scenarios ────────────────────────────────── */
.sidebar {
  width: 318px; flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg2) 100%);
  display: flex; flex-direction: column; overflow: hidden;
  transition: width .2s ease, min-width .2s ease;
}
.sidebar.collapsed { width: 0 !important; min-width: 0 !important; overflow: hidden; border-right: none; }
.sidebar-header {
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg2);
}
.sidebar-title {
  font-size: 11px; font-weight: 600; color: var(--text);
  text-transform: uppercase; letter-spacing: 1.6px;
  font-family: var(--font-display);
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.sidebar-title .badge-count {
  font-size: 11px; color: var(--bg); font-weight: 700; letter-spacing: 0;
  background: var(--accent); border-radius: 5px; padding: 1px 8px;
  font-family: var(--font-mono); box-shadow: 0 0 12px rgba(47,91,234,.4);
}
.sidebar-actions { display: flex; gap: 6px; margin-bottom: 12px; }
.sidebar-actions .btn-sm { flex: 1; }
.sidebar-actions #btn-reset { flex: 0 0 auto; }
.filter-pills { display: flex; gap: 5px; flex-wrap: wrap; }

#sc-list { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px; }

/* ── CENTER — Diagram ────────────────────────────────────────── */
.diagram-pane {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
  overflow: hidden; position: relative;
}
.diagram-bar {
  min-height: 50px; padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  display: flex; align-items: center; gap: 14px;
  flex-shrink: 0; flex-wrap: nowrap; position: relative; z-index: 6;
}
.diagram-bar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.diagram-bar-label {
  font-size: 11px; font-weight: 600; color: var(--text);
  text-transform: uppercase; letter-spacing: 1.5px; font-family: var(--font-display);
  display: flex; align-items: center; gap: 8px;
}
.bar-tick { color: var(--accent); font-size: 11px; }
#flow-status {
  font-size: 11px; color: var(--accent); font-family: var(--font-mono);
  padding: 3px 10px; border: 1px solid var(--border2); border-radius: 5px;
  background: rgba(47,91,234,.05); letter-spacing: .5px;
}
.arch-svg-wrap {
  flex: 1; padding: 22px; overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse 70% 60% at 50% 42%, rgba(47,91,234,.06) 0%, transparent 65%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(124,58,237,.05) 0%, transparent 60%),
    var(--bg);
}
.arch-svg-wrap svg { width: 100%; height: 100%; display: block; max-height: 100%; }

/* moving scanline over the canvas */
.canvas-scanline {
  position: absolute; left: 0; right: 0; top: 0; height: 120px; z-index: 2;
  pointer-events: none; opacity: .5;
  background: linear-gradient(180deg, transparent, rgba(47,91,234,.06) 60%, transparent);
  animation: scan 7s linear infinite;
}
@keyframes scan { 0% { transform: translateY(-130px); } 100% { transform: translateY(100vh); } }

/* coming-soon placeholder */
.arch-coming-soon {
  display: flex; align-items: center; justify-content: center;
}
.soon-glyph { font-size: 46px; margin-bottom: 14px; opacity: .25; color: var(--accent); }
.soon-title { color: var(--text); font-size: 14px; font-weight: 600; font-family: var(--font-display); letter-spacing: 1px; }
.soon-sub   { color: var(--muted); font-size: 11px; margin-top: 8px; font-family: var(--font-mono); }

/* ── RIGHT PANEL — Tabbed ────────────────────────────────────── */
.right-panel {
  width: 420px; flex-shrink: 0;
  border-left: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg2) 100%);
  display: flex; flex-direction: column; overflow: hidden;
  transition: width .2s ease;
}
.right-panel.collapsed { width: 44px; }
.right-panel.collapsed .tab-pane,
.right-panel.collapsed .tab-btn:not(#btn-toggle-panel) { display: none !important; }
.right-panel.collapsed .tab-bar {
  flex-direction: column; border-bottom: none;
  height: 100%; justify-content: flex-start; padding-top: 18px;
}
.tab-bar { display: flex; border-bottom: 1px solid var(--border); background: var(--bg2); flex-shrink: 0; }
.tab-btn {
  padding: 11px 16px; font-size: 11px; font-weight: 600;
  color: var(--text-dim); cursor: pointer; border: none;
  background: transparent; border-bottom: 2px solid transparent;
  transition: all .15s; letter-spacing: .8px; font-family: var(--font-display);
  text-transform: uppercase;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--accent); border-bottom-color: var(--accent);
  background: linear-gradient(180deg, rgba(47,91,234,.08), transparent);
}
.log-count-chip {
  font-size: 11px; color: var(--bg); font-family: var(--font-mono); font-weight: 700;
  background: var(--text-dim); border-radius: 8px; padding: 0 5px; margin-left: 2px;
}
#btn-toggle-panel {
  margin-left: auto; padding: 11px 12px; font-size: 14px; line-height: 1;
  color: var(--text-dim); border-bottom: none; flex-shrink: 0;
}
#btn-toggle-panel:hover { color: var(--accent); background: rgba(47,91,234,.05); }
.right-panel.collapsed #btn-toggle-panel {
  margin-left: 0; width: 44px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 16px 0; border-bottom: none; border-radius: 0; color: var(--text-dim);
}
.right-panel.collapsed #btn-toggle-panel:hover { color: var(--accent); background: rgba(47,91,234,.06); }
.panel-toggle-label {
  font-size: 11px; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; writing-mode: vertical-rl;
  text-orientation: mixed; transform: rotate(180deg);
  color: inherit; font-family: var(--font-display);
}
.panel-toggle-arrow { font-size: 15px; line-height: 1; color: inherit; }
.right-panel:not(.collapsed) .panel-toggle-label { display: none; }

.tab-pane { display: none; flex: 1; overflow: hidden; flex-direction: column; }
.tab-pane.active { display: flex; }

#detail { flex: 1; overflow-y: auto; padding: 16px; }
.detail-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; color: var(--muted); font-size: 12px; text-align: center; padding: 24px;
  line-height: 1.7;
}
.detail-empty-sub { color: var(--muted); font-size: 11px; font-family: var(--font-mono); }

.status-pane, .services-pane {
  flex: 1; overflow-y: auto; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 16px;
}
.status-section-title {
  font-size: 11px; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: 1.2px; font-family: var(--font-display);
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 8px; border-bottom: 1px solid var(--border2);
}
.status-section-sub { font-size: 11px; color: var(--muted); font-weight: 400; font-family: var(--font-mono); letter-spacing: 0; }
.identity-chain { display: grid; grid-template-columns: repeat(2,1fr); gap: 6px; }
.id-step {
  background: var(--surface2); border: 1px solid var(--border2); border-radius: 7px;
  padding: 9px 11px; position: relative; overflow: hidden;
}
.id-step::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--good);
}
.id-step .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; font-family: var(--font-mono); }
.id-step .val { font-size: 11px; color: var(--good); margin-top: 4px; font-weight: 500; font-family: var(--font-mono); }

.scroll-panel {
  background: var(--surface2); border: 1px solid var(--border2); border-radius: 7px;
  padding: 10px 12px; font-size: 11px; overflow-y: auto; max-height: 220px;
}
.agent-row { padding: 7px 0; border-bottom: 1px solid var(--border); }
.agent-row:last-child { border-bottom: none; }
.mcp-row {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 11px;
}
.mcp-row:last-child { border-bottom: none; }
.mcp-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 3px; flex-shrink: 0; }
.mcp-dot.LIVE        { background: var(--volt); box-shadow: 0 0 8px var(--volt); }
.mcp-dot.PROVISIONED { background: var(--hld); opacity: .6; }
.mcp-dot.ERROR       { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.mcp-dot.SCOPE_REQUIRED { background: var(--warn); }
.mcp-name { color: var(--text); font-weight: 600; min-width: 130px; font-size: 11px; font-family: var(--font-display); }
.mcp-note { color: var(--text-dim); font-size: 11px; word-break: break-word; font-family: var(--font-mono); }

/* log tab */
.log-tab-inner { flex: 1; display: flex; flex-direction: column; overflow: hidden; padding: 12px; }
.log-controls { display: flex; gap: 5px; margin-bottom: 8px; align-items: center; flex-shrink: 0; }
.log-filter-btn {
  padding: 3px 10px; border-radius: 5px; font-size: 11px; font-weight: 600;
  border: 1px solid var(--border2); color: var(--muted);
  background: var(--surface2); cursor: pointer; transition: all .1s;
  font-family: var(--font-mono); letter-spacing: .5px;
}
.log-filter-btn.active { background: var(--accent-dk); border-color: var(--accent); color: var(--accent); }
#log {
  flex: 1; overflow-y: auto;
  background: var(--surface2); border: 1px solid var(--border2); border-radius: 7px;
  padding: 10px 12px; font-family: var(--font-mono); font-size: 11px; color: var(--text-dim);
  box-shadow: inset 0 0 30px rgba(0,0,0,.5);
}
.log-line { padding: 2px 0; display: flex; gap: 8px; align-items: flex-start; }
.log-line.hidden { display: none; }
.log-ts  { color: var(--muted); flex-shrink: 0; }
.log-lev { flex-shrink: 0; min-width: 36px; font-weight: 700; font-size: 11px; letter-spacing: .5px; }
.log-msg { flex: 1; word-break: break-all; }
.log-lev.ok   { color: var(--volt); }
.log-lev.fail { color: var(--bad); }
.log-lev.info { color: var(--accent); }
.log-lev.warn { color: var(--warn); }
.log-msg.ok   { color: var(--good); }
.log-msg.fail { color: var(--bad); }
.log-msg.info { color: var(--text-dim); }
.log-msg.warn { color: var(--warn); }

/* ── BUTTONS ─────────────────────────────────────────────────── */
button {
  background: var(--surface2); color: var(--text); border: 1px solid var(--border2);
  border-radius: 7px; padding: 6px 13px; cursor: pointer;
  font-family: var(--font-display); font-size: 12px; font-weight: 600;
  transition: all .15s; white-space: nowrap; letter-spacing: .5px;
}
button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: var(--surface3); box-shadow: 0 0 16px rgba(47,91,234,.12); }
button.primary {
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #ffffff; border-color: var(--accent); font-weight: 700;
  box-shadow: 0 0 20px rgba(47,91,234,.3);
}
button.primary:hover { color: #ffffff; box-shadow: 0 0 28px rgba(47,91,234,.5); transform: translateY(-1px); }
button:disabled { opacity: .3; cursor: not-allowed; }
button.active { border-color: var(--accent); color: var(--accent); background: var(--accent-dk); }
button.btn-sm { padding: 5px 10px; font-size: 11px; }
#btn-stop { border-color: var(--bad) !important; color: var(--bad) !important; }
#btn-stop:hover { background: rgba(220,38,38,.1) !important; box-shadow: var(--glow-red); }

/* ── FILTER PILLS ────────────────────────────────────────────── */
.pill {
  padding: 3px 10px; border-radius: 20px; cursor: pointer;
  font-size: 11px; font-weight: 600; letter-spacing: .5px;
  border: 1px solid var(--border2); color: var(--muted);
  background: var(--surface2); transition: all .15s; user-select: none;
  font-family: var(--font-mono);
}
.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill.active { color: var(--surface2); border-color: transparent; }
.pill.all.active         { background: var(--accent); }
.pill.inbound.active     { background: var(--cat-inbound); color:#fff; }
.pill.agent.active       { background: var(--cat-agent); }
.pill.outbound.active    { background: var(--cat-outbound); }
.pill.mcp.active         { background: var(--cat-mcp); color:#fff; }
.pill.identity.active    { background: var(--cat-identity); }
.pill.gateway.active     { background: var(--cat-gateway); }
.pill.a2a.active         { background: var(--cat-a2a); color:#fff; }
.pill.telemetry.active   { background: var(--cat-telemetry); }

/* ── SCENARIO ROWS (mission cards) ───────────────────────────── */
.sc-row {
  padding: 10px 11px 9px; border: 1px solid var(--border2); border-radius: 9px;
  background: linear-gradient(150deg, var(--surface2), var(--surface));
  margin-bottom: 7px; cursor: pointer;
  transition: all .16s; border-left: 3px solid var(--muted);
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto auto;
  gap: 3px 8px; position: relative; overflow: hidden;
}
.sc-row::after {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 40%;
  background: radial-gradient(ellipse at right, currentColor, transparent 70%);
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
.sc-row.cat-inbound   { border-left-color: var(--cat-inbound); color: var(--cat-inbound); }
.sc-row.cat-agent     { border-left-color: var(--cat-agent); color: var(--cat-agent); }
.sc-row.cat-outbound  { border-left-color: var(--cat-outbound); color: var(--cat-outbound); }
.sc-row.cat-mcp       { border-left-color: var(--cat-mcp); color: var(--cat-mcp); }
.sc-row.cat-identity  { border-left-color: var(--cat-identity); color: var(--cat-identity); }
.sc-row.cat-gateway   { border-left-color: var(--cat-gateway); color: var(--cat-gateway); }
.sc-row.cat-a2a       { border-left-color: var(--cat-a2a); color: var(--cat-a2a); }
.sc-row.cat-telemetry { border-left-color: var(--cat-telemetry); color: var(--cat-telemetry); }
.sc-row:hover     { border-color: var(--border3); transform: translateX(2px); }
.sc-row:hover::after { opacity: .05; }
.sc-row.selected  {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(47,91,234,.3), -3px 0 14px rgba(47,91,234,.12);
}
.sc-row.selected::after { opacity: .07; }
.sc-row.hidden    { display: none; }
.sc-row.running   { border-color: var(--accent); animation: pulse-border 1s ease-in-out infinite; }
@keyframes pulse-border { 0%,100%{ box-shadow: inset 0 0 0 1px rgba(47,91,234,.25); } 50%{ box-shadow: inset 0 0 0 1px rgba(47,91,234,.6), 0 0 16px rgba(47,91,234,.25); } }

.sc-top   { display: flex; align-items: center; gap: 6px; grid-column: 1; }
.sc-badge { grid-column: 2; grid-row: 1/3; display: flex; align-items: center; gap: 5px; }
.sc-num   { font-size: 11px; color: var(--muted); min-width: 22px; font-family: var(--font-mono); font-weight: 600; }
.sc-cat-tag {
  font-size: 11px; color: currentColor; text-transform: uppercase; letter-spacing: .8px;
  font-family: var(--font-mono); font-weight: 600; opacity: .85;
  border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; line-height: 14px;
}
.sc-name  { font-size: 12.5px; color: var(--text); font-weight: 600; grid-column: 1; font-family: var(--font-display); line-height: 1.3; }
.sc-proves{ font-size: 11px; color: var(--text-dim); grid-column: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-mono); }
.sc-run-btn {
  background: transparent; border: 1px solid var(--border2); color: var(--text-dim);
  padding: 3px 7px; border-radius: 5px; cursor: pointer; font-size: 11px;
  line-height: 1; transition: all .15s; flex-shrink: 0; font-family: var(--font-mono);
}
.sc-run-btn:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 10px rgba(47,91,234,.2); }

/* attack/control dot */
.atk-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.atk-dot.attack  { background: var(--bad); box-shadow: 0 0 7px var(--bad); }
.atk-dot.control { background: var(--volt); box-shadow: 0 0 7px var(--volt); }

/* ── BADGES ──────────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 5px;
  font-size: 11px; letter-spacing: .6px; font-weight: 700;
  font-family: var(--font-mono); text-transform: uppercase;
}
.badge.pass    { background: rgba(22,163,74,.16); color: var(--good); box-shadow: inset 0 0 0 1px rgba(22,163,74,.3); }
.badge.fail    { background: rgba(220,38,38,.16);  color: var(--bad); box-shadow: inset 0 0 0 1px rgba(220,38,38,.3); }
.badge.error   { background: rgba(217,119,6,.16); color: var(--warn); box-shadow: inset 0 0 0 1px rgba(217,119,6,.3); }
.badge.pending { background: rgba(90,111,134,.12); color: var(--text-dim); box-shadow: inset 0 0 0 1px var(--border2); }
.badge.notrun   { background: transparent; color: var(--muted); border: 1px dashed var(--border2); font-style: italic; }
.badge.bypassed { background: rgba(255,62,81,.20); color: #ff9eb5; box-shadow: inset 0 0 0 1px rgba(255,62,81,.5); }
.badge.run     { background: rgba(47,91,234,.18); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(47,91,234,.4); animation: led-pulse 1.2s ease-in-out infinite; }
.badge.hld     { background: rgba(124,58,237,.16); color: var(--hld); }
.badge.gcp     { background: rgba(217,119,6,.12);  color: var(--warn); }
.badge.lld     { background: rgba(47,91,234,.12);  color: var(--accent); }

/* ── DETAIL CONTENT ──────────────────────────────────────────── */
.detail-card h3 { font-size: 16px; color: var(--text); font-weight: 700; margin-bottom: 10px; font-family: var(--font-display); letter-spacing: .3px; line-height: 1.25; }
.detail-card .meta-row { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.detail-card p  { font-size: 12.5px; color: var(--text-dim); line-height: 1.65; margin-bottom: 14px; }

.anchor-block {
  background: var(--surface2); border: 1px solid var(--border); border-left: 2px solid var(--hld);
  padding: 9px 12px; border-radius: 7px; margin-bottom: 8px;
}
.anchor-block.lld { border-left-color: var(--accent); }
.anchor-block.gcp { border-left-color: var(--warn); }
.anchor-block .lbl {
  font-size: 11px; color: var(--muted); letter-spacing: 1px;
  text-transform: uppercase; margin-bottom: 6px; font-weight: 700; font-family: var(--font-mono);
}
.anchor-block ul { padding-left: 16px; font-size: 11px; color: var(--text); font-family: var(--font-mono); }
.anchor-block ul li { padding: 2px 0; }
.anchor-block.gcp ul li { color: var(--warn); }
.anchor-block.azure { border-left-color: var(--accent); }
.anchor-block.azure ul li { color: var(--accent); }
.anchor-block.lld ul li { color: var(--accent); }
.quote {
  font-style: italic; font-size: 11.5px; color: var(--text-dim);
  border-left: 2px solid var(--accent); padding: 8px 12px; margin: 12px 0;
  background: rgba(47,91,234,.04); border-radius: 0 7px 7px 0; line-height: 1.6;
}
.quote strong { color: var(--accent); font-style: normal; }

.layer-cards { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.lc {
  background: var(--surface2); border: 1px solid var(--border2); border-radius: 8px;
  padding: 9px 12px; font-size: 11px; transition: all .2s;
}
.lc.allowed { border-left: 3px solid var(--good); }
.lc.blocked { border-left: 3px solid var(--bad); background: rgba(220,38,38,.06); box-shadow: inset 0 0 24px rgba(220,38,38,.05); }
.lc.error   { border-left: 3px solid var(--warn); }
.lc.not_reached { border-left: 3px solid var(--muted); opacity: .5; }
.lc.skipped     { border-left: 3px dashed var(--muted); opacity: .4; }
.lc-header { display: flex; gap: 9px; align-items: center; }
.lc-icon   { font-size: 13px; flex-shrink: 0; width: 16px; text-align: center; font-weight: 700; }
.lc.allowed .lc-icon { color: var(--good); }
.lc.blocked .lc-icon { color: var(--bad); }
.lc.error   .lc-icon { color: var(--warn); }
.lc-name   { flex-shrink: 0; min-width: 96px; color: var(--text); font-weight: 600; font-family: var(--font-mono); font-size: 11px; }
.lc-status { flex-shrink: 0; min-width: 64px; }
.lc-detail { flex: 1; color: var(--text-dim); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); }
.lc-time   { flex-shrink: 0; color: var(--muted); font-size: 11px; min-width: 44px; text-align: right; font-family: var(--font-mono); }
.lc-bar-wrap { margin-top: 6px; background: var(--surface2); border-radius: 3px; height: 3px; overflow: hidden; }
.lc-bar { height: 100%; border-radius: 3px; transition: width .4s; }
.lc.allowed .lc-bar { background: var(--good); box-shadow: 0 0 8px var(--good); }
.lc.blocked .lc-bar { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.lc.error   .lc-bar { background: var(--warn); }
.lc.not_reached .lc-bar { background: var(--muted); }
.lc.skipped .lc-bar     { background: var(--muted); }

.toggle-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.toggle-chip { display: flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 5px; font-size: 11px; cursor: pointer; background: rgba(63,208,255,.07); border: 1px solid rgba(63,208,255,.2); color: var(--text-dim); font-family: var(--font-mono); transition: background .15s; }
.toggle-chip:hover { background: rgba(63,208,255,.14); }
.toggle-chip.off { background: rgba(255,62,81,.08); border-color: rgba(255,62,81,.3); color: var(--bad); text-decoration: line-through; opacity: .75; }
.toggle-chip input { accent-color: var(--accent); width: 12px; height: 12px; cursor: pointer; }

.io-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; margin-bottom: 5px; margin-top: 4px; font-family: var(--font-mono); }
.io-block {
  background: var(--surface2); border: 1px solid var(--border2); border-radius: 7px;
  padding: 10px 12px; margin-bottom: 10px; font-size: 11px; color: var(--text-dim);
  max-height: 130px; overflow-y: auto; white-space: pre-wrap; word-break: break-word;
  line-height: 1.6; font-family: var(--font-mono);
}
.io-block.attack   { border-left: 2px solid var(--bad); color: rgba(255,118,128,.95); background: rgba(220,38,38,.04); }
.io-block.response { border-left: 2px solid var(--good); color: var(--text); }

.btn-sm.primary, .detail-card .primary {
  width: 100%; justify-content: center; display: flex; align-items: center; gap: 6px;
}

/* ── ARCH SVG NODES ──────────────────────────────────────────── */
.node-bg {
  fill: #ffffff; stroke: #d4dae2; stroke-width: 1.6;
  transition: all .35s;
}
.node-bg.idle { fill: #ffffff; stroke: #d4dae2; }
.node-bg.rail { fill: var(--surface2); stroke: var(--border2); }
.rail-bg { fill: url(#rail-grad); }
.node-bg.provisioned { fill: var(--surface); stroke: var(--hld); stroke-width: 1.2; stroke-dasharray: 5 4; opacity: .55; }
.node-bg.thinking {
  fill: #e6ecfd; stroke: var(--flow); stroke-width: 2.5;
  filter: drop-shadow(0 0 12px var(--flow)); animation: node-pulse 1.1s ease-in-out infinite;
}
.node-bg.allowed { fill: #ecfdf3; stroke: var(--good); stroke-width: 2.5; filter: drop-shadow(0 0 8px rgba(22,163,74,.35)); }
.node-bg.blocked { fill: #fef2f2; stroke: var(--bad); stroke-width: 3; filter: drop-shadow(0 0 12px rgba(220,38,38,.35)); animation: node-shake .4s ease-in-out 2; }
.node-bg.error   { fill: #fffbeb; stroke: var(--warn); stroke-width: 2.5; filter: drop-shadow(0 0 8px rgba(217,119,6,.35)); }
@keyframes node-pulse { 0%,100%{ filter: drop-shadow(0 0 6px var(--flow)); } 50%{ filter: drop-shadow(0 0 20px var(--flow)); } }
@keyframes node-shake { 0%,100%{ transform: translateX(0); } 25%{ transform: translateX(-3px); } 75%{ transform: translateX(3px); } }

.node-corner { fill: none; stroke: var(--accent); stroke-width: 1.6; opacity: .6; pointer-events: none; }
.node-num {
  fill: var(--accent); font-size: 11px; font-weight: 700; font-family: var(--font-mono);
  text-anchor: start; pointer-events: none; opacity: .7; letter-spacing: 1px;
}
.node-title { fill: var(--text); font-size: 13.5px; font-weight: 700; text-anchor: middle; pointer-events: none; font-family: var(--font-display); letter-spacing: .5px; }
.node-sub   { fill: var(--text-dim); font-size: 11.5px; text-anchor: middle; pointer-events: none; font-family: var(--font-mono); }
.node-sub.ok  { fill: var(--volt); }
.node-sub.dim { fill: var(--muted); font-size: 11px; }
/* node run-state backgrounds are LIGHT tints (allowed/thinking/error/blocked) — the
   dark base node text stays readable on all of them; blocked gets a red-tinted accent. */
.node-bg.blocked ~ .node-title { fill: #7f1d1d; }
.node-bg.blocked ~ .node-sub   { fill: #991b1b; }
.node-status { fill: #64748b; font-size: 11px; font-weight: 600; text-anchor: middle; pointer-events: none; opacity: 1; letter-spacing: .6px; font-family: var(--font-mono); }
.node-status.live { fill: var(--volt); }
.node-hld   { fill: var(--hld); font-size: 11px; text-anchor: middle; pointer-events: none; font-weight: 600; font-family: var(--font-mono); opacity: .92; }

.edge { stroke: var(--border3); stroke-width: 1.8; fill: none; opacity: .85; }
.edge.feeder { stroke: var(--border2); stroke-width: 1; stroke-dasharray: 2 5; opacity: .25; }
.edge.flowing { stroke: var(--flow); stroke-width: 2.6; stroke-dasharray: 7 5; animation: dash .6s linear infinite; filter: drop-shadow(0 0 4px var(--flow)); }
.edge.allowed { stroke: var(--good); stroke-width: 2.2; opacity: 1; filter: drop-shadow(0 0 3px rgba(22,163,74,.5)); }
.edge.blocked { stroke: var(--bad); stroke-width: 2.6; stroke-dasharray: 4 4; filter: drop-shadow(0 0 4px var(--bad)); }
@keyframes dash { to { stroke-dashoffset: -24; } }

.shield-band { fill: var(--accent); opacity: .015; }
.shield-band-border { fill: none; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 6; opacity: .18; }
.shield-label { fill: var(--accent); opacity: .7; font-size: 11px; letter-spacing: 4px; text-anchor: middle; font-family: var(--font-display); font-weight: 600; }

.legend-chip { pointer-events: none; }
.legend-bg { fill: var(--surface); stroke: var(--border2); stroke-width: 1; opacity: .85; }
.legend-title { fill: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 1.5px; font-family: var(--font-display); }
.legend-item { fill: var(--text-dim); font-size: 11px; font-family: var(--font-mono); }
.legend-item.dim { fill: var(--muted); font-size: 11px; }

/* ── Clickable nodes + explainer hint/tour ───────────────────── */
.arch-svg-wrap svg g[id^="node-"] { cursor: pointer; }
.arch-svg-wrap svg g[id^="node-"] .node-bg { transition: filter .15s, stroke .15s; }
.arch-svg-wrap svg g[id^="node-"]:hover .node-bg.idle {
  stroke: var(--accent); filter: drop-shadow(0 0 8px rgba(47,91,234,.55));
}
.node-bg.explain-active { stroke: var(--accent) !important; stroke-width: 2.6 !important;
  filter: drop-shadow(0 0 14px rgba(47,91,234,.7)) !important; }

.diagram-bar-hint {
  font-size: 11px; color: var(--muted); font-family: var(--font-mono);
  letter-spacing: .4px; animation: hintpulse 2.4s ease-in-out infinite;
}
@keyframes hintpulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
#btn-tour { border-color: var(--border2); color: var(--accent); }
#btn-tour:hover { border-color: var(--accent); background: rgba(47,91,234,.08); }

/* ── Node explainer card ─────────────────────────────────────── */
.node-explainer {
  position: absolute; left: 20px; bottom: 20px; z-index: 12;
  width: 360px; max-width: calc(100% - 40px);
  max-height: calc(100% - 80px); overflow-y: auto;
  background: linear-gradient(160deg, var(--surface), var(--surface2));
  border: 1px solid var(--border2); border-radius: 14px;
  padding: 18px 20px 20px;
  box-shadow: 0 24px 60px rgba(0,0,0,.7), 0 0 40px rgba(47,91,234,.1);
  animation: ne-in .25s cubic-bezier(.2,.8,.2,1);
}
@keyframes ne-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.node-explainer::before {
  content: ''; position: absolute; top: 0; left: 18px; right: 18px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.ne-close {
  position: absolute; top: 12px; right: 12px; width: 24px; height: 24px;
  background: transparent; border: 1px solid var(--border2); border-radius: 6px;
  color: var(--text-dim); cursor: pointer; font-size: 12px; line-height: 1;
}
.ne-close:hover { color: var(--bad); border-color: var(--bad); }
.ne-step {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px;
  color: var(--accent); margin-bottom: 6px;
}
.ne-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.ne-icon {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #ffffff; box-shadow: 0 0 18px rgba(47,91,234,.4);
}
.ne-title {
  font-family: var(--font-display); font-size: 17px; font-weight: 700;
  color: var(--text); letter-spacing: .3px; line-height: 1.2;
}
.ne-tech { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); margin-top: 3px; }
.ne-analogy {
  font-size: 13px; line-height: 1.55; color: var(--text);
  background: rgba(47,91,234,.06); border-left: 2px solid var(--accent);
  padding: 10px 12px; border-radius: 0 8px 8px 0; margin-bottom: 14px;
}
.ne-section { margin-bottom: 13px; }
.ne-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px;
  color: var(--muted); margin-bottom: 7px;
}
.ne-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.ne-list li {
  font-size: 12.5px; line-height: 1.45; color: var(--text-dim);
  padding-left: 16px; position: relative;
}
.ne-list li::before { content: '▸'; position: absolute; left: 0; color: var(--accent); font-size: 11px; top: 1px; }
.ne-list.guard li::before { content: '🛡'; font-size: 11px; }
.ne-list.guard li { color: var(--text); }
.ne-tour-row {
  display: flex; align-items: center; gap: 10px; margin-top: 16px;
  padding-top: 14px; border-top: 1px solid var(--border);
}
.ne-tour-count { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); margin-left: auto; }
.ne-tour-row .btn-sm.primary { margin-left: 0; }

/* ════════════════════════════════════════════════════════════════
   DEFENSE GRID — view tabs, pillar rail, identity ribbon, sub-views
   ════════════════════════════════════════════════════════════════ */
.grid-tabs {
  display: flex; gap: 3px; align-items: center; flex-wrap: nowrap; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border2); border-radius: 10px; padding: 3px;
}
.grid-tab {
  background: transparent; border: 1px solid transparent; border-radius: 7px;
  color: var(--text-dim); font-family: var(--font-display); font-size: 12px; font-weight: 600;
  letter-spacing: .4px; padding: 6px 14px; cursor: pointer; transition: all .15s;
  white-space: nowrap; flex-shrink: 0;
}
.grid-tab:hover { color: var(--text); background: rgba(47,91,234,.06); }
.grid-tab.active {
  color: #ffffff; background: linear-gradient(135deg, var(--accent2), var(--accent));
  box-shadow: 0 0 16px rgba(47,91,234,.35);
}

/* ── Top-bar brand (moved from removed app-sidebar) ── */
.topbar-brand { display: flex; align-items: center; gap: 10px; padding: 0 16px 0 4px; flex-shrink: 0; }
.topbar-logo {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 12px; font-weight: 700; color: #ffffff;
  letter-spacing: -1px; box-shadow: 0 0 16px rgba(47,91,234,.4);
}
.topbar-brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.topbar-brand-text b { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: 1.5px; }
.topbar-brand-text i { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 2.5px; font-style: normal; }

/* ── Scenarios panel: collapse button + reopen handle ── */
.sidebar-collapse-x {
  margin-left: auto; background: transparent; border: 1px solid var(--border2);
  color: var(--text-dim); width: 22px; height: 22px; border-radius: 6px; cursor: pointer;
  font-size: 13px; line-height: 1; flex-shrink: 0;
}
.sidebar-collapse-x:hover { color: var(--accent); border-color: var(--accent); }
.scenarios-reopen {
  display: none; position: absolute; left: 0; top: 14px; z-index: 7;
  background: var(--surface); border: 1px solid var(--border2); border-left: none;
  border-radius: 0 9px 9px 0; color: var(--accent); cursor: pointer;
  padding: 12px 7px; align-items: center; gap: 8px; writing-mode: vertical-rl;
  font-family: var(--font-display); font-size: 11px; letter-spacing: 2px;
  box-shadow: 0 0 18px rgba(47,91,234,.12);
}
.scenarios-reopen .sr-glyph { writing-mode: horizontal-tb; font-size: 14px; }
.workspace.scenarios-hidden .scenarios-reopen { display: flex; }
.scenarios-reopen:hover { background: rgba(47,91,234,.08); }

/* ── Center as a CANVAS (board): dot grid + grab-to-pan ── */
.flow-stage .arch-svg-wrap {
  cursor: grab;
  background:
    radial-gradient(circle at center, rgba(47,91,234,.05) 0%, transparent 60%),
    radial-gradient(rgba(47,91,234,.10) 1px, transparent 1.4px) 0 0 / 30px 30px,
    var(--bg);
}
.flow-stage .arch-svg-wrap.panning { cursor: grabbing; }
.flow-stage .arch-svg-wrap svg { width: 100%; height: 100%; }

/* zoom/pan controls */
.canvas-controls {
  position: absolute; left: 16px; bottom: 16px; z-index: 8;
  display: flex; flex-direction: column; gap: 6px;
}
.cc-btn {
  width: 34px; height: 34px; border-radius: 9px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border2); color: var(--text);
  font-size: 18px; line-height: 1; display: flex; align-items: center; justify-content: center;
  transition: all .15s; box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.cc-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(47,91,234,.08); }
.canvas-hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 8;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  background: rgba(6,10,17,.7); border: 1px solid var(--border); border-radius: 20px;
  padding: 5px 14px; pointer-events: none; backdrop-filter: blur(4px);
  transition: opacity .4s;
}
/* ── Operator walkthrough card ── */
.flow-card {
  position: absolute; right: 22px; bottom: 22px; z-index: 14; width: 400px; max-width: calc(100% - 44px);
  max-height: calc(100% - 44px); overflow-y: auto;
  background: linear-gradient(160deg, var(--surface), var(--surface2));
  border: 1px solid var(--accent); border-radius: 16px; padding: 20px;
  box-shadow: 0 30px 80px rgba(0,0,0,.75), 0 0 50px rgba(47,91,234,.14);
  animation: ne-in .22s cubic-bezier(.2,.8,.2,1);
}
.fc-progress { display: flex; gap: 5px; margin-bottom: 12px; }
.fc-progress i { height: 4px; flex: 1; border-radius: 2px; background: var(--border2); transition: background .3s; }
.fc-progress i.done { background: var(--good); } .fc-progress i.now { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.fc-step { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; color: var(--accent); margin-bottom: 6px; }
.fc-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 10px; line-height: 1.2; }
.fc-verdict { display: inline-block; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 1px;
  padding: 3px 10px; border-radius: 6px; margin-bottom: 12px; }
.fc-verdict.allowed { color: var(--good); background: rgba(22,163,74,.1); border: 1px solid rgba(22,163,74,.4); }
.fc-verdict.blocked { color: var(--bad); background: rgba(220,38,38,.1); border: 1px solid rgba(220,38,38,.4); }
.fc-verdict.error { color: var(--warn); background: rgba(217,119,6,.1); border: 1px solid rgba(217,119,6,.4); }
.fc-verdict.enforced { color: var(--accent); background: rgba(47,91,234,.1); border: 1px solid rgba(47,91,234,.4); }
.svc-live { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px; color: var(--volt);
  border: 1px solid rgba(22,163,74,.4); background: rgba(22,163,74,.06); border-radius: 4px; padding: 1px 6px; margin-left: 6px; }

/* Blueprint export modal */
.export-box { width: min(860px, calc(100vw - 40px)); max-height: calc(100vh - 48px); overflow-y: auto; }
.export-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.export-col { min-width: 0; }
.export-section-lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; color: var(--muted);
  text-transform: uppercase; margin: 18px 0 8px; }
.export-postures { display: flex; gap: 8px; }
.export-posture { flex: 1; cursor: pointer; }
.export-posture input { display: none; }
.export-posture span { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border2); background: var(--bg2); transition: all .15s; }
.export-posture span b { font-family: var(--font-display); font-size: 13px; color: var(--text); }
.export-posture span i { font-style: normal; font-size: 11px; color: var(--muted); }
.export-posture input:checked + span { border-color: var(--accent); background: rgba(47,91,234,.08);
  box-shadow: 0 0 14px rgba(47,91,234,.15); }
.export-artifacts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.export-art { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-dim);
  padding: 8px 10px; border: 1px solid var(--border2); border-radius: 8px; background: var(--bg2); cursor: pointer; }
.export-art input { accent-color: var(--accent); }
.export-hint { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.export-risks { display: flex; flex-wrap: wrap; gap: 6px; }
.export-risk { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-dim);
  padding: 4px 9px; border: 1px solid var(--border2); border-radius: 20px; background: var(--bg2); cursor: pointer; }
.export-risk input { accent-color: var(--bad); }
.export-risk.doc-only { opacity: .5; }
.export-risk.doc-only:hover { opacity: .75; }
.export-risk-hint { font-size: 10px; font-family: var(--font-mono); color: var(--muted); border: 1px solid var(--border2); border-radius: 4px; padding: 1px 5px; margin-left: 4px; vertical-align: middle; }
.export-actions { display: flex; gap: 10px; align-items: center; margin-top: 30px; }
.export-actions .billing-buy-btn { flex: 1; margin: 0; }
.export-actions .btn-sm { white-space: nowrap; }

/* Architecture extensions overlay (configured add-ons on the canvas) */
.arch-extensions { position: absolute; left: 14px; top: 14px; z-index: 9; display: flex; flex-wrap: wrap;
  align-items: center; gap: 6px; max-width: 60%; pointer-events: none; }
.axt-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; color: var(--accent); ;
  background: var(--surface2); border: 1px solid var(--border2); border-radius: 6px; padding: 3px 8px; }
.axt-chip { font-family: var(--font-mono); font-size: 11px; border-radius: 6px; padding: 3px 9px; backdrop-filter: blur(4px); }
.axt-chip.add { color: var(--volt); border: 1px solid rgba(22,163,74,.4); background: rgba(22,163,74,.08); }
.axt-chip.off { color: var(--bad); border: 1px solid rgba(220,38,38,.4); background: rgba(220,38,38,.08); }
.fc-pollist { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fc-pollist li { font-family: var(--font-mono); font-size: 11.5px; line-height: 1.45; color: var(--text-dim);
  padding-left: 16px; position: relative; }
.fc-pollist li::before { content: '▸'; position: absolute; left: 0; color: var(--accent); }
.fc-body { font-size: 13px; line-height: 1.55; color: var(--text-dim); margin-bottom: 12px; }
.fc-attack { color: var(--text-dim); margin-bottom: 12px; line-height: 1.55; }
.fc-payload { font-family: var(--font-mono); font-size: 11px; color: var(--text); background: var(--bg2);
  border: 1px solid var(--border2); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; line-height: 1.5; word-break: break-word; }
.fc-payload span, .fc-take span { display: block; font-size: 11px; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 5px; }
.fc-expect { font-family: var(--font-mono); font-size: 11px; color: var(--accent); }
.fc-why-toggle { background: none; border: none; color: var(--accent); font-family: var(--font-mono); font-size: 11px; cursor: pointer; padding: 0; margin-bottom: 8px; }
.fc-why { font-size: 12px; line-height: 1.55; color: var(--text-dim); margin-bottom: 10px; }
.fc-why ul { margin: 6px 0 0 16px; } .fc-why li { margin-bottom: 4px; }
.fc-principle { font-size: 12.5px; line-height: 1.5; color: var(--text); background: rgba(47,91,234,.06);
  border-left: 2px solid var(--accent); padding: 9px 12px; border-radius: 0 8px 8px 0; margin-bottom: 12px; }
.fc-note { width: 100%; background: var(--bg2); border: 1px solid var(--border2); border-radius: 8px; color: var(--text);
  font-family: var(--font-body); font-size: 12px; padding: 8px 10px; resize: vertical; min-height: 38px; margin-bottom: 12px; }
.fc-learn { font-size: 13.5px; line-height: 1.6; color: var(--text-dim); margin-bottom: 12px; }
.fc-learn b { color: var(--text); }
.fc-take { font-size: 12.5px; line-height: 1.55; color: var(--text); background: rgba(22,163,74,.05);
  border: 1px solid rgba(22,163,74,.25); border-radius: 8px; padding: 10px 12px; }
.fc-btn { width: 100%; padding: 12px; border: none; border-radius: 10px; cursor: pointer;
  background: linear-gradient(135deg, var(--accent2), var(--accent)); color: #ffffff;
  font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: .3px; transition: transform .1s; }
.fc-btn:hover { transform: translateY(-1px); } .fc-btn:disabled { opacity: .6; cursor: default; transform: none; }

.grid-views { flex: 1; min-height: 0; position: relative; display: flex; }
.grid-view { display: none; flex: 1; min-width: 0; min-height: 0; flex-direction: column; }
.grid-view.active { display: flex; }

/* ── Flow view layout: ribbon on top, stage = svg + pillar rail ── */
.flow-stage { flex: 1; min-height: 0; display: flex; position: relative; }
.flow-stage .arch-svg-wrap { flex: 1; min-width: 0; }

/* ── Identity ribbon (advances with the flow) ── */
.identity-ribbon {
  flex-shrink: 0; display: flex; align-items: stretch; gap: 0;
  padding: 9px 14px; background: var(--bg2);
  border-bottom: 1px solid var(--border); overflow-x: auto;
}
.idr-step {
  display: flex; align-items: center; gap: 8px; padding: 4px 10px;
  border-radius: 8px; opacity: .4; transition: all .35s; flex-shrink: 0;
}
.idr-step.done { opacity: .75; }
.idr-step.active {
  opacity: 1; background: rgba(47,91,234,.1);
  box-shadow: 0 0 0 1px var(--accent) inset, 0 0 16px rgba(47,91,234,.18);
}
.idr-ico { font-size: 16px; line-height: 1; }
.idr-text { display: flex; flex-direction: column; line-height: 1.2; }
.idr-actor { font-family: var(--font-display); font-size: 11px; font-weight: 600; color: var(--text); }
.idr-token { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.idr-step.active .idr-token { color: var(--accent); }
.idr-arrow { display: flex; align-items: center; color: var(--muted); font-size: 12px; padding: 0 2px; flex-shrink: 0; }

/* ── Pillar strip (horizontal, lights up live) ── */
.pillar-strip {
  flex-shrink: 0; display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; background: var(--bg2);
  border-bottom: 1px solid var(--border); overflow-x: auto;
}
.ps-label {
  font-family: var(--font-display); font-size: 11px; letter-spacing: 1.5px;
  color: var(--muted); display: flex; align-items: center; gap: 5px; flex-shrink: 0;
}
.ps-label .bar-tick { color: var(--accent); }
.ps-chips { display: flex; gap: 7px; flex-shrink: 0; }
.pillar-chip {
  display: flex; align-items: center; gap: 7px; padding: 6px 11px;
  border: 1px solid var(--border2); border-radius: 8px; background: var(--surface);
  transition: all .3s; flex-shrink: 0;
}
.pillar-chip.active {
  border-color: var(--accent); background: rgba(47,91,234,.12);
  box-shadow: 0 0 16px rgba(47,91,234,.22);
}
.pillar-chip.dim { opacity: .38; }
.pc-ico { font-size: 14px; line-height: 1; }
.pc-name { font-family: var(--font-display); font-size: 11.5px; font-weight: 600; color: var(--text-dim); white-space: nowrap; }
.pillar-chip.active .pc-name { color: var(--accent); }
.ps-divider { width: 1px; align-self: stretch; background: var(--border2); flex-shrink: 0; margin: 2px 2px; }

/* gateway chain mini (horizontal) */
.gw-chain-h { display: flex; gap: 5px; align-items: center; flex-shrink: 0; }
.gw-step {
  display: flex; align-items: center; gap: 4px; font-family: var(--font-mono);
  font-size: 11px; color: var(--text-dim); opacity: .45; transition: all .3s;
}
.gw-step .gw-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border3); flex-shrink: 0; }
.gw-step .gw-n { font-size: 11px; }
.gw-step.done { opacity: .9; }
.gw-step.done .gw-dot { background: var(--good); }
.gw-step.active { opacity: 1; color: var(--accent); }
.gw-step.active .gw-dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* ── SVG actor badges (on nodes, lit during flow) ── */
.actor-badge { opacity: 0; transition: opacity .25s; }
.actor-badge.show { opacity: 1; }
.actor-badge rect { fill: var(--surface); stroke: var(--accent); stroke-width: 1.2; }
.actor-badge text { font-family: var(--font-mono); font-size: 11px; fill: var(--accent2); }

/* ════════ IDENTITY VIEW (swimlane) ════════ */
.idv-wrap { flex: 1; overflow-y: auto; padding: 26px 30px; }
.idv-title { font-family: var(--font-display); font-size: 17px; color: var(--text); margin-bottom: 4px; }
.idv-sub { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); margin-bottom: 22px; }
.idv-chain { display: flex; flex-direction: column; gap: 0; max-width: 760px; }
.idv-hop { display: flex; gap: 16px; }
.idv-rail { display: flex; flex-direction: column; align-items: center; width: 44px; flex-shrink: 0; }
.idv-node {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, #14202e, #0a121c);
  border: 1px solid var(--border2); display: flex; align-items: center;
  justify-content: center; font-size: 20px; transition: all .3s;
}
.idv-hop.active .idv-node { border-color: var(--accent); box-shadow: 0 0 18px rgba(47,91,234,.45); }
.idv-connector { width: 2px; flex: 1; min-height: 30px; background: linear-gradient(var(--accent), var(--border2)); opacity: .5; }
.idv-body { padding-bottom: 26px; }
.idv-actor { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--text); }
.idv-token-pill {
  display: inline-block; font-family: var(--font-mono); font-size: 11px; color: var(--accent);
  background: rgba(47,91,234,.08); border: 1px solid var(--border2); border-radius: 5px;
  padding: 2px 8px; margin: 5px 0 7px;
}
.idv-detail { font-size: 12.5px; line-height: 1.55; color: var(--text-dim); max-width: 640px; }
.idv-replay { margin-bottom: 20px; }

/* ════════ PILLARS VIEW (cards) ════════ */
.pillars-wrap { flex: 1; overflow-y: auto; padding: 24px 28px; }
.pillars-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.pcard {
  border: 1px solid var(--border2); border-radius: 14px; padding: 18px;
  background: linear-gradient(160deg, var(--surface), var(--surface2)); transition: all .2s; cursor: pointer;
}
.pcard:hover { border-color: var(--accent); box-shadow: 0 0 22px rgba(47,91,234,.12); transform: translateY(-2px); }
.pcard-head { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; }
.pcard-ico {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent2), var(--accent)); color: #ffffff;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
  box-shadow: 0 0 18px rgba(47,91,234,.3);
}
.pcard-name { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--text); }
.pcard-cov { font-family: var(--font-mono); font-size: 11px; color: var(--volt); margin-top: 2px; }
.pcard-desc { font-size: 12.5px; line-height: 1.55; color: var(--text-dim); margin-bottom: 12px; }
.pcard-meta { display: flex; flex-direction: column; gap: 6px; }
.pcard-row { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); line-height: 1.4; }
.pcard-row b { color: var(--text); font-weight: 600; }
.pcard-nodes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.pcard-chip {
  font-family: var(--font-mono); font-size: 11px; color: var(--accent);
  background: rgba(47,91,234,.07); border: 1px solid var(--border2);
  border-radius: 5px; padding: 2px 7px;
}

/* ════════ ARCHITECTURE VIEW ════════ */
.arch-wrap { flex: 1; overflow-y: auto; padding: 26px 30px; }
.arch-hero { margin-bottom: 24px; max-width: 820px; }
.arch-hero h2 { font-family: var(--font-display); font-size: 21px; color: var(--text); margin-bottom: 8px; }
.arch-hero p { font-size: 13.5px; line-height: 1.6; color: var(--text-dim); }
.arch-hero .volt { color: var(--volt); }
.arch-layers { display: flex; flex-direction: column; gap: 10px; max-width: 880px; }
.arch-layer {
  display: flex; gap: 16px; align-items: flex-start; padding: 15px 18px;
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 0 11px 11px 0; background: var(--surface);
}
.arch-layer-num { font-family: var(--font-display); font-size: 20px; color: var(--accent); opacity: .5; flex-shrink: 0; width: 34px; }
.arch-layer-body { flex: 1; }
.arch-layer-name { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.arch-layer-desc { font-size: 12.5px; line-height: 1.5; color: var(--text-dim); }
.arch-layer-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.arch-tag { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); background: var(--bg2); border: 1px solid var(--border2); border-radius: 5px; padding: 2px 7px; }
.arch-personas { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.arch-persona { flex: 1; min-width: 220px; border: 1px solid var(--border2); border-radius: 12px; padding: 16px; background: var(--surface); }
.arch-persona-ico { font-size: 22px; margin-bottom: 8px; }
.arch-persona-name { font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 6px; }
.arch-persona-desc { font-size: 12px; line-height: 1.5; color: var(--text-dim); }

/* ── SCROLLBARS ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ════════════════════════════════════════════════════════════════
   LANDING PAGE
   ════════════════════════════════════════════════════════════════ */
#page-landing {
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(ellipse 100% 100% at 50% -10%, #ffffff 0%, #eef1f6 60%);
  display: flex; flex-direction: column;
  transition: opacity .45s ease; overflow: hidden;
}
#page-landing.fade-out { opacity: 0; pointer-events: none; }

.landing-glow {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 60% 55% at 50% 42%, rgba(47,91,234,.16) 0%, transparent 62%),
    radial-gradient(ellipse 45% 45% at 78% 25%, rgba(124,58,237,.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 22% 70%, rgba(22,163,74,.07) 0%, transparent 60%);
}
.landing-grid-floor {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(47,91,234,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47,91,234,.10) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: center;
  mask-image: linear-gradient(180deg, transparent 50%, #000 100%);
  transform: perspective(420px) rotateX(62deg) scale(2.2);
  transform-origin: center 80%;
  opacity: .5;
}
/* radar rings behind hero */
.landing-radar {
  position: absolute; top: 44%; left: 50%; transform: translate(-50%,-50%);
  width: 760px; height: 760px; z-index: 0; pointer-events: none; opacity: .5;
}
.radar-ring {
  position: absolute; inset: 0; margin: auto; border-radius: 50%;
  border: 1px solid rgba(47,91,234,.18);
}
.radar-ring.r1 { width: 30%; height: 30%; }
.radar-ring.r2 { width: 62%; height: 62%; }
.radar-ring.r3 { width: 100%; height: 100%; }
.radar-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(47,91,234,.22) 32deg, transparent 60deg);
  animation: sweep 5s linear infinite;
}
@keyframes sweep { to { transform: rotate(360deg); } }

.landing-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px; height: 70px; position: relative; z-index: 2; flex-shrink: 0;
}
.landing-logo {
  font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: 3px;
  color: var(--text); text-transform: uppercase; display: flex; align-items: center; gap: 10px;
}
.landing-logo-mark { color: var(--accent); font-size: 18px; text-shadow: 0 0 14px var(--accent); }
.landing-logo-accent { color: var(--accent); }
.landing-nav-cta {
  background: transparent; border: 1px solid var(--border3);
  color: var(--text-dim); padding: 9px 22px; border-radius: 7px;
  font-size: 12px; font-weight: 600; cursor: pointer; transition: all .2s;
  font-family: var(--font-display); letter-spacing: 1px;
}
.landing-nav-cta:hover { background: rgba(47,91,234,.1); border-color: var(--accent); color: var(--accent); box-shadow: 0 0 20px rgba(47,91,234,.2); }

.landing-hero {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative; z-index: 2; text-align: center; padding: 0 24px;
}
.landing-eyebrow {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 4px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 34px;
  display: flex; align-items: center; gap: 14px;
  animation: fade-up .8s ease both;
}
.eyebrow-tick { width: 28px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent)); }
.eyebrow-tick:last-child { background: linear-gradient(90deg, var(--accent), transparent); }

.landing-headline {
  font-family: var(--font-display);
  font-size: clamp(42px, 8vw, 104px);
  font-weight: 700; line-height: .96; margin-bottom: 28px;
  letter-spacing: -1px;
}
.headline-line { display: block; opacity: 0; animation: fade-up .8s ease both; }
.headline-line:nth-child(1) { color: var(--text); animation-delay: .1s; }
.headline-line.strong {
  color: var(--accent); animation-delay: .25s; position: relative;
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.headline-line.dim { color: var(--text-dim); animation-delay: .4s; -webkit-text-fill-color: var(--text-dim); }
.headline-cursor {
  -webkit-text-fill-color: var(--accent); color: var(--accent);
  animation: blink 1.1s step-end infinite; margin-left: 6px;
}
@keyframes blink { 0%,50% { opacity: 1; } 51%,100% { opacity: 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

.landing-sub {
  font-size: 15px; color: var(--text-dim); line-height: 1.7;
  max-width: 620px; margin: 0 auto 42px;
  opacity: 0; animation: fade-up .8s ease .55s both;
}
.landing-sub b { color: var(--text); }

.landing-cta-row { opacity: 0; animation: fade-up .8s ease .7s both; }
.landing-cta {
  display: inline-flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, var(--accent2) 0%, var(--accent) 100%);
  border: none; color: #ffffff;
  padding: 16px 44px; font-size: 14px; font-weight: 700;
  border-radius: 9px; cursor: pointer; letter-spacing: 1.5px;
  transition: transform .15s, box-shadow .2s;
  font-family: var(--font-display);
  box-shadow: 0 0 38px rgba(47,91,234,.4);
}
.landing-cta:hover { transform: translateY(-2px); box-shadow: 0 0 50px rgba(47,91,234,.6); color: #ffffff; }
.landing-cta:active { transform: translateY(0); }
.cta-glyph { font-size: 12px; }
.landing-google-btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 34px; background: #fff; color: #3c4043; border-radius: 9px;
  font-size: 15px; font-weight: 600; font-family: var(--font-body);
  text-decoration: none; transition: box-shadow .2s, transform .1s;
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.landing-google-btn:hover { box-shadow: 0 8px 28px rgba(0,0,0,.55); transform: translateY(-2px); }

.landing-stats {
  display: flex; align-items: center; gap: 28px; margin-top: 60px;
  opacity: 0; animation: fade-up .8s ease .9s both;
}
.lstat { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lstat-val { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--text); letter-spacing: -.5px; }
.lstat-val.volt { color: var(--volt); text-shadow: 0 0 18px rgba(22,163,74,.5); }
.lstat-lbl { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 1.5px; }
.lstat-sep { width: 1px; height: 36px; background: var(--border2); }

.landing-footer {
  padding: 20px 48px; text-align: center;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  position: relative; z-index: 2; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  letter-spacing: .3px;
}
.footer-led { width: 6px; height: 6px; border-radius: 50%; background: var(--volt); box-shadow: 0 0 8px var(--volt); animation: led-pulse 1.6s ease-in-out infinite; }

/* ── APP LAYOUT ──────────────────────────────────────────────── */
#page-app { flex-direction: row !important; }
.app-sidebar {
  width: 232px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--surface2) 0%, #eef1f6 100%);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; height: 100vh; overflow: hidden;
  transition: width .2s ease;
}
.app-sidebar.collapsed { width: 52px; }
.app-sidebar.collapsed .sidebar-brand-text,
.app-sidebar.collapsed .sidebar-arch-section,
.app-sidebar.collapsed .sidebar-footer-meta,
.app-sidebar.collapsed .sidebar-footer-links,
.app-sidebar.collapsed .sidebar-user-badge { display: none; }
.app-sidebar.collapsed .sidebar-collapse-btn { transform: rotate(180deg); margin-left: 0; }
.app-sidebar.collapsed .sidebar-brand { justify-content: center; padding: 16px 8px; }

.sidebar-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 18px 16px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.sidebar-brand-text { flex: 1; min-width: 0; }
.sidebar-collapse-btn {
  background: transparent; border: none; color: var(--muted);
  font-size: 17px; cursor: pointer; padding: 2px 4px;
  margin-left: auto; flex-shrink: 0; line-height: 1;
  transition: color .15s, transform .2s; font-family: var(--font-mono);
}
.sidebar-collapse-btn:hover { color: var(--accent); }
.sidebar-logo-mark {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent2) 0%, var(--accent) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #ffffff; letter-spacing: -1px;
  font-family: var(--font-display); box-shadow: 0 0 18px rgba(47,91,234,.4);
}
.sidebar-brand-name { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: 1.5px; line-height: 1.2; font-family: var(--font-display); }
.sidebar-brand-sub { font-size: 11px; color: var(--accent); letter-spacing: 2px; font-family: var(--font-mono); }

.sidebar-arch-section { flex: 1; overflow-y: auto; padding: 10px 10px; display: flex; flex-direction: column; gap: 3px; }
.sidebar-arch-label {
  font-size: 11px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1.5px; padding: 8px 6px 6px; font-family: var(--font-mono);
}
.sidebar-arch-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 8px; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--text-dim);
  transition: all .15s; border: 1px solid transparent; font-family: var(--font-display); letter-spacing: .3px;
}
.sidebar-arch-item:hover { color: var(--text); background: var(--surface2); }
.sidebar-arch-item.active {
  color: var(--accent); background: var(--accent-dk);
  border-color: rgba(47,91,234,.3); box-shadow: inset 0 0 0 1px rgba(47,91,234,.1);
}
.sidebar-arch-count {
  font-size: 11px; font-weight: 600; color: var(--muted);
  background: var(--surface3); border: 1px solid var(--border2);
  border-radius: 10px; padding: 1px 7px; flex-shrink: 0; font-family: var(--font-mono);
}
.sidebar-arch-item.active .sidebar-arch-count { color: var(--accent); border-color: rgba(47,91,234,.4); }
.sidebar-arch-soon { font-size: 11px; color: var(--muted); padding: 12px 6px; font-style: italic; font-family: var(--font-mono); }

.sidebar-footer-area {
  padding: 12px 16px; border-top: 1px solid var(--border); flex-shrink: 0;
  font-size: 11px; color: var(--muted); line-height: 1.6; font-family: var(--font-mono);
}
.sidebar-footer-area a { color: var(--accent); text-decoration: none; }
.sidebar-footer-meta { color: var(--text-dim); font-weight: 500; }
.sidebar-footer-meta b { color: var(--accent); }

.sidebar-user-badge {
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.sidebar-user-email { font-size: 11px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.sidebar-signout-btn { background: transparent; border: none; color: var(--muted); font-size: 11px; font-family: var(--font-display); cursor: pointer; padding: 2px 0; flex-shrink: 0; transition: color .15s; }
.sidebar-signout-btn:hover { color: var(--accent); }

.app-body { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* ── ARCHITECTURE MODAL ──────────────────────────────────────── */
.arch-modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(4, 7, 12, .9);
  display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: 24px 0;
  opacity: 0; transition: opacity .25s ease; backdrop-filter: blur(6px);
}
.arch-modal-overlay.visible { opacity: 1; }
.arch-modal-box {
  background: var(--surface); border: 1px solid var(--border3);
  border-radius: 12px; padding: 22px;
  width: min(1280px, 94vw); max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 40px 100px rgba(0,0,0,.8), 0 0 60px rgba(47,91,234,.08);
}
.arch-modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-shrink: 0; }
.arch-modal-title { font-size: 15px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 10px; font-family: var(--font-display); letter-spacing: .5px; }
.arch-modal-title .badge { font-size: 11px; }
.arch-modal-desc { font-size: 11px; color: var(--text-dim); margin-top: 4px; font-family: var(--font-mono); }
.arch-modal-close {
  background: var(--surface2); border: 1px solid var(--border2);
  color: var(--text-dim); font-size: 16px; line-height: 1; cursor: pointer;
  padding: 6px 12px; border-radius: 6px; font-family: var(--font-display); flex-shrink: 0;
}
.arch-modal-close:hover { color: var(--bad); border-color: var(--bad); }
.arch-modal-body {
  flex: 1; overflow: auto; border-radius: 8px; padding: 14px;
  background:
    radial-gradient(ellipse at 60% 40%, rgba(47,91,234,.05) 0%, transparent 60%),
    var(--bg);
}
.arch-modal-body svg { width: 100%; height: auto; display: block; }

/* ── Use cases / Why surface (light enterprise) ───────────────────── */
.home-hero-cta { margin-top: 22px; }
/* bound the view to the remaining viewport height so .uc-scroll's height:100%
   becomes a real scroll container (was missing → content clipped, no scroll). */
#app-usecases { flex: 1; min-height: 0; min-width: 0; }
.uc-scroll { height: 100%; overflow-y: auto; padding: 30px 46px 80px; max-width: 1180px; margin: 0 auto; }
.uc-hero { padding: 18px 0 30px; border-bottom: 1px solid var(--border); margin-bottom: 30px; }
.uc-hero h1 { font-family: var(--font-display); font-size: clamp(30px, 4.4vw, 50px); font-weight: 800; letter-spacing: -1.2px; line-height: 1.08; margin: 14px 0 16px; color: var(--text); max-width: 880px; }
.uc-accent { color: var(--accent); }
.uc-hero p { font-size: 16px; color: var(--text-dim); line-height: 1.7; max-width: 760px; }
.uc-cta-row { display: flex; gap: 12px; margin-top: 26px; }
.uc-cta { font-family: var(--font-body); font-size: 14px; font-weight: 600; padding: 11px 20px; border-radius: 10px;
  border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; box-shadow: var(--shadow); transition: all .15s; }
.uc-cta:hover { background: var(--accent2); transform: translateY(-1px); }
.uc-cta.ghost { background: var(--surface); color: var(--text); border-color: var(--border2); }
.uc-cta.ghost:hover { border-color: var(--accent); color: var(--accent); }
.uc-section { margin-bottom: 38px; }
.uc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; margin-top: 18px; }
.uc-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); transition: all .15s; }
.uc-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--border2); }
.uc-card-top { display: flex; align-items: center; gap: 11px; margin-bottom: 8px; }
.uc-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-dk); display: flex; align-items: center; justify-content: center; font-size: 19px; }
.uc-name { font-weight: 700; font-size: 15.5px; color: var(--text); }
.uc-q { font-size: 14px; color: var(--accent); font-weight: 600; margin-bottom: 14px; }
.uc-row { display: flex; gap: 10px; font-size: 13px; color: var(--text-dim); line-height: 1.55; margin-bottom: 9px; }
.uc-lbl { flex-shrink: 0; font-size: 10.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; height: fit-content; }
.uc-lbl.pain { color: var(--bad); background: rgba(220,38,38,.08); }
.uc-lbl.gain { color: var(--good); background: rgba(22,163,74,.08); }
.uc-who { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--muted); }
.uc-dials { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 18px; }
.uc-dial { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.uc-dial-name { font-weight: 700; font-size: 13.5px; color: var(--text); margin-bottom: 4px; }
.uc-dial-opts { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); line-height: 1.5; }
.uc-dial-drives { font-size: 12px; color: var(--accent); font-weight: 600; margin-top: 8px; }
.uc-artifacts-head { font-size: 14px; color: var(--text-dim); font-weight: 600; margin: 26px 0 14px; }
.uc-artifacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.uc-artifact { display: flex; align-items: flex-start; gap: 12px; background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 13px 15px; }
.uc-aic { font-size: 18px; }
.uc-at { font-weight: 700; font-size: 13.5px; color: var(--text); }
.uc-ad { font-size: 12px; color: var(--muted); line-height: 1.45; margin-top: 2px; }

/* ── Use-cases: three verbs · personas · wedge · pricing ───────────── */
.uc-verbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 4px 0 34px; }
.uc-verb { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow); }
.uc-verb b { display: block; font-family: var(--font-display); font-size: 15px; color: var(--text); margin-bottom: 6px; }
.uc-verb span { font-size: 13px; color: var(--text-dim); line-height: 1.55; }
.uc-verb i { color: var(--accent); font-style: normal; font-weight: 600; }

.uc-personas { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 16px; }
.uc-persona { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); transition: all .15s; }
.uc-persona:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--border2); }
.uc-persona.star { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.uc-persona-tag { position: absolute; top: -10px; right: 16px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; padding: 3px 10px; border-radius: 20px; }

.uc-wedge { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.uc-wedge-card { border-radius: 16px; padding: 22px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.uc-wedge-card.lead { background: linear-gradient(160deg, #eef3ff, var(--surface)); border-color: #c9d8fb; }
.uc-wedge-card.sticky { background: linear-gradient(160deg, #eafaf0, var(--surface)); border-color: #b6e6c8; }
.uc-wedge-kind { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.uc-wedge-card.lead .uc-wedge-kind { color: var(--accent); }
.uc-wedge-card.sticky .uc-wedge-kind { color: var(--good); }
.uc-wedge-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text); line-height: 1.2; margin-bottom: 8px; }
.uc-wedge-body { font-size: 13.5px; color: var(--text-dim); line-height: 1.6; }

.uc-tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.uc-tier { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 16px; box-shadow: var(--shadow); }
.uc-tier-step { width: 24px; height: 24px; border-radius: 7px; background: var(--accent-dk); color: var(--accent); font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.uc-tier-name { font-weight: 700; font-size: 14px; color: var(--text); }
.uc-tier-price { font-size: 12px; font-weight: 600; color: var(--accent); margin: 2px 0 9px; }
.uc-tier-body { font-size: 12px; color: var(--muted); line-height: 1.5; }
@media (max-width: 900px) { .uc-verbs, .uc-wedge, .uc-tiers { grid-template-columns: 1fr; } }

/* ── Per-component controls & benchmarks (detail panel · control layer) ── */
.anchor-block.ctrl { border-left: 3px solid var(--accent); }
.ctrl-node { background: var(--surface2); border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; margin-bottom: 8px; }
.ctrl-node.off { opacity: .72; border-style: dashed; border-color: var(--warn); }
.ctrl-node-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.ctrl-node-name { font-weight: 700; font-size: 11.5px; color: var(--text); }
.ctrl-state { font-size: 9.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; flex-shrink: 0; }
.ctrl-state.on { color: var(--good); background: rgba(22,163,74,.1); }
.ctrl-state.off { color: var(--warn); background: rgba(217,119,6,.12); }
.ctrl-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 11px; }
.ctrl-node.off .ctrl-row { text-decoration: line-through; color: var(--muted); }
.ctrl-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--accent); }
.ctrl-dot.cat-identity { background: var(--cat-identity); }
.ctrl-dot.cat-content { background: var(--cat-inbound); }
.ctrl-dot.cat-gateway { background: var(--cat-gateway); }
.ctrl-dot.cat-a2a { background: var(--cat-a2a); }
.ctrl-dot.cat-encryption { background: var(--hld); }
.ctrl-dot.cat-network { background: var(--cat-telemetry); }
.ctrl-dot.cat-telemetry { background: var(--cat-telemetry); }
.ctrl-name { flex: 1; color: var(--text-dim); line-height: 1.4; }
.ctrl-ref { font-family: var(--font-mono); font-size: 9.5px; color: var(--muted); flex-shrink: 0; max-width: 42%; text-align: right; }

/* ── Simulate button (deterministic sim, no cloud) ── */
.sim-btn { background: var(--surface); border: 1px solid var(--accent); color: var(--accent); font-weight: 600; }
.sim-btn:hover { background: var(--accent-dk); }
.sim-hint { font-size: 10.5px; color: var(--muted); font-family: var(--font-mono); }

/* ════════ SIMULATION DESIGNER ════════ */
/* fixed (not absolute) so the designer is exactly viewport-height and the inner
   panels — palette / canvas / inspector — scroll independently. */
#app-designer { position: fixed; top: 107px; left: 84px; right: 0; bottom: 0; z-index: 5; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; }
.dz-topbar { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); flex-shrink: 0; }
.dz-topbar .learn-back { position: static; flex-shrink: 0; }
.dz-title { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--text); flex-shrink: 0; white-space: nowrap; }
.dz-title span { display: none; }   /* subtitle is redundant with the canvas hint; drop it to save the row */
/* action cluster: shrinkable + scrolls horizontally on narrow screens so a
   button is never clipped (on wide screens it simply fits with no scrollbar). */
.dz-actions { margin-left: auto; display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; flex: 0 1 auto; min-width: 0; overflow-x: auto; padding-bottom: 1px; scrollbar-width: none; }
.dz-actions::-webkit-scrollbar { display: none; }
.dz-actions .btn-sm { white-space: nowrap; flex-shrink: 0; padding: 6px 10px; }
.dz-actions .btn-sm.primary { width: auto; }   /* override the detail-card width:100% */
.dz-sep { width: 1px; align-self: stretch; margin: 2px 3px; background: var(--border); flex-shrink: 0; }
.dz-select { font-family: var(--font-body); font-size: 12.5px; padding: 6px 9px; border-radius: 8px; border: 1px solid var(--border2); background: var(--surface); color: var(--text); flex: 0 1 180px; min-width: 110px; max-width: 200px; }
.dz-verdict { font-size: 12.5px; font-weight: 600; flex-shrink: 0; }
.dz-verdict.ok { color: var(--good); }
.dz-verdict.bad { color: var(--bad); }
.dz-body { flex: 1; display: flex; min-height: 0; overflow: hidden; }
.dz-palette { width: 220px; flex-shrink: 0; border-right: 1px solid var(--border); background: var(--surface); padding: 14px; overflow-y: auto; min-height: 0; }
.dz-pal-h { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.dz-pal-item { display: flex; align-items: center; gap: 9px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface2); font-size: 13px; font-weight: 600; color: var(--text); cursor: grab; transition: all .12s; }
.dz-pal-item:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateX(2px); }
.dz-pal-item span { font-size: 16px; }
.dz-canvas { flex: 1; position: relative; overflow: auto; background-color: var(--bg);
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 28px 28px; background-position: -1px -1px; }
.dz-edges { position: absolute; inset: 0; width: 2400px; height: 1400px; pointer-events: none; z-index: 1; }
.dz-edge { fill: none; stroke: #94a3b8; stroke-width: 2; marker-end: url(#dz-arr); }
.dz-edge.tmp { stroke: var(--accent); stroke-dasharray: 4 4; }
.dz-nodes { position: absolute; inset: 0; z-index: 2; }
.dz-node { position: absolute; width: 158px; background: var(--surface); border: 1.5px solid var(--border2); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); cursor: grab; user-select: none; transition: box-shadow .12s, border-color .12s; }
.dz-node:hover { box-shadow: var(--shadow-lg); }
.dz-node.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.dz-node.disabled { border-style: dashed; border-color: var(--warn); opacity: .8; }
.dz-node.sim-pass { border-color: var(--good); box-shadow: 0 0 0 2px rgba(22,163,74,.35); }
.dz-node.sim-block { border-color: var(--bad); box-shadow: 0 0 0 2px var(--bad); background: #fef2f2; }
.dz-node-h { display: flex; align-items: center; gap: 8px; }
.dz-node-h b { font-size: 12.5px; font-weight: 700; color: var(--text); line-height: 1.2; }
.dz-node-ic { font-size: 15px; }
.dz-node-sub { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.dz-node.disabled .dz-node-sub { color: var(--warn); font-weight: 600; }
.dz-port { position: absolute; right: -11px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; cursor: crosshair; box-shadow: var(--shadow); }
.dz-hint { position: absolute; top: 40%; left: 50%; transform: translateX(-50%); text-align: center; color: var(--muted); font-size: 13px; max-width: 440px; z-index: 0; }
.dz-inspector { width: 300px; flex-shrink: 0; border-left: 1px solid var(--border); background: var(--surface); padding: 16px; overflow-y: auto; min-height: 0; }
.dz-ins-empty { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.dz-ins-h { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--text); margin-bottom: 12px; }
.dz-ins-h span { font-size: 19px; }
.dz-ins-toggle { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text); padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface2); margin-bottom: 12px; cursor: pointer; }
.dz-ins-hint { font-weight: 400; color: var(--muted); font-size: 11px; }
.dz-ins-ctrls { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.dz-del { color: var(--bad); border-color: var(--border2); width: 100%; }

/* ════════ WORKSPACE DECLUTTER — progressive disclosure ════════ */
/* 1. Flow view = JUST the diagram. The identity ribbon + pillar strip are
   redundant with the Identity / Pillars tabs — remove them from Flow. */
#grid-view-flow > #identity-ribbon,
#grid-view-flow > #pillar-rail { display: none !important; }

/* 2. Collapse the 9 coverage tiles → one compact "OVERALL n/21" chip. */
.cov-pills .cov-cell { display: none; }
.cov-pills .cov-cell.cov-cell-overall { display: flex; align-items: center; gap: 8px;
  flex-direction: row; padding: 6px 14px; border: 1px solid var(--border2);
  border-radius: 9px; background: var(--surface); box-shadow: var(--shadow); }
.cov-pills .cov-cell-overall .label { font-size: 10px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted); font-weight: 700; }
.cov-pills .cov-cell-overall .val { font-size: 15px; font-weight: 800; color: var(--text); }

/* 3. Detail accordion (native <details>) — one section at a time, calm. */
.d-acc { border: 1px solid var(--border); border-radius: 10px; margin-top: 10px; background: var(--surface); overflow: hidden; }
.d-acc > summary { list-style: none; cursor: pointer; padding: 11px 14px; font-size: 12px; font-weight: 700;
  letter-spacing: .4px; text-transform: uppercase; color: var(--text-dim); display: flex; align-items: center; justify-content: space-between; }
.d-acc > summary::-webkit-details-marker { display: none; }
.d-acc > summary::after { content: '▸'; color: var(--muted); transition: transform .15s; }
.d-acc[open] > summary { color: var(--accent); border-bottom: 1px solid var(--border); }
.d-acc[open] > summary::after { transform: rotate(90deg); }
.d-acc-body { padding: 12px 14px; }
.d-acc-body ul { margin: 0; padding-left: 16px; }
.d-acc-body li { font-size: 12px; color: var(--text-dim); line-height: 1.6; margin-bottom: 3px; }

/* 4. Designer entry button in the diagram bar */
#btn-designer { border-color: var(--accent); color: var(--accent); font-weight: 700; }
#btn-designer:hover { background: var(--accent-dk); }

/* ── Designer: attack-suite scorecard + export ── */
.dz-score-h { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--text); margin-bottom: 10px; }
.dz-score-sum { font-size: 13px; color: var(--text-dim); margin-bottom: 14px; padding: 10px 12px; border-radius: 9px; background: var(--surface2); border: 1px solid var(--border); }
.dz-score-sum b { font-size: 17px; }
.dz-score-sum.ok b { color: var(--good); } .dz-score-sum.bad b { color: var(--text); }
.dz-score-sum span { color: var(--bad); font-weight: 600; }
.dz-score-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.dz-score-row { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); font-size: 12px; }
.dz-score-row.ok { background: rgba(22,163,74,.05); } .dz-score-row.bad { background: rgba(220,38,38,.06); border-color: rgba(220,38,38,.25); }
.dz-score-atk { flex: 1; font-weight: 600; color: var(--text); }
.dz-score-v { font-size: 10.5px; color: var(--muted); font-family: var(--font-mono); }
.dz-score-row.bad .dz-score-v { color: var(--bad); font-weight: 700; }
.dz-score-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dz-score-main .dz-score-atk { flex: none; }
.dz-score-main .dz-score-v { display: inline-block; }
.dz-score-ctrl { font-size: 10.5px; color: var(--muted); line-height: 1.4; }
.dz-score-ctrl.bad { color: var(--bad); }
.dz-score-row.clickable { cursor: pointer; transition: background .12s, border-color .12s; }
.dz-score-row.clickable:hover { border-color: var(--accent); background: rgba(47,91,234,.06); }
.dz-score-go { font-size: 10px; font-weight: 700; color: var(--accent); opacity: 0; transition: opacity .12s; margin-top: 1px; }
.dz-score-row.clickable:hover .dz-score-go { opacity: 1; }
.dz-back { background: none; border: none; color: var(--accent); font-size: 12px; font-weight: 600; cursor: pointer; padding: 0 0 10px; }
.dz-probe-tag { font-size: 9px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--accent); background: rgba(47,91,234,.1); padding: 1px 5px; border-radius: 4px; vertical-align: middle; }
.dz-score-hint { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-bottom: 14px; }
.dz-fix-h { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--warn, #ffb627); margin: 14px 0 8px; }
.dz-fix-row { display: flex; gap: 10px; align-items: flex-start; background: rgba(255,182,39,0.07); border: 1px solid rgba(255,182,39,0.2); border-radius: 8px; padding: 10px 12px; margin-bottom: 7px; }
.dz-fix-ic { font-size: 18px; flex-shrink: 0; line-height: 1.3; }
.dz-fix-body { flex: 1; min-width: 0; }
.dz-fix-title { font-size: 12.5px; color: var(--text); line-height: 1.4; margin-bottom: 3px; }
.dz-fix-hint { font-size: 11px; color: var(--text-dim); line-height: 1.45; }
.dz-fix-hint i { color: var(--bad); font-style: normal; font-weight: 600; }
.dz-exp { width: 100%; background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* ── Designer: per-control config + attack detail ── */
.dz-node.partial { border-style: dashed; border-color: var(--warn); }
.dz-node.partial .dz-node-sub { color: var(--warn); font-weight: 600; }
.dz-ins-clbl { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin: 14px 0 8px; }
.dz-ctrl-row { display: flex; align-items: flex-start; gap: 8px; padding: 7px 8px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; cursor: pointer; }
.dz-ctrl-row.off { background: rgba(217,119,6,.06); border-color: rgba(217,119,6,.25); }
.dz-ctrl-row input { margin-top: 2px; }
.dz-ctrl-row .ctrl-dot { margin-top: 5px; }
.dz-ctrl-mid { flex: 1; min-width: 0; }
.dz-ctrl-mid .ctrl-name { display: block; font-size: 12px; color: var(--text); line-height: 1.35; }
.dz-ctrl-stops { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.dz-ctrl-row.off .dz-ctrl-stops { color: var(--bad); }
.dz-ctrl-row .ctrl-ref { font-size: 9.5px; }
.dz-atk-h { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--text); margin-bottom: 8px; }
.dz-atk-desc { font-size: 13px; color: var(--text-dim); line-height: 1.55; margin-bottom: 12px; }
.dz-atk-lbl { font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.dz-atk-pay { font-family: var(--font-mono); font-size: 11px; color: var(--text); background: var(--surface2); border: 1px solid var(--border); border-radius: 7px; padding: 9px 11px; line-height: 1.5; margin-bottom: 12px; word-break: break-word; }
.dz-atk-catch { font-size: 12.5px; color: var(--good); font-weight: 600; margin-bottom: 10px; }
.dz-atk-ref { font-family: var(--font-mono); font-size: 11px; color: var(--accent); }

/* ── Designer cloud toggle (General / GCP / Azure) ── */
.dz-cloud-tabs { display: inline-flex; gap: 2px; background: var(--surface2); border: 1px solid var(--border); border-radius: 9px; padding: 3px; margin-left: 6px; flex-shrink: 0; }
.dz-cloud-tab { font-size: 12.5px; font-weight: 600; color: var(--text-dim, #475569); background: transparent; border: none; border-radius: 7px; padding: 6px 13px; cursor: pointer; transition: all .12s; }
.dz-cloud-tab:hover { color: var(--text); background: rgba(47,91,234,.06); }
.dz-cloud-tab.on { background: var(--accent, #2f5bea); color: #fff; box-shadow: var(--shadow); }

/* ── Designer: step-trace (clarity) + attack authoring form ── */
.dz-trace { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.dz-trace-step { display: flex; gap: 9px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface2); }
.dz-trace-step.blocked { border-color: var(--good); background: rgba(22,163,74,.06); }
.dz-trace-step.bypassed { border-color: var(--bad); background: rgba(220,38,38,.07); }
.dz-trace-n { width: 20px; height: 20px; flex-shrink: 0; border-radius: 6px; background: var(--surface3); color: var(--muted); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.dz-trace-body { flex: 1; min-width: 0; }
.dz-trace-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text); }
.dz-trace-v { font-size: 10px; font-weight: 700; letter-spacing: .4px; padding: 2px 7px; border-radius: 5px; color: var(--muted); background: var(--surface3); }
.dz-trace-step.blocked .dz-trace-v { color: var(--good); background: rgba(22,163,74,.12); }
.dz-trace-step.bypassed .dz-trace-v { color: var(--bad); background: rgba(220,38,38,.12); }
.dz-trace-why { font-size: 11.5px; color: var(--text-dim); line-height: 1.45; margin-top: 3px; }
.dz-trace-ref { font-family: var(--font-mono); font-size: 10px; color: var(--muted); margin-top: 3px; }
/* blast-radius — IAM privilege graph */
.dz-blast { border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; margin-top: 8px; background: var(--surface2); }
.dz-blast.crit { border-color: var(--bad); background: rgba(220,38,38,.05); }
.dz-blast.ok { border-color: var(--good); background: rgba(22,163,74,.05); }
.dz-blast-head { font-size: 12.5px; color: var(--text); margin-bottom: 8px; }
.dz-blast-owner { color: var(--bad); font-weight: 800; letter-spacing: .3px; }
.dz-blast-path { display: flex; flex-direction: column; gap: 7px; margin-bottom: 9px; }
.dz-blast-step { font-size: 11.5px; }
.dz-blast-node { display: inline-block; font-weight: 700; color: var(--text); background: var(--surface3); border-radius: 5px; padding: 2px 7px; }
.dz-blast-node.owner { color: #fff; background: var(--bad); }
.dz-blast-edge { font-family: var(--font-mono); font-size: 10px; color: var(--accent); margin: 0 7px; }
.dz-blast-why { font-size: 11px; color: var(--text-dim); line-height: 1.4; margin-top: 3px; }
.dz-blast-none { font-size: 11.5px; color: var(--good); line-height: 1.45; }
.dz-blast-reach { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-bottom: 8px; }
.dz-blast-lbl { font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); margin-right: 3px; }
.dz-blast-res { font-size: 10.5px; font-weight: 600; color: var(--text-dim); background: var(--surface3); border-radius: 5px; padding: 2px 7px; }
.dz-blast-res.sens { color: var(--bad); background: rgba(220,38,38,.1); }
.dz-blast-cap { font-size: 11px; color: var(--text-dim); line-height: 1.5; border-top: 1px solid var(--border); padding-top: 8px; }
.dz-blast-cap code { font-family: var(--font-mono); font-size: 10px; background: var(--surface3); padding: 1px 4px; border-radius: 4px; color: var(--text); }
.dz-form { display: flex; flex-direction: column; gap: 10px; }
.dz-form label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--text-dim); }
.dz-form input, .dz-form textarea, .dz-form select { font-family: var(--font-body); font-size: 12.5px; padding: 8px 10px; border: 1px solid var(--border2); border-radius: 8px; background: var(--surface); color: var(--text); }
.dz-form-actions { display: flex; gap: 8px; margin-top: 4px; }

/* ── BYO-Agent Red-Team ─────────────────────────────────────────────────── */
#app-redteam { position: absolute; top: 107px; left: 84px; right: 0; bottom: 0; overflow: auto; background: var(--bg); z-index: 5; }
.rt-scroll { max-width: 1180px; margin: 0 auto; padding: 22px 28px 80px; }
.rt-hero { padding: 18px 0 22px; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.rt-hero h1 { font-family: var(--font-display); font-size: 30px; font-weight: 800; color: var(--text); margin: 10px 0 8px; letter-spacing: -.02em; }
.rt-hero p { font-size: 14px; color: var(--text-dim); line-height: 1.6; max-width: 760px; }
.rt-hero .uc-accent { color: var(--accent); }
.rt-grid { display: grid; grid-template-columns: 240px 1fr; gap: 22px; align-items: start; }
.rt-side { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; position: sticky; top: 16px; }
.rt-panel-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.rt-add { border: 1px solid var(--border2); background: var(--surface2); border-radius: 7px; width: 24px; height: 24px; cursor: pointer; color: var(--accent); font-size: 15px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.rt-add:hover { background: var(--accent); color: #fff; }
.rt-targets { display: flex; flex-direction: column; gap: 7px; }
.rt-target { border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; cursor: pointer; transition: all .14s; background: var(--surface); }
.rt-target:hover { border-color: var(--accent); background: rgba(47,91,234,.05); }
.rt-target.active { border-color: var(--accent); background: var(--accent-dk); }
.rt-target-name { font-size: 13px; font-weight: 600; color: var(--text); }
.rt-target-meta { display: flex; gap: 7px; align-items: center; margin-top: 5px; }
.rt-kind { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); background: var(--surface3); border-radius: 5px; padding: 1px 7px; }
.rt-demo { font-size: 10px; color: var(--warn); border: 1px solid var(--warn); border-radius: 5px; padding: 0 6px; }
.rt-muted { color: var(--muted); font-size: 12px; }
.rt-main { min-height: 320px; }
.rt-empty { color: var(--muted); font-size: 14px; padding: 60px 20px; text-align: center; border: 1px dashed var(--border2); border-radius: 12px; }

.rt-form { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px 24px; max-width: 640px; }
.rt-form h2 { font-family: var(--font-display); font-size: 19px; font-weight: 700; margin-bottom: 16px; color: var(--text); }
.rt-form label { display: block; font-size: 12px; color: var(--text-dim); font-weight: 600; margin-bottom: 14px; }
.rt-form input, .rt-form select, .rt-form textarea { display: block; width: 100%; margin-top: 5px; padding: 9px 11px; border: 1px solid var(--border2); border-radius: 8px; background: var(--surface2); color: var(--text); font-size: 13px; font-family: var(--font-sans); box-sizing: border-box; }
.rt-form textarea { font-family: var(--font-mono); font-size: 12px; }
.rt-form input:focus, .rt-form select:focus, .rt-form textarea:focus { outline: none; border-color: var(--accent); }
.rt-adv { margin-bottom: 14px; } .rt-adv summary { cursor: pointer; font-size: 12px; color: var(--accent); font-weight: 600; }
.rt-adv label { margin-top: 12px; }
.rt-hint { font-size: 12px; color: var(--muted); line-height: 1.5; margin-bottom: 14px; min-height: 30px; }
.rt-form-actions { display: flex; gap: 10px; }

.rt-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.rt-detail-head h2 { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--text); }
.rt-run { white-space: nowrap; }
.rt-battery { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.rt-chip { font-size: 11px; padding: 3px 9px; border-radius: 20px; border: 1px solid var(--border2); color: var(--text-dim); background: var(--surface); }
.rt-chip.sev-critical { border-color: var(--bad); color: var(--bad); } .rt-chip.sev-high { border-color: var(--warn); color: var(--warn); }
.rt-running { padding: 28px; text-align: center; color: var(--text-dim); font-size: 14px; }
.rt-spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border2); border-top-color: var(--accent); border-radius: 50%; animation: rt-spin .8s linear infinite; vertical-align: middle; margin-right: 8px; }
@keyframes rt-spin { to { transform: rotate(360deg); } }

.rt-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.rt-score { display: flex; align-items: center; gap: 20px; padding: 22px 24px; border-bottom: 1px solid var(--border); }
.rt-grade-big { font-family: var(--font-display); font-size: 52px; font-weight: 800; width: 84px; height: 84px; display: flex; align-items: center; justify-content: center; border-radius: 16px; }
.g-A { color: #15803d; background: #dcfce7; } .g-B { color: #15803d; background: #ecfdf5; }
.g-C { color: var(--warn); background: #fef3c7; } .g-D { color: #c2410c; background: #ffedd5; } .g-F { color: var(--bad); background: #fee2e2; }
.rt-score-meta { flex: 1; }
.rt-score-num { font-family: var(--font-display); font-size: 30px; font-weight: 800; color: var(--text); } .rt-score-num span { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.rt-score-counts { font-size: 13px; color: var(--text-dim); margin-top: 4px; }
.rt-crit { margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--bad); }
.rt-frameworks { display: flex; gap: 28px; padding: 14px 24px; border-bottom: 1px solid var(--border); flex-wrap: wrap; background: var(--surface2); }
.rt-fw-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-right: 8px; font-weight: 700; }
.rt-fw { font-family: var(--font-mono); font-size: 11px; background: var(--surface3); border-radius: 5px; padding: 2px 8px; margin-right: 5px; color: var(--text-dim); }
.rt-rows { display: flex; flex-direction: column; }
.rt-row { display: grid; grid-template-columns: 110px 1fr auto auto; gap: 12px; align-items: center; padding: 11px 24px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 13px; }
.rt-row:hover { background: var(--surface2); }
.rt-row-v { font-family: var(--font-mono); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 5px; text-align: center; }
.v-vuln .rt-row-v, .rt-row.v-vuln .rt-row-v { background: #fee2e2; color: var(--bad); }
.v-def .rt-row-v { background: #dcfce7; color: #15803d; }
.v-inc .rt-row-v { background: #fef3c7; color: var(--warn); }
.v-err .rt-row-v { background: var(--surface3); color: var(--muted); }
.rt-row-name { color: var(--text); font-weight: 500; }
.rt-row-sev { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.rt-row-sev.sev-critical { color: var(--bad); } .rt-row-sev.sev-high { color: var(--warn); }
span.v-vuln { color: var(--bad); } span.v-def { color: #15803d; } span.v-inc { color: var(--warn); } span.v-err { color: var(--muted); }
.rt-row-detail { padding: 14px 24px 18px; background: var(--surface2); border-bottom: 1px solid var(--border); }
.rt-rd-block { margin-bottom: 10px; } .rt-rd-block b { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); display: block; margin-bottom: 4px; }
.rt-rd-block p { font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.rt-rd-block pre { font-family: var(--font-mono); font-size: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 7px; padding: 9px 11px; white-space: pre-wrap; word-break: break-word; color: var(--text); max-height: 220px; overflow: auto; }
.rt-history { margin-top: 18px; } .rt-hist-row { display: flex; gap: 12px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 12px; color: var(--text-dim); }
.rt-hist-row:hover { color: var(--text); } .rt-grade { font-weight: 800; width: 22px; }
.rt-grade.g-A,.rt-grade.g-B { color: #15803d; } .rt-grade.g-C { color: var(--warn); } .rt-grade.g-D,.rt-grade.g-F { color: var(--bad); }
@media (max-width: 760px) { .rt-grid { grid-template-columns: 1fr; } .rt-side { position: static; } }

/* ── Compliance Command Center ──────────────────────────────────────────── */
#app-compliance { position: absolute; top: 107px; left: 84px; right: 0; bottom: 0; overflow: auto; background: var(--bg); z-index: 5; }
.cc-scroll { max-width: 1100px; margin: 0 auto; padding: 22px 28px 80px; }
.cc-hero { padding: 18px 0 20px; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.cc-hero h1 { font-family: var(--font-display); font-size: 30px; font-weight: 800; margin: 10px 0 8px; letter-spacing: -.02em; }
.cc-hero p { font-size: 14px; color: var(--text-dim); line-height: 1.6; max-width: 780px; }
.cc-hero .uc-accent { color: var(--accent); }
.cc-controls { display: flex; gap: 12px; margin-top: 16px; align-items: center; flex-wrap: wrap; }
.cc-overview { display: grid; grid-template-columns: 230px 1fr; gap: 22px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px 24px; }
.cc-overall { display: flex; gap: 16px; align-items: center; }
.cc-overall-lbl { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.cc-overall-sub { font-size: 13px; color: var(--text-dim); margin-top: 4px; }
.cc-ring { width: 84px; height: 84px; } .cc-ring-bg { fill: none; stroke: var(--surface3); stroke-width: 7; } .cc-ring-fg { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; transform: rotate(-90deg); transform-origin: center; transition: stroke-dashoffset .6s ease; }
.cc-ring-txt { font-family: var(--font-display); font-size: 19px; font-weight: 800; fill: var(--text); text-anchor: middle; }
.cc-fw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cc-fw { text-align: center; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface2); }
.cc-fw .cc-ring { width: 60px; height: 60px; } .cc-fw .cc-ring-txt { font-size: 17px; }
.cc-fw-name { font-size: 12px; font-weight: 700; color: var(--text); margin-top: 4px; }
.cc-fw-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.cc-h2 { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin: 30px 0 12px; color: var(--text); }
.cc-pillars { display: flex; flex-direction: column; gap: 10px; }
.cc-pillar { background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 14px 16px; }
.cc-pillar-top { display: flex; align-items: center; gap: 10px; }
.cc-pillar-name { font-weight: 700; color: var(--text); font-size: 14px; flex: 1; }
.cc-pillar-ev { font-size: 12px; color: var(--muted); }
.cc-pillar-stmt { font-size: 12px; color: var(--text-dim); margin: 7px 0 9px; line-height: 1.5; }
.cc-pillar-ctrls { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-ctrl { font-size: 11px; color: var(--text-dim); background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; } .cc-ctrl b { color: var(--accent); font-family: var(--font-mono); font-size: 10px; }
.cc-status { font: 700 10px var(--font-mono); padding: 2px 8px; border-radius: 5px; text-transform: uppercase; }
.s-proven { background: #dcfce7; color: #15803d; } .s-defined { background: #fef3c7; color: var(--warn); } .s-design { background: var(--surface3); color: var(--muted); } .s-gap { background: #fee2e2; color: var(--bad); }
.cc-gaps { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cc-gaps li { font-size: 13px; color: var(--text-dim); padding: 9px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; }
.cc-note { margin-top: 24px; font-size: 12px; color: var(--muted); line-height: 1.6; padding: 14px 16px; background: var(--surface2); border-radius: 10px; border: 1px solid var(--border); }
@media (max-width: 760px) { .cc-overview { grid-template-columns: 1fr; } }
.cc-trust { margin-top: 14px; font-size: 13px; color: var(--text-dim); padding: 10px 14px; background: var(--accent-dk); border: 1px solid var(--border); border-radius: 9px; }
.cc-trust a { color: var(--accent); font-weight: 600; word-break: break-all; }
.dz-load-menu { position: fixed; top: 150px; right: 24px; z-index: 60; background: var(--surface); border: 1px solid var(--border2); border-radius: 10px; box-shadow: 0 8px 28px rgba(15,23,42,.16); min-width: 240px; max-height: 60vh; overflow: auto; padding: 6px; }
.dz-load-h { font: 700 11px var(--font-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 10px 4px; }
.dz-load-row { padding: 9px 10px; border-radius: 7px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dz-load-row:hover { background: var(--accent-dk); } .dz-load-row b { font-size: 13px; color: var(--text); } .dz-load-row span { font-size: 11px; color: var(--muted); font-family: var(--font-mono); }
.dz-load-empty { padding: 14px; font-size: 12px; color: var(--muted); }
.dz-verdict.ok { color: var(--good); }
.dz-blast-safe { color: var(--good); font-weight: 700; }
.cc-sub2 { font-size: 12px; font-weight: 500; color: var(--muted); }
.cc-agents { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.cc-agents.empty { display: block; font-size: 13px; color: var(--muted); padding: 14px 16px; background: var(--surface2); border: 1px dashed var(--border2); border-radius: 10px; }
.cc-agents.empty a { color: var(--accent); cursor: pointer; font-weight: 600; }
.cc-agent { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; cursor: pointer; transition: all .14s; }
.cc-agent:hover { border-color: var(--accent); background: rgba(47,91,234,.04); }
.cc-grade { font-family: var(--font-display); font-weight: 800; font-size: 22px; width: 36px; text-align: center; }
.cc-agent-name { font-size: 13px; font-weight: 600; color: var(--text); }
.cc-agent-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.cc-kind-tag { font-size: 10px; font-weight: 500; padding: 1px 5px; border-radius: 4px; background: var(--accent-soft, #e8f0fe); color: var(--accent); margin-left: 4px; vertical-align: middle; }
.cc-kind-svc { background: var(--surface2, #f0f0f0); color: var(--muted); }
.rt-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.rt-step { display: flex; gap: 11px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 13px 15px; }
.rt-step-n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font: 700 12px var(--font-mono); display: grid; place-items: center; }
.rt-step b { display: block; font-size: 13px; color: var(--text); margin-bottom: 3px; }
.rt-step span { font-size: 12px; color: var(--text-dim); line-height: 1.45; }
@media (max-width: 760px) { .rt-steps { grid-template-columns: 1fr; } }

/* ── Primary nav rail ───────────────────────────────────────────────────── */
.app-rail { position: fixed; top: 0; left: 0; bottom: 0; width: 84px; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 3px; z-index: 50; }
.rail-brand { font: 800 17px var(--font-display); color: var(--accent); cursor: pointer; padding: 6px 0 14px; }
.rail-item { width: 74px; background: transparent; border: none; border-radius: 10px; padding: 9px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text-dim); transition: all .12s; }
.rail-item:hover { background: var(--surface2); color: var(--text); }
.rail-item.on { background: var(--accent-dk); color: var(--accent); }
.ri-ic { font-size: 18px; line-height: 1; } .ri-lbl { font-size: 9.5px; font-weight: 600; }
.app-body { margin-left: 84px; }

#app-mycloud { position: absolute; top: 107px; left: 84px; right: 0; bottom: 0; overflow-x: hidden; overflow-y: auto; background: var(--bg); z-index: 5; }

/* ── My Cloud ───────────────────────────────────────────────────────────── */
.mc-scroll { max-width: 1180px; margin: 0 auto; padding: 22px 28px 80px; }
.mc-hero { padding: 18px 0 20px; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.mc-hero h1 { font-family: var(--font-display); font-size: 30px; font-weight: 800; margin: 10px 0 8px; letter-spacing: -.02em; }
.mc-hero p { font-size: 14px; color: var(--text-dim); line-height: 1.6; max-width: 800px; }
.mc-hero .uc-accent { color: var(--accent); }
.mc-grid { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; }
.mc-side { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; position: sticky; top: 16px; }
.mc-provs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.mc-prov { font-size: 11px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--border2); background: var(--surface2); color: var(--text-dim); cursor: pointer; }
.mc-prov.on { border-color: var(--accent); background: var(--accent-dk); color: var(--accent); font-weight: 600; }
.mc-prov.soon { opacity: .5; cursor: not-allowed; }
.mc-lbl { display: block; font-size: 12px; font-weight: 600; color: var(--text-dim); margin-bottom: 12px; }
.mc-lbl input { display: block; width: 100%; margin-top: 5px; padding: 9px 11px; border: 1px solid var(--border2); border-radius: 8px; background: var(--surface2); color: var(--text); font-size: 13px; box-sizing: border-box; }
.mc-lbl input:focus { outline: none; border-color: var(--accent); }
.mc-help { margin-top: 14px; } .mc-help summary { cursor: pointer; font-size: 12px; color: var(--accent); font-weight: 600; }
.mc-help p { font-size: 12px; color: var(--text-dim); margin: 8px 0; } .mc-help pre { font-family: var(--font-mono); font-size: 11px; background: var(--surface2); border: 1px solid var(--border); border-radius: 7px; padding: 9px 11px; white-space: pre-wrap; color: var(--text); }
.mc-scans { display: flex; flex-direction: column; gap: 6px; }
.mc-scan-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; cursor: pointer; }
.mc-scan-row:hover { border-color: var(--accent); background: rgba(47,91,234,.04); } .mc-scan-row b { font-size: 12px; color: var(--text); }
.mc-badge { font: 700 10px var(--font-mono); padding: 2px 8px; border-radius: 5px; background: #dcfce7; color: #15803d; } .mc-badge.bad { background: #fee2e2; color: var(--bad); }
.mc-main { min-height: 320px; min-width: 0; overflow: hidden; }
.mc-assess-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.mc-assess-head h2 { font-family: var(--font-mono); font-size: 15px; color: var(--text); }
.mc-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.mc-stat { background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 14px; text-align: center; }
.mc-stat b { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--text); } .mc-stat span { font-size: 11px; color: var(--muted); }
.mc-stat.bad b { color: var(--bad); }
.mc-types { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.mc-type { font: 11px var(--font-mono); background: var(--surface3); border-radius: 5px; padding: 3px 9px; color: var(--text-dim); }
.mc-h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; margin: 18px 0 10px; }
.mc-findings { display: flex; flex-direction: column; gap: 8px; }
.mc-finding { display: flex; gap: 11px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-left-width: 3px; border-radius: 9px; padding: 11px 13px; }
.mc-finding.sev-critical { border-left-color: var(--bad); } .mc-finding.sev-high { border-left-color: var(--warn); } .mc-finding.sev-medium { border-left-color: var(--accent); }
.mc-fsev { font: 700 10px var(--font-mono); text-transform: uppercase; padding: 2px 7px; border-radius: 5px; background: var(--surface3); color: var(--text-dim); flex: none; }
.mc-finding.sev-critical .mc-fsev { background: #fee2e2; color: var(--bad); } .mc-finding.sev-high .mc-fsev { background: #fef3c7; color: var(--warn); }
.mc-ftitle { font-size: 13px; font-weight: 600; color: var(--text); } .mc-fdetail { font-size: 12px; color: var(--text-dim); margin-top: 2px; } .mc-fctrl { font-size: 11px; color: var(--muted); margin-top: 3px; font-family: var(--font-mono); }
@media (max-width: 820px) { .mc-grid { grid-template-columns: 1fr; } .mc-stats { grid-template-columns: repeat(2, 1fr); } }

#app-designer { left: 84px; }
.mc-method-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 12px; }
.mc-method { font-size: 11px; padding: 6px 9px; border-radius: 8px; border: 1px solid var(--border2); background: var(--surface2); color: var(--text-dim); cursor: pointer; }
.mc-method.on { border-color: var(--accent); background: var(--accent-dk); color: var(--accent); font-weight: 600; }
.mc-method-body { display: flex; flex-direction: column; }
.mc-lbl textarea { display: block; width: 100%; margin-top: 5px; padding: 9px 11px; border: 1px solid var(--border2); border-radius: 8px; background: var(--surface2); color: var(--text); font: 12px var(--font-mono); box-sizing: border-box; resize: vertical; }
.mc-cmd { display: flex; align-items: center; gap: 8px; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; margin-bottom: 10px; }
.mc-cmd code { font: 11px var(--font-mono); color: var(--text); flex: 1; overflow: auto; white-space: nowrap; }
.mc-copy { font-size: 10px; border: 1px solid var(--border2); background: var(--surface); border-radius: 6px; padding: 2px 8px; cursor: pointer; color: var(--accent); }
.mc-copy:hover { background: var(--accent); color: #fff; }
.mc-go { width: 100%; margin-top: 4px; }
.mc-note { font-size: 11px; color: var(--muted); line-height: 1.5; margin-top: 8px; }
.mc-file { font-size: 12px; margin-bottom: 10px; color: var(--text-dim); }

.mc-disc { font-size: 12px; color: var(--text-dim); margin-top: 4px; } .mc-disc b { color: var(--accent); }

/* ── My Cloud assessment tabs + browsable inventory ─────────────────────── */
.mc-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 8px 0 16px; flex-wrap: wrap; }
.mc-tab { background: transparent; border: none; border-bottom: 2px solid transparent; padding: 9px 14px; font-size: 13px; font-weight: 600; color: var(--text-dim); cursor: pointer; }
.mc-tab:hover { color: var(--text); } .mc-tab.on { color: var(--accent); border-bottom-color: var(--accent); }
.mc-search { margin-bottom: 12px; } .mc-search input { width: 100%; padding: 9px 12px; border: 1px solid var(--border2); border-radius: 9px; background: var(--surface2); color: var(--text); font-size: 13px; box-sizing: border-box; }
.mc-search input:focus { outline: none; border-color: var(--accent); }
.mc-invgrp { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; background: var(--surface); overflow: hidden; }
.mc-invgrp summary { cursor: pointer; padding: 11px 14px; font-size: 13px; display: flex; gap: 10px; align-items: center; }
.mc-inv-t { font-weight: 700; color: var(--text); text-transform: capitalize; }
.mc-inv-list { border-top: 1px solid var(--border); max-height: 420px; overflow: auto; }
.mc-inv-row { display: grid; grid-template-columns: 1.6fr 1fr 1fr .7fr; gap: 10px; padding: 7px 14px; border-bottom: 1px solid var(--border); font-size: 12px; align-items: center; }
.mc-inv-row:last-child { border-bottom: none; } .mc-inv-row:hover { background: var(--surface2); }
.mc-inv-name { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-inv-meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); } .mc-inv-proj { font-family: var(--font-mono); font-size: 11px; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mc-inv-loc { font-size: 11px; color: var(--muted); }
.mc-idn { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; background: var(--surface); }
.mc-idn.over { border-left: 3px solid var(--bad); }
.mc-idn summary { cursor: pointer; padding: 11px 14px; display: flex; gap: 10px; align-items: center; font-size: 13px; flex-wrap: wrap; }
.mc-idn-kind { font: 10px var(--font-mono); background: var(--surface3); border-radius: 5px; padding: 2px 7px; color: var(--text-dim); }
.mc-idn-name { font-weight: 600; color: var(--text); font-family: var(--font-mono); font-size: 12px; flex: 1; overflow: hidden; text-overflow: ellipsis; }
.mc-idn-flag { font: 700 9px var(--font-mono); background: #fee2e2; color: var(--bad); padding: 2px 7px; border-radius: 5px; }
.mc-idn-roles { padding: 4px 14px 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.mc-idn-binds { border-top: 1px solid var(--border); max-height: 300px; overflow: auto; padding: 8px 14px; }
.mc-bind { display: flex; gap: 10px; align-items: center; padding: 3px 0; font-size: 12px; }
.mc-role { font: 11px var(--font-mono); background: var(--surface2); border: 1px solid var(--border2); border-radius: 5px; padding: 1px 7px; color: var(--text-dim); }
.mc-role.bad { background: #fee2e2; border-color: #fecaca; color: var(--bad); font-weight: 700; }
.mc-on { color: var(--muted); font-family: var(--font-mono); font-size: 11px; }
.mc-projgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.mc-proj { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); font-size: 12px; }
.mc-proj-id { font-family: var(--font-mono); color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mc-projnote { font-size: 12px; color: var(--text-dim); margin-bottom: 12px; line-height: 1.5; }
.mc-proj.noacc { opacity: .6; border-style: dashed; }

/* ── My Cloud real architecture explorer ────────────────────────────────── */
.mc-pselect { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; max-height: 96px; overflow: auto; padding-bottom: 4px; }
.mc-pchip { font: 12px var(--font-mono); padding: 5px 10px; border-radius: 8px; border: 1px solid var(--border2); background: var(--surface2); color: var(--text-dim); cursor: pointer; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.mc-pchip:hover { border-color: var(--accent); } .mc-pchip.on { border-color: var(--accent); background: var(--accent-dk); color: var(--accent); font-weight: 700; }
.mc-pchip span { opacity: .7; margin-left: 4px; }
.mc-projtitle { font-size: 14px; color: var(--text-dim); margin: 6px 0 14px; } .mc-projtitle b { color: var(--text); font-family: var(--font-mono); }
.mc-arch-flow { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 14px; align-items: flex-start; width: 100%; box-sizing: border-box; }
.mc-arch-col { flex: 0 0 240px; background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 10px; }
.mc-arch-colh { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 9px; display: flex; align-items: center; gap: 6px; }
.mc-arch-colh span { margin-left: auto; font: 11px var(--font-mono); color: var(--muted); background: var(--surface3); padding: 1px 7px; border-radius: 10px; }
.mc-arch-cards { display: flex; flex-direction: column; gap: 6px; max-height: 460px; overflow: auto; }
.mc-arch-card { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; cursor: pointer; transition: all .12s;  min-width: 0; }
.mc-arch-card:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(47,91,234,.12); }
.mc-ac-name { font-size: 12px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.mc-ac-type { font: 10px var(--font-mono); color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.mc-drawer { position: fixed; top: 107px; right: 0; bottom: 0; width: 440px; max-width: 90vw; background: var(--surface); border-left: 1px solid var(--border2); box-shadow: -8px 0 28px rgba(15,23,42,.14); z-index: 70; padding: 20px 22px; overflow: auto; }
.mc-drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.mc-dr-name { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text); word-break: break-word; }
.mc-dr-sub { font: 11px var(--font-mono); color: var(--muted); margin-top: 3px; }
.mc-dr-x { border: 1px solid var(--border2); background: var(--surface2); border-radius: 7px; width: 28px; height: 28px; cursor: pointer; color: var(--text-dim); flex: none; }
.mc-dr-grid { display: grid; grid-template-columns: 90px 1fr; gap: 7px 12px; margin-bottom: 18px; }
.mc-dr-k { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); } .mc-dr-v { font-size: 13px; color: var(--text); word-break: break-word; } .mc-dr-v.mono { font: 11px var(--font-mono); color: var(--text-dim); }
.mc-dr-h2 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 8px; border-top: 1px solid var(--border); padding-top: 14px; }
.mc-dr-access { display: flex; flex-direction: column; gap: 5px; }
.dz-ins-members { display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow: auto; margin-top: 6px; }
.dz-mem { display: flex; justify-content: space-between; gap: 8px; padding: 5px 8px; background: var(--surface2); border: 1px solid var(--border); border-radius: 7px; font-size: 11px; }
.dz-mem-name { font-family: var(--font-mono); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-mem-proj { font-family: var(--font-mono); color: var(--accent); flex: none; }
.rt-divider { height: 1px; background: var(--border); margin: 12px 0; }
.rt-cloud-h { font: 700 11px var(--font-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; }
.rt-target.rt-cloud { border-left: 3px solid var(--accent); }
.rt-proj { font: 10px var(--font-mono); color: var(--accent); }
.rt-unreach { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 12px; padding: 18px 20px; margin-bottom: 14px; }
.rt-unreach-h { font-weight: 800; color: #c2410c; font-size: 15px; margin-bottom: 8px; }
.rt-unreach p { font-size: 13px; color: var(--text-dim); line-height: 1.55; margin: 6px 0; }
.rt-unreach-err { font-size: 12px; margin: 8px 0; } .rt-unreach-err code { background: var(--surface3); padding: 2px 7px; border-radius: 5px; font-family: var(--font-mono); word-break: break-all; }

/* ── Connected Environments (My Cloud saved profiles) ── */
.mc-envbar { display:none; flex-wrap:wrap; gap:12px; align-items:stretch; margin:0 0 18px; }
.mc-envbar-h { width:100%; font-size:12px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--text-dim); margin-bottom:2px; }
.mc-env { background:var(--surface,#fff); border:1px solid var(--border,#e2e8f0); border-radius:12px; padding:12px 14px; min-width:230px; max-width:300px; display:flex; flex-direction:column; gap:6px; box-shadow:0 1px 3px rgba(0,0,0,.04); }
.mc-env-top { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.mc-env-name { font-weight:700; font-size:14px; color:var(--text); }
.mc-env-prov { font-size:10px; font-weight:700; color:var(--accent,#2f5bea); background:rgba(47,91,234,.1); border-radius:6px; padding:2px 6px; }
.mc-env-meta { font-size:11px; color:var(--text-dim); }
.mc-env-stats { display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:11px; }
.mc-env-auth { font-size:10px; }
.mc-env-actions { display:flex; gap:6px; margin-top:4px; }
.mc-env-add { align-self:center; border:1px dashed var(--border,#cbd5e1); background:transparent; border-radius:12px; padding:0 16px; color:var(--text-dim); cursor:pointer; font-weight:600; }
.mc-env-add:hover { color:var(--accent,#2f5bea); border-color:var(--accent,#2f5bea); }
.btn-sm.danger { color:#c0392b; }
.btn-sm.danger:hover { background:rgba(192,57,43,.08); }
.mc-save { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--text-dim); margin:8px 0 4px; }
.mc-save input { width:auto; }
.mc-lbl-in { width:100%; padding:7px 10px; border:1px solid var(--border,#e2e8f0); border-radius:8px; font-size:13px; margin-bottom:8px; }
.mc-badge.ok { background:rgba(22,163,74,.12); color:#15803d; }
.mc-badge.bad { background:rgba(192,57,43,.12); color:#c0392b; }

/* ── Designer clarifier banner ── */
.dz-clarify { display:flex; align-items:flex-start; gap:10px; background:rgba(47,91,234,.06); border-bottom:1px solid var(--border,#e2e8f0); padding:10px 18px; font-size:12.5px; line-height:1.5; color:var(--text); }
.dz-clarify-ic { color:var(--accent,#2f5bea); font-weight:700; font-size:14px; flex:none; }
.dz-clarify a { color:var(--accent,#2f5bea); font-weight:600; }
.dz-clarify-x { margin-left:auto; flex:none; border:none; background:transparent; color:var(--text-dim); cursor:pointer; font-size:13px; }

/* ── Red Team scan-diff (drift vs last scan) ── */
.rt-diff { background:rgba(47,91,234,.05); border:1px solid var(--border,#e2e8f0); border-radius:10px; padding:10px 14px; margin:10px 0; }
.rt-diff-h { font-size:12px; font-weight:700; color:var(--text-dim); margin-bottom:4px; }
.rt-diff-counts { font-size:13px; color:var(--text); margin-bottom:6px; }
.rt-diff-row { display:flex; flex-wrap:wrap; gap:6px; margin-top:4px; }
.rt-diff-chip { font-size:11px; padding:2px 8px; border-radius:6px; }
.rt-diff-chip.bad { background:rgba(192,57,43,.1); color:#c0392b; }
.rt-diff-chip.good { background:rgba(22,163,74,.12); color:#15803d; }
.rt-diff-up { color:#15803d; font-weight:700; }
.rt-diff-down { color:#c0392b; font-weight:700; }

/* ── EU AI Act / ISO 42001 readiness view ── */
.cc-viewtabs { display:inline-flex; gap:0; border:1px solid var(--border,#e2e8f0); border-radius:9px; overflow:hidden; }
.cc-viewtab { border:none; background:var(--surface,#fff); padding:8px 14px; font-size:13px; font-weight:600; color:var(--text-dim); cursor:pointer; }
.cc-viewtab.on { background:var(--accent,#2f5bea); color:#fff; }
.rd-top { display:flex; flex-wrap:wrap; gap:16px; align-items:stretch; margin:8px 0 14px; }
.rd-ring { background:var(--surface,#fff); border:1px solid var(--border,#e2e8f0); border-radius:14px; padding:18px 26px; min-width:150px; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.rd-ring-n { font-size:38px; font-weight:800; line-height:1; } .rd-ring-n span { font-size:16px; }
.rd-ring-l { font-size:12px; color:var(--text-dim); margin-top:6px; text-align:center; }
.rd-ring.rd-ok .rd-ring-n { color:#15803d; } .rd-ring.rd-warn .rd-ring-n { color:#d97706; } .rd-ring.rd-bad .rd-ring-n { color:#c0392b; }
.rd-rt-card { background:var(--surface,#fff); border:1px solid var(--border,#e2e8f0); border-radius:14px; padding:16px 22px; display:flex; flex-direction:column; justify-content:center; min-width:200px; }
.rd-rt-h { font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--text-dim); font-weight:700; }
.rd-rt-big { font-size:22px; font-weight:800; margin-top:4px; } .rd-bad-t { color:#c0392b; }
.rd-note { background:rgba(47,91,234,.05); border:1px solid var(--border,#e2e8f0); border-radius:10px; padding:10px 14px; font-size:12.5px; color:var(--text); margin-bottom:8px; }
.rd-list { display:flex; flex-direction:column; gap:8px; }
.rd-row { display:flex; gap:14px; align-items:flex-start; background:var(--surface,#fff); border:1px solid var(--border,#e2e8f0); border-radius:10px; padding:12px 16px; }
.rd-row-ref { font-weight:800; color:var(--accent,#2f5bea); min-width:62px; font-size:13px; }
.rd-row-main { flex:1; } .rd-row-ob { font-size:12.5px; color:var(--text-dim); margin-top:2px; }
.rd-row-rt { font-size:12px; color:#7c4d00; background:rgba(217,119,6,.08); border-radius:6px; padding:3px 8px; margin-top:5px; display:inline-block; }
.rd-badge { font-size:10px; font-weight:700; padding:3px 9px; border-radius:6px; height:fit-content; white-space:nowrap; }
.rd-badge.rd-ok { background:rgba(22,163,74,.14); color:#15803d; } .rd-badge.rd-warn { background:rgba(217,119,6,.14); color:#b45309; } .rd-badge.rd-bad { background:rgba(192,57,43,.12); color:#c0392b; }
.rd-rem-list { list-style:none; padding:0; display:flex; flex-direction:column; gap:8px; }
.rd-rem { background:var(--surface,#fff); border:1px solid var(--border,#e2e8f0); border-left:4px solid #d97706; border-radius:10px; padding:12px 16px; }
.rd-rem.gap { border-left-color:#c0392b; }
.rd-rem-h { font-weight:600; display:flex; align-items:center; gap:8px; }
.rd-rem-ref { font-weight:800; color:var(--accent,#2f5bea); }
.rd-rem ul { margin:6px 0 0; padding-left:20px; font-size:13px; color:var(--text-dim); }

/* ── Profiles (My Cloud auth spine) ── */
.mc-pf-empty { background:var(--surface,#fff); border:1px dashed var(--border,#cbd5e1); border-radius:12px; padding:18px 22px; font-size:14px; display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.mc-pf-head { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.mc-pf-lbl { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--text-dim); }
.mc-pf-hint { font-size:11px; margin-left:auto; }
.mc-conns { display:flex; gap:12px; flex-wrap:wrap; }
.mc-conn { flex:1; min-width:220px; background:var(--surface,#fff); border:1px solid var(--border,#e2e8f0); border-radius:12px; padding:14px 16px; display:flex; flex-direction:column; gap:7px; }
.mc-conn.on { border-color:var(--accent,#2f5bea); box-shadow:0 0 0 1px var(--accent,#2f5bea) inset; }
.mc-conn-h { font-weight:700; font-size:14px; }
.mc-conn-stat { font-size:12px; color:var(--text-dim); display:flex; align-items:center; gap:6px; }
.mc-dot { width:8px; height:8px; border-radius:50%; background:#cbd5e1; display:inline-block; }
.mc-dot.on { background:#16a34a; }
.mc-conn-meta { font-size:12px; color:var(--text-dim); }
.mc-conn-actions { display:flex; gap:6px; margin-top:2px; }

/* ── Red Team: cloud-agent reachability + dual results ── */
.rt-reach { font-size:10px; font-weight:700; padding:1px 6px; border-radius:5px; }
.rt-reach-live { background:rgba(22,163,74,.14); color:#15803d; }
.rt-reach-pos { background:rgba(217,119,6,.14); color:#b45309; }
.rt-reach-unk { background:rgba(100,116,139,.14); color:#64748b; }
.rt-cloud-head h2 { margin:0 0 2px; }
.rt-note-banner { background:rgba(47,91,234,.06); border:1px solid var(--border,#e2e8f0); border-radius:8px; padding:8px 12px; font-size:12.5px; margin-top:8px; }
.rt-dual { display:inline-flex; border:1px solid var(--border,#e2e8f0); border-radius:9px; overflow:hidden; margin:12px 0; }
.rt-dtab { border:none; background:var(--surface,#fff); padding:8px 16px; font-size:13px; font-weight:600; color:var(--text-dim); cursor:pointer; }
.rt-dtab.on { background:var(--accent,#2f5bea); color:#fff; }
.rt-exp { display:flex; flex-direction:column; gap:8px; }
.rt-exp-row { display:flex; gap:12px; align-items:flex-start; background:var(--surface,#fff); border:1px solid var(--border,#e2e8f0); border-left:4px solid #64748b; border-radius:9px; padding:11px 14px; }
.rt-exp-row.sev-high { border-left-color:#c0392b; } .rt-exp-row.sev-medium { border-left-color:#d97706; } .rt-exp-row.sev-info { border-left-color:#16a34a; }
.rt-exp-sev { font-size:10px; font-weight:700; text-transform:uppercase; padding:2px 7px; border-radius:5px; background:rgba(100,116,139,.12); height:fit-content; }
.rt-exp-row.sev-high .rt-exp-sev { background:rgba(192,57,43,.12); color:#c0392b; } .rt-exp-row.sev-medium .rt-exp-sev { background:rgba(217,119,6,.14); color:#b45309; }

/* ── Red Team end-to-end self-test panel ── */
.rt-selftest { margin:0 0 16px; }
.rt-st-head { font-size:13px; color:var(--text-dim); padding:10px 0; display:flex; align-items:center; gap:8px; }
.rt-st-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; background:var(--surface,#fff); border:1px solid var(--border,#e2e8f0); border-left:5px solid #16a34a; border-radius:10px; padding:12px 16px; }
.rt-st-bar.bad { border-left-color:#c0392b; } .rt-st-bar.warn { border-left-color:#d97706; }
.rt-st-title { font-weight:700; font-size:14px; }
.rt-st-score { font-weight:500; font-size:12.5px; color:var(--text-dim); margin-left:8px; }
.rt-st-actions { display:flex; align-items:center; gap:8px; }
.rt-st-rows { display:none; flex-direction:column; gap:1px; margin-top:8px; border:1px solid var(--border,#e2e8f0); border-radius:10px; overflow:hidden; }
.rt-st-rows.open { display:flex; }
.rt-st-row { display:grid; grid-template-columns:24px 220px 1fr; gap:10px; align-items:center; padding:9px 14px; background:var(--surface,#fff); font-size:13px; border-bottom:1px solid var(--border,#eef1f6); }
.rt-st-row.s-fail { background:rgba(192,57,43,.05); } .rt-st-row.s-warn { background:rgba(217,119,6,.05); }
.rt-st-name { font-weight:600; } .rt-st-detail { color:var(--text-dim); font-size:12px; }

.mc-conn-warn { font-size:11.5px; line-height:1.45; color:#b45309; background:rgba(217,119,6,.08); border-radius:7px; padding:6px 9px; }

/* ── Multi-org scan switcher tabs ── */
.mc-org-tabs { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:10px; }
.mc-org-tab { padding:5px 14px; border-radius:20px; border:1px solid var(--border,#e2e8f0); background:var(--surface,#fff); font-size:12px; font-weight:600; cursor:pointer; color:var(--text-dim); }
.mc-org-tab:hover { border-color:var(--accent,#2f5bea); color:var(--accent,#2f5bea); }
.mc-org-tab.on { background:var(--accent,#2f5bea); color:#fff; border-color:var(--accent,#2f5bea); }

/* ── GCP org-picker (multi-org selection on connect) ── */
.mc-org-picker { background:var(--surface,#fff); border:1px solid var(--border,#e2e8f0); border-radius:12px; padding:18px 20px; display:flex; flex-direction:column; gap:12px; }
.mc-org-picker-h { font-weight:700; font-size:15px; }
.mc-org-picker-sub { font-size:12px; }
.mc-org-list { display:flex; flex-direction:column; gap:6px; max-height:260px; overflow-y:auto; }
.mc-org-row { display:flex; align-items:center; gap:10px; padding:8px 10px; border:1px solid var(--border,#e2e8f0); border-radius:8px; cursor:pointer; font-size:13px; }
.mc-org-row:hover { background:var(--surface2,#f8fafc); }
.mc-org-row input[type=checkbox] { accent-color:var(--accent,#2f5bea); width:15px; height:15px; cursor:pointer; }
.mc-org-name { font-weight:600; flex:1; }
.mc-org-id { font-size:11px; font-family:monospace; }
.mc-org-picker-actions { display:flex; gap:8px; padding-top:4px; }

/* ── Red Team cleanup UX + watchdog snapshots ── */
.rt-side-bar { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:4px 0 2px; }
.rt-side-actions { display:flex; gap:6px; }
.rt-mini { border:1px solid var(--border,#e2e8f0); background:var(--surface,#fff); border-radius:7px; padding:3px 8px; font-size:11px; cursor:pointer; color:var(--text-dim); }
.rt-mini:hover { color:var(--accent,#2f5bea); border-color:var(--accent,#2f5bea); }
.rt-mini.warn { color:#b45309; border-color:rgba(217,119,6,.4); }
.rt-mini.warn:hover { background:rgba(217,119,6,.08); }
.rt-target.rt-stale { opacity:.7; border-left:3px solid #d97706; }
.rt-stale-tag { font-size:9px; font-weight:700; background:rgba(217,119,6,.16); color:#b45309; border-radius:5px; padding:1px 5px; margin-left:5px; }
.rt-needkey { font-size:9px; color:var(--text-dim); background:rgba(100,116,139,.1); border-radius:5px; padding:1px 5px; }
.rt-x { float:right; border:none; background:transparent; color:var(--text-dim); cursor:pointer; font-size:12px; line-height:1; padding:0 2px; }
.rt-x:hover { color:#c0392b; }
.rt-watch { display:inline-flex; align-items:center; gap:4px; font-size:11px; color:var(--text-dim); cursor:pointer; }
.rt-watch.on { color:#15803d; font-weight:600; }
.rt-watch input { width:auto; }
.rt-dots { display:inline-flex; gap:2px; align-items:center; }
.rt-dot { width:7px; height:7px; border-radius:50%; display:inline-block; background:#cbd5e1; }
.rt-dot.d-ok { background:#16a34a; } .rt-dot.d-warn { background:#d97706; } .rt-dot.d-bad { background:#c0392b; }

/* ── Red Team: pipeline / attack-path view + preview ── */
.rt-pipe { background:var(--surface,#fff); border:1px solid var(--border,#e2e8f0); border-radius:12px; padding:14px 16px; margin:8px 0 14px; }
.rt-pipe-h { font-size:12.5px; font-weight:700; color:var(--text); margin-bottom:10px; }
.rt-pchain { display:flex; align-items:stretch; gap:4px; flex-wrap:wrap; }
.rt-pstage { flex:1; min-width:96px; border:1px solid var(--border,#e2e8f0); border-radius:9px; padding:9px 8px; text-align:center; background:#fff; }
.rt-pstage-ic { width:22px; height:22px; line-height:22px; border-radius:50%; margin:0 auto 5px; font-weight:800; color:#fff; font-size:12px; }
.rt-pstage-name { font-size:11px; font-weight:600; color:var(--text); line-height:1.25; }
.rt-pstage.ps-ok .rt-pstage-ic { background:#16a34a; } .rt-pstage.ps-ok { border-color:rgba(22,163,74,.4); }
.rt-pstage.ps-warn .rt-pstage-ic { background:#d97706; } .rt-pstage.ps-warn { border-color:rgba(217,119,6,.4); }
.rt-pstage.ps-gap .rt-pstage-ic { background:#c0392b; } .rt-pstage.ps-gap { border-color:rgba(192,57,43,.45); background:rgba(192,57,43,.04); }
.rt-pstage.ps-risk .rt-pstage-ic { background:#c0392b; } .rt-pstage.ps-risk { border-color:rgba(192,57,43,.45); background:rgba(192,57,43,.04); }
.rt-pstage.ps-na .rt-pstage-ic { background:#94a3b8; }
.rt-parrow { align-self:center; color:var(--text-dim); font-size:15px; }
.rt-pdetails { margin-top:10px; display:flex; flex-direction:column; gap:5px; }
.rt-pdetail { font-size:12px; padding:6px 10px; border-radius:7px; background:rgba(100,116,139,.06); }
.rt-pdetail.ps-gap, .rt-pdetail.ps-risk { background:rgba(192,57,43,.07); color:#8a2a1f; }
.rt-pdetail.ps-warn { background:rgba(217,119,6,.08); color:#7c4d00; }
.rt-attack-cta { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:6px 0 14px; }
.rt-sub-h { font-size:14px; margin:14px 0 8px; }

/* ── Designer: real-resources grouped by project + real-map tip ── */
.dz-memproj { margin:4px 0; }
.dz-memproj > summary { cursor:pointer; font-size:12px; font-weight:600; color:var(--text); padding:4px 2px; list-style:none; }
.dz-memproj > summary::-webkit-details-marker { display:none; }
.dz-memproj-n { font-size:10px; color:var(--text-dim); background:rgba(100,116,139,.12); border-radius:5px; padding:1px 6px; margin-left:4px; }
.dz-mem-type { font-size:10px; color:var(--text-dim); }
.dz-realmap-tip { font-size:11.5px; color:var(--text-dim); background:rgba(47,91,234,.06); border-radius:7px; padding:7px 10px; margin-top:8px; line-height:1.45; }
.dz-realmap-tip a { color:var(--accent,#2f5bea); font-weight:600; cursor:pointer; }

/* ── My Cloud: Flow / cross-project connections ── */
.mc-flow-note { background:rgba(47,91,234,.06); border:1px solid var(--border,#e2e8f0); border-radius:10px; padding:10px 14px; font-size:12.5px; line-height:1.5; margin-bottom:6px; }
.mc-flinks { display:flex; flex-direction:column; gap:6px; margin-bottom:6px; }
.mc-flink { font-size:13px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.mc-fproj { font-weight:600; background:rgba(100,116,139,.1); border-radius:6px; padding:2px 8px; font-size:12px; }
.mc-fproj.to { background:rgba(47,91,234,.1); color:var(--accent,#2f5bea); }
.mc-farrow { color:var(--text-dim); }
.mc-fedges { display:flex; flex-direction:column; gap:5px; }
.mc-fedge { display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:12.5px; background:var(--surface,#fff); border:1px solid var(--border,#e2e8f0); border-left:3px solid #94a3b8; border-radius:8px; padding:7px 11px; }
.mc-fedge.over { border-left-color:#c0392b; background:rgba(192,57,43,.04); }
.mc-fe-sa { font-weight:700; }
.mc-fe-from { font-size:11px; color:var(--text-dim); background:rgba(100,116,139,.1); border-radius:5px; padding:1px 6px; }
.mc-fe-role { font-family:ui-monospace,Menlo,monospace; font-size:11px; }
.mc-fe-role.bad { color:#c0392b; font-weight:700; }
.mc-fe-on { font-weight:600; }
.mc-fe-to { font-size:11.5px; color:var(--accent,#2f5bea); }

/* ── My Cloud: cross-project flow MAP (project graph) ── */
.mc-flowmap { background:var(--surface,#fff); border:1px solid var(--border,#e2e8f0); border-radius:12px; padding:12px 14px; margin:8px 0 14px; }
.mc-flowmap-h { font-size:12.5px; font-weight:700; margin-bottom:4px; }
.mc-flowsvg { width:100%; height:auto; display:block; }

/* ── Designer: bottom real-resources panel + scan-gap badge ── */
.dz-bottom { display:none; border-top:1px solid var(--border,#e2e8f0); background:var(--surface,#fff); max-height:240px; overflow:auto; padding:10px 14px; }
.dz-bot-h { display:flex; align-items:center; gap:12px; flex-wrap:wrap; font-size:12.5px; font-weight:700; margin-bottom:8px; }
.dz-bot-search { flex:0 0 220px; padding:5px 9px; border:1px solid var(--border,#e2e8f0); border-radius:7px; font-size:12px; font-weight:400; }
.dz-bot-link { color:var(--accent,#2f5bea); font-weight:600; font-size:11.5px; cursor:pointer; margin-left:auto; }
.dz-bot-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:10px; }
.dz-memproj-col { border:1px solid var(--border,#e2e8f0); border-radius:9px; padding:8px 10px; }
.dz-memproj-h { font-size:12px; font-weight:700; margin-bottom:5px; }
.dz-memproj-n { font-size:10px; color:var(--text-dim); background:rgba(100,116,139,.12); border-radius:5px; padding:1px 6px; }
.dz-mem { display:flex; justify-content:space-between; gap:8px; padding:2px 0; font-size:11.5px; }
.dz-mem-name { font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dz-mem-type { color:var(--text-dim); font-size:10px; flex:none; }
.dz-ctrl-gap { font-size:9px; font-weight:800; color:#c0392b; background:rgba(192,57,43,.12); border-radius:4px; padding:1px 5px; }
