:root {
  --bg: #fafaf7;
  --bg-2: #ffffff;
  --paper: #ffffff;
  --paper-2: #f5f5f0;
  --line: #d9d8d2;
  --line-strong: #b4b3ac;
  --ink: #0a0a0a;
  --ink-2: #1f1f1f;
  --muted: #5a5a55;
  --dim: #8e8d86;

  --indigo: #2b3a8c;        
  --indigo-deep: #1e2a66;
  --emerald: #047857;       
  --emerald-deep: #064e3b;
  --magenta: #9d174d;       
  --magenta-deep: #6b0d34;
  --teal: #0f766e;
  --amber: #b45309;         
  --amber-bg: #fef3c7;
  --crimson: #991b1b;       
  --crimson-bg: #fee2e2;
  --moss: #15803d;          
  --moss-bg: #dcfce7;
  --gold: #a16207;

  --shadow-1: 0 1px 0 #fff inset, 0 1px 2px rgba(0,0,0,0.06);
  --shadow-2: 0 2px 0 #fff inset, 0 4px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 2px 0 #fff inset, 0 8px 20px rgba(0,0,0,0.12);
  --emboss-text: 1px 1px 0 rgba(255,255,255,0.85), -1px -1px 0 rgba(0,0,0,0.18);
  --emboss-text-strong: 1px 1px 0 rgba(255,255,255,1), -1px -1px 0 rgba(0,0,0,0.25);
  --radius: 8px;
}

* { box-sizing: border-box; }
html, body { margin: 0; color: var(--ink);
  font: 14px/1.5 "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; font-weight: 500; }
body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 480px at 10% -8%, rgba(43, 58, 140, 0.06), transparent 60%),
    radial-gradient(900px 400px at 95% -5%, rgba(157, 23, 77, 0.05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
code, pre, .mono { font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace; }
a { color: var(--indigo); text-decoration: none; font-weight: 600; transition: color 0.12s; }
a:hover { color: var(--magenta); }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 16px 24px;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  border-bottom: 2px solid var(--line);
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; gap: 14px; align-items: center; min-width: 0; }
.brand .logo {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--indigo), var(--magenta));
  border-radius: 9px;
  display: grid; place-items: center;
  font-size: 18px; font-weight: 900; color: #fff;
  text-shadow: -1px -1px 0 rgba(0,0,0,0.25);
  box-shadow: 0 4px 12px rgba(43,58,140,0.35), 0 1px 0 #fff inset;
}
.brand-mark {
  width: 40px; height: 40px; border-radius: 9px; flex: 0 0 auto;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--indigo), var(--magenta));
  box-shadow: 0 4px 12px rgba(43,58,140,0.35), 0 1px 0 #fff inset;
}
/* ── Pre-auth sign-in landing ── */
#authLanding { position: fixed; inset: 0; z-index: 99999; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(125% 105% at 50% -5%, #161b2c 0%, #0b0e18 58%, #070810 100%); }
.authl-bg { position: absolute; inset: 0; opacity: 0.55; }
.authl-bg svg { width: 100%; height: 100%; display: block; }
.authl-link { fill: none; stroke: rgba(124,150,230,0.22); stroke-width: 1.4; stroke-dasharray: 6 9;
  animation: authldash 22s linear infinite; }
@keyframes authldash { to { stroke-dashoffset: -300; } }
.authl-pulse { fill: #79b8ff; filter: drop-shadow(0 0 6px rgba(121,184,255,0.85)); }
.authl-node { fill: none; stroke: rgba(124,150,230,0.26); stroke-width: 1.3; }
.authl-root { stroke: rgba(245,165,36,0.5); }
.authl-ou { stroke: rgba(124,92,255,0.42); }
.authl-card { position: relative; z-index: 2; text-align: center; max-width: 470px; margin: 20px; padding: 42px 38px;
  background: rgba(18,22,34,0.74); border: 1px solid rgba(124,150,230,0.22); border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55); backdrop-filter: blur(10px); animation: authlrise 0.6s ease both; }
@keyframes authlrise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.authl-mark { width: 96px; height: 96px; margin: 0 auto 20px; border-radius: 24px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--indigo, #2b3a8c), var(--magenta, #a02b6e));
  box-shadow: 0 14px 34px rgba(43,58,140,0.55), 0 1px 0 rgba(255,255,255,0.4) inset; }
.authl-name { margin: 0 0 12px; font-size: 30px; font-weight: 800; letter-spacing: -0.5px; color: #fff; }
.authl-name span { color: #79b8ff; }
.authl-tag { margin: 0 auto 26px; max-width: 380px; font-size: 14.5px; line-height: 1.65; color: #aeb6c8; }
.authl-btn { font: inherit; font-size: 15px; font-weight: 700; color: #fff; cursor: pointer; padding: 12px 28px; border-radius: 12px; border: none;
  background: linear-gradient(135deg, #5468ff, #7c5cff); box-shadow: 0 8px 22px rgba(84,104,255,0.45);
  display: inline-flex; align-items: center; gap: 8px; transition: transform 0.12s, box-shadow 0.12s; }
.authl-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(84,104,255,0.62); }
.authl-btn span { transition: transform 0.12s; } .authl-btn:hover span { transform: translateX(3px); }
.authl-foot { margin-top: 16px; font-size: 12px; color: #6b7488; letter-spacing: 0.02em; }
.authl-form { display: flex; flex-direction: column; gap: 11px; margin-top: 4px; }
.authl-input { font: inherit; font-size: 15px; color: #eef1f7; padding: 12px 15px; border-radius: 11px;
  border: 1px solid rgba(124,150,230,0.26); background: rgba(10,13,22,0.6); transition: border-color 0.12s, box-shadow 0.12s; }
.authl-input::placeholder { color: #6b7488; }
.authl-input:focus { outline: none; border-color: #79b8ff; box-shadow: 0 0 0 3px rgba(121,184,255,0.18); }
.authl-form .authl-btn { width: 100%; justify-content: center; margin-top: 3px; }
.authl-err { min-height: 16px; font-size: 12.5px; color: #ff9a9a; text-align: left; }
.authl-note { font-size: 13px; color: #aeb6c8; text-align: left; margin-bottom: 2px; }
.authl-sso { margin-top: 14px; font: inherit; font-size: 12.5px; color: #8aa0d8; background: none; border: none; cursor: pointer; }
.authl-sso:hover { color: #aebef0; text-decoration: underline; }
.brand h1 {
  margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -0.2px;
  color: var(--ink); text-shadow: var(--emboss-text-strong);
}
.brand h1 .brand-tld { color: var(--accent, #79b8ff); font-weight: 800; }
.home-hero { margin: 4px 0 18px; }
.home-hero-title { font-size: 30px; font-weight: 800; letter-spacing: -0.6px; color: var(--ink); }
.home-hero-title .brand-tld { color: var(--accent, #79b8ff); }
.home-hero-sub { margin-top: 7px; font-size: 15px; line-height: 1.55; color: var(--muted); max-width: 72ch; }
.home-pills { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.pill-action { font: inherit; font-size: 12.5px; font-weight: 700; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--accent, #79b8ff); background: rgba(121,184,255,0.12); color: var(--accent, #79b8ff); cursor: pointer; transition: background .12s ease; }
.pill-action:hover { background: rgba(121,184,255,0.22); }
.pill-action[hidden] { display: none; }
.home-map { margin: 20px 0 6px; }
.home-map-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.home-cards-h { margin: 24px 0 12px; }
.brand .sub { margin: 0; color: var(--muted); font-size: 12px; font-weight: 500; max-width: 62ch; }
.actions .pill .commit-chip { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; font-weight: 700; color: var(--ink); }
.brand .sub .commit-chip {
  display: inline-block; padding: 1px 8px; border-radius: 4px;
  background: var(--paper-2); border: 1px solid var(--line);
  color: var(--indigo-deep); font-family: "JetBrains Mono", monospace; font-size: 11px;
  font-weight: 700;
}
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.pill {
  padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 11px; color: var(--ink); background: var(--paper);
  display: inline-flex; align-items: center; gap: 7px; font-weight: 600;
  text-shadow: 0 1px 0 #fff;
  box-shadow: var(--shadow-1);
}
.pill.ghost { color: var(--muted); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.pill.good .dot, .pill .dot.good { background: var(--moss); box-shadow: 0 0 0 2px rgba(21,128,61,0.18); }
.pill.warn .dot, .pill .dot.warn { background: var(--amber); box-shadow: 0 0 0 2px rgba(180,83,9,0.18); }
.pill.bad  .dot, .pill .dot.bad  { background: var(--crimson); box-shadow: 0 0 0 2px rgba(153,27,27,0.18); }
.pill.good { color: var(--moss); border-color: rgba(21,128,61,0.35); background: var(--moss-bg); }
.pill.warn { color: var(--amber); border-color: rgba(180,83,9,0.35); background: var(--amber-bg); }
.pill.bad  { color: var(--crimson); border-color: rgba(153,27,27,0.35); background: var(--crimson-bg); }
.pill.live .dot { background: var(--moss); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(21,128,61,0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(21,128,61,0); }
}

.btn {
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 7px;
  padding: 8px 14px; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 700;
  text-shadow: var(--emboss-text);
  box-shadow: var(--shadow-1);
  transition: all 0.12s ease;
}
.btn:hover {
  border-color: var(--indigo); color: var(--indigo);
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.18) inset;
}
.btn.primary {
  background: linear-gradient(180deg, var(--emerald) 0%, var(--emerald-deep) 100%);
  color: #fff; border-color: var(--emerald-deep); font-weight: 800;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 4px 14px rgba(4,120,87,0.35);
}
.btn.primary:hover {
  color: #fff; border-color: var(--emerald-deep);
  background: linear-gradient(180deg, #059669 0%, var(--emerald) 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 6px 18px rgba(4,120,87,0.5);
}
.btn.violet {
  background: linear-gradient(180deg, var(--magenta) 0%, var(--magenta-deep) 100%);
  color: #fff; border-color: var(--magenta-deep); font-weight: 800;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 4px 14px rgba(157,23,77,0.35);
}
.btn.violet:hover {
  color: #fff; border-color: var(--magenta-deep);
  background: linear-gradient(180deg, #be185d 0%, var(--magenta) 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 6px 18px rgba(157,23,77,0.5);
}
.btn.ghost { background: var(--paper); }
.btn.ghost:hover { background: var(--paper-2); color: var(--magenta); border-color: var(--magenta); }
.btn.sm { padding: 5px 11px; font-size: 11px; }
.btn:disabled {
  opacity: 0.45; cursor: not-allowed; transform: none;
  background: var(--paper-2); color: var(--dim); border-color: var(--line);
  text-shadow: none; box-shadow: none;
}
.btn:disabled:hover { transform: none; box-shadow: none; }

.shell { padding: 20px 24px 40px; max-width: 1360px; margin: 0 auto; }
.grid-2 {
  display: grid; gap: 18px;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: start;
}

.pipeline-card {
  margin-bottom: 18px; padding: 18px 22px;
  background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  position: relative; overflow: hidden;
}
.pipeline-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--indigo), var(--magenta));
}
.pipe-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pipe-head h2 {
  margin: 0; font-size: 11px; color: var(--muted); font-weight: 700;
  letter-spacing: 0.8px; text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
  text-shadow: 0 1px 0 #fff;
}
.pipe-stages { display: flex; gap: 7px; margin-top: 14px; flex-wrap: wrap; }
.stage {
  padding: 6px 12px; border-radius: 6px;
  font-size: 12px; font-weight: 700;
  background: var(--paper-2); border: 1px solid var(--line-strong);
  display: inline-flex; align-items: center; gap: 7px;
  cursor: pointer;
  text-shadow: 0 1px 0 #fff;
  box-shadow: var(--shadow-1);
  transition: all 0.12s ease;
}
.stage:hover { border-color: var(--indigo); color: var(--indigo); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.stage .sdot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.stage.Succeeded { background: var(--moss-bg); border-color: rgba(21,128,61,0.4); color: var(--moss); }
.stage.Succeeded .sdot { background: var(--moss); }
.stage.InProgress { background: #dbeafe; border-color: rgba(43,58,140,0.4); color: var(--indigo); }
.stage.InProgress .sdot { background: var(--indigo); animation: pulse 1.4s ease-in-out infinite; }
.stage.Failed { background: var(--crimson-bg); border-color: rgba(153,27,27,0.45); color: var(--crimson); }
.stage.Failed .sdot { background: var(--crimson); }
.stage.Stopped, .stage.Cancelled { background: var(--amber-bg); border-color: rgba(180,83,9,0.4); color: var(--amber); }
.stage.Stopped .sdot, .stage.Cancelled .sdot { background: var(--amber); }
.pipe-last { margin-top: 12px; color: var(--muted); font-size: 11.5px; font-weight: 500; }

.ready-head { display: flex; gap: 18px; align-items: center; padding: 16px;
  border-radius: 11px; border: 1px solid var(--line-strong); background: var(--paper-2); margin-bottom: 14px; }
.ready-v-ready { border-color: rgba(16,185,129,0.55); }
.ready-v-attention { border-color: rgba(217,119,6,0.55); }
.ready-v-blocked { border-color: rgba(220,38,38,0.55); }
.ready-score { width: 70px; height: 70px; border-radius: 50%; flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 1px 3px rgba(0,0,0,0.25); }
.ready-v-ready .ready-score { background: linear-gradient(180deg, #10b981, #0e9268); }
.ready-v-attention .ready-score { background: linear-gradient(180deg, #f59e0b, #b45309); }
.ready-v-blocked .ready-score { background: linear-gradient(180deg, #ef4444, #b91c1c); }
.ready-score-n { font-size: 25px; font-weight: 800; line-height: 1; }
.ready-score-l { font-size: 9px; text-transform: uppercase; letter-spacing: 1px; opacity: 0.85; margin-top: 2px; }
.ready-verdict { font-size: 15px; font-weight: 800; color: var(--ink); }
.ready-counts { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.ready-list { display: flex; flex-direction: column; gap: 6px; }
.ready-row { display: grid; grid-template-columns: 62px 210px 1fr; gap: 12px; align-items: center;
  padding: 8px 12px; border-radius: 7px; background: var(--paper-2); border: 1px solid var(--line); font-size: 12.5px; }
.ready-badge { text-align: center; font-size: 9.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.4px; padding: 4px 0; border-radius: 4px; color: #fff; }
.ready-badge.ready-pass { background: #0e9268; }
.ready-badge.ready-warn { background: #b45309; }
.ready-badge.ready-fail { background: #b91c1c; }
.ready-badge.ready-skip { background: #64748b; }
.ready-badge.ready-info { background: #2b3a8c; }
.ready-label { font-weight: 700; color: var(--ink); }
.ready-detail { color: var(--muted); }
.pipe-last code { color: var(--indigo); background: var(--paper-2); padding: 1px 6px; border-radius: 3px; border: 1px solid var(--line); }

.tabs {
  display: flex; gap: 4px; padding: 5px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 14px;
  overflow-x: auto;
  box-shadow: var(--shadow-1);
}
.tab {
  background: transparent; color: var(--muted); border: none;
  padding: 9px 16px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700;
  border-radius: 6px; white-space: nowrap;
  text-shadow: 0 1px 0 #fff;
  transition: all 0.12s ease;
}
.tab:hover { color: var(--magenta); background: var(--paper-2); }
.tab.active {
  color: #fff; font-weight: 800;
  background: linear-gradient(180deg, var(--indigo) 0%, var(--indigo-deep) 100%);
  text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
  box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 4px 12px rgba(43,58,140,0.35);
}

.tabpanel { display: none; }
.tabpanel.active { display: block; }
.tabpanel h3 {
  margin: 22px 0 10px; font-size: 11px; color: var(--ink);
  font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase;
  text-shadow: var(--emboss-text);
}

.filters {
  display: flex; gap: 10px; align-items: center;
  margin-bottom: 12px; padding: 12px 14px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius);
  flex-wrap: wrap;
  box-shadow: var(--shadow-1);
}
.filters label { display: flex; gap: 7px; align-items: center; font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.filters select, .filters input, .card input, .card select, .card textarea {
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 6px;
  padding: 8px 11px; font: inherit; font-size: 13px; font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04) inset;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.filters select:focus, .filters input:focus,
.card input:focus, .card select:focus, .card textarea:focus {
  outline: none; border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(43,58,140,0.18), 0 1px 2px rgba(0,0,0,0.04) inset;
}
.filters input { min-width: 220px; flex: 1; }
#acctCount { margin-left: auto; color: var(--muted); font-size: 11.5px; font-weight: 700; }

.grid {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-2);
}
.grid th, .grid td {
  padding: 10px 14px; text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px; vertical-align: top;
}
.grid th {
  background: linear-gradient(180deg, var(--paper-2) 0%, #e8e6df 100%);
  color: var(--ink); font-weight: 800; font-size: 10.5px;
  letter-spacing: 0.6px; text-transform: uppercase;
  text-shadow: 0 1px 0 #fff;
  border-bottom: 2px solid var(--line-strong);
}
.grid tr:last-child td { border-bottom: 0; }
.grid tr:hover td { background: #fffbeb; }
.grid .yes { color: var(--moss); font-weight: 700; }
.grid .no { color: var(--dim); }
.grid .ou {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11.5px; color: var(--indigo); font-weight: 700;
}
.grid .kind-mandatory {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  background: linear-gradient(180deg, #fef3c7, #fde68a);
  border: 1px solid rgba(180,83,9,0.35);
  color: var(--amber); font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
  box-shadow: 0 1px 0 #fff inset;
}
.grid .kind-workload {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  background: linear-gradient(180deg, #e0e7ff, #c7d2fe);
  border: 1px solid rgba(43,58,140,0.35);
  color: var(--indigo); font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
  box-shadow: 0 1px 0 #fff inset;
}
.grid .chip {
  display: inline-block; padding: 2px 8px; margin: 2px 2px 0 0;
  background: linear-gradient(180deg, #fff, var(--paper-2));
  border: 1px solid var(--line-strong); border-radius: 4px;
  font-family: "JetBrains Mono", monospace; font-size: 10.5px;
  color: var(--ink); font-weight: 600;
  box-shadow: 0 1px 0 #fff inset;
}
.grid .chip.svc { color: var(--magenta); border-color: rgba(157,23,77,0.4); }
.grid .chip.acct { color: var(--teal); border-color: rgba(15,118,110,0.4); }

.card {
  background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-2);
  position: relative; max-width: 880px;
}
.card h2 {
  margin: 0 0 8px; font-size: 18px; font-weight: 800;
  text-shadow: var(--emboss-text-strong); color: var(--ink);
  display: flex; align-items: center; gap: 9px;
}
.card > p.muted { margin-top: 4px; font-weight: 500; }
.card label {
  display: block; margin: 14px 0 5px;
  font-size: 10.5px; color: var(--muted);
  font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase;
  text-shadow: 0 1px 0 #fff;
}
.card label.check {
  display: inline-flex; gap: 8px; align-items: center; margin-top: 30px;
  color: var(--ink); text-transform: none; letter-spacing: 0;
  font-weight: 700; font-size: 13px;
}
.card input[type=text], .card input[type=email], .card input:not([type]), .card select, .card textarea {
  width: 100%;
}
.card textarea { resize: vertical; min-height: 56px; font-family: inherit; }
.card .row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.card .row > label { flex: 1 1 240px; min-width: 0; }
.card .row > label.check { flex: 0 0 auto; margin-top: 34px; }
.card .row.actions { margin-top: 20px; }

.muted { color: var(--muted); font-weight: 500; }
.small { font-size: 11.5px; }

.errors {
  margin-top: 16px; padding: 13px 16px;
  background: var(--crimson-bg);
  border: 1px solid rgba(153,27,27,0.4);
  color: var(--crimson); border-radius: 7px; font-size: 13px; font-weight: 600;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
}
.errors ul { margin: 6px 0 0 22px; padding: 0; }

.diff {
  margin-top: 16px; padding: 14px;
  background: #f8f7f2; border: 1px solid var(--line-strong);
  border-radius: 7px; color: var(--ink);
  font-size: 12px; line-height: 1.55; font-weight: 500;
  white-space: pre-wrap; overflow-x: auto;
  position: relative;
}
.diff::before {
  content: "YAML"; position: absolute; top: 6px; right: 10px;
  font-size: 9.5px; color: var(--dim); letter-spacing: 1px; font-weight: 700;
}

.auto-panel {
  position: sticky; top: 100px;
  background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-2);
  position: relative; overflow: hidden;
}
.auto-panel::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--magenta), var(--gold));
}
.auto-panel h2 {
  margin: 0 0 4px; font-size: 15px; font-weight: 800;
  display: flex; align-items: center; gap: 8px;
  text-shadow: var(--emboss-text-strong);
}
.auto-panel .safety {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 4px;
  background: linear-gradient(180deg, #fef3c7, #fde68a);
  color: var(--amber);
  border: 1px solid rgba(180,83,9,0.4);
  font-size: 10px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
  box-shadow: 0 1px 0 #fff inset;
}
.auto-panel .preface { color: var(--muted); font-size: 11.5px; margin: 4px 0 14px; line-height: 1.55; font-weight: 500; }

.stepper { display: flex; flex-direction: column; gap: 0; margin-top: 8px; position: relative; }
.step {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; position: relative;
}
.step:not(:last-child)::after {
  content: ""; position: absolute;
  left: 14px; top: 38px; bottom: -8px; width: 2px;
  background: var(--line-strong);
}
.step.active:not(:last-child)::after { background: var(--indigo); }
.step.done:not(:last-child)::after { background: var(--moss); }
.step .ico {
  flex: 0 0 30px; width: 30px; height: 30px;
  border-radius: 50%; display: grid; place-items: center;
  background: var(--paper-2); border: 1.5px solid var(--line-strong);
  color: var(--muted); font-size: 12px; font-weight: 800;
  z-index: 1; transition: all 0.25s;
  text-shadow: 0 1px 0 #fff;
  box-shadow: var(--shadow-1);
}
.step.active .ico {
  background: linear-gradient(180deg, var(--indigo), var(--indigo-deep));
  color: #fff; border-color: var(--indigo-deep);
  box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 0 0 4px rgba(43,58,140,0.2);
  text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
}
.step.done .ico {
  background: linear-gradient(180deg, var(--moss), #166534);
  color: #fff; border-color: #166534;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
  box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset;
}
.step.preview .ico {
  background: var(--paper); color: var(--indigo); border-color: var(--indigo);
  border-style: dashed; text-shadow: none;
}
.step.preview:not(:last-child)::after { background: var(--indigo); opacity: 0.5; }

.step.downstream { opacity: 0.6; }
.step.downstream .ico {
  background: transparent; border-style: dashed; border-color: var(--line-strong);
  color: var(--muted); box-shadow: none; text-shadow: none;
}
.flow-divider {
  font-size: 9px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--muted); margin: 12px 0 8px 40px;
}
.step .body { flex: 1; min-width: 0; }
.step .title { font-size: 13px; font-weight: 800; color: var(--ink); text-shadow: 0 1px 0 #fff; }
.step .desc { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; font-weight: 500; }
.step .meta {
  margin-top: 5px; font-family: "JetBrains Mono", monospace; font-size: 10.5px;
  color: var(--indigo); background: var(--paper-2); padding: 3px 7px;
  border-radius: 3px; display: inline-block; border: 1px solid var(--line); font-weight: 700;
}

.auto-actions { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.auto-status {
  margin-top: 14px; padding: 11px 13px; border-radius: 7px;
  background: var(--paper-2); border: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted); font-weight: 600;
  text-shadow: 0 1px 0 #fff;
}
.auto-status.ok {
  color: var(--moss); border-color: rgba(21,128,61,0.4);
  background: var(--moss-bg);
}

.assign-head {
  margin: 22px 0 10px !important;
  font-size: 10.5px !important; color: var(--ink) !important;
  font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase;
  text-shadow: 0 1px 0 #fff;
}
.assign-list {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--paper-2);
  border: 1px solid var(--line-strong); border-radius: 7px;
  padding: 8px;
  max-height: 260px; overflow-y: auto;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04) inset;
}
.card label.assign-item {
  display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline;
  padding: 7px 9px; border-radius: 5px;
  cursor: pointer; transition: all 0.12s;
  text-transform: none; letter-spacing: 0;
  font-size: 12.5px; color: var(--ink); font-weight: 600;
  margin: 0;
}
.assign-item:hover { background: #fffbeb; box-shadow: 0 1px 0 #fff inset, 0 2px 4px rgba(0,0,0,0.05); }
.assign-item input[type=checkbox] { width: auto; margin: 0; flex: 0 0 auto; }
.assign-item .assign-name {
  font-family: "JetBrains Mono", monospace; font-size: 12px;
  color: var(--magenta); font-weight: 700; flex: 0 0 auto;
}
.assign-item .assign-target {
  font-family: "JetBrains Mono", monospace; font-size: 10.5px; flex: 1 1 auto;
  color: var(--muted); font-weight: 500;
}

.result-card {
  margin-top: 16px; padding: 18px;
  background: linear-gradient(180deg, var(--moss-bg) 0%, #bbf7d0 100%);
  border: 1px solid rgba(21,128,61,0.4);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
}
.result-card.dry {
  background: linear-gradient(180deg, var(--amber-bg) 0%, #fde68a 100%);
  border-color: rgba(180,83,9,0.4);
}
.result-card.err {
  background: linear-gradient(180deg, var(--crimson-bg) 0%, #fecaca 100%);
  border-color: rgba(153,27,27,0.4);
}
.result-card h3 { margin: 0 0 8px; font-size: 15px; font-weight: 800; text-shadow: var(--emboss-text-strong); }
.result-card .row { display: grid; grid-template-columns: 110px 1fr; gap: 8px; font-size: 12.5px; margin-top: 5px; font-weight: 600; }
.result-card .row span { color: var(--muted); font-weight: 700; }
.result-card code { color: var(--indigo); background: rgba(255,255,255,0.7); padding: 2px 7px; border-radius: 3px; font-size: 11.5px; border: 1px solid var(--line); font-weight: 700; }
.result-card .links { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

.scp-grid .bar {
  display: inline-block; width: 140px; height: 9px;
  background: var(--paper-2); border-radius: 5px; overflow: hidden;
  vertical-align: middle; margin-right: 8px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05) inset;
}
.scp-grid .fill { height: 100%; background: linear-gradient(90deg, var(--moss), #22c55e); border-radius: 5px; transition: width 0.4s; }
.scp-grid .fill.warn { background: linear-gradient(90deg, var(--amber), #f59e0b); }
.scp-grid .fill.full { background: linear-gradient(90deg, var(--crimson), #ef4444); }

.dryrun-badge {
  margin-top: 6px; padding: 7px 10px; border-radius: 5px;
  font-size: 11.5px; line-height: 1.5; font-weight: 500;
  border: 1px solid var(--line);
}
.dryrun-badge b { font-weight: 800; letter-spacing: 0.4px; margin-right: 6px; }
.dryrun-pass    { background: var(--moss-bg);    border-color: rgba(21,128,61,0.4);  color: var(--moss); }
.dryrun-fail    { background: var(--crimson-bg); border-color: rgba(153,27,27,0.45); color: var(--crimson); }
.dryrun-error   { background: var(--crimson-bg); border-color: rgba(153,27,27,0.45); color: var(--crimson); }
.dryrun-manual  { background: var(--amber-bg);   border-color: rgba(180,83,9,0.4);   color: var(--amber); }
.dryrun-pending { background: var(--paper-2);    border-color: var(--line-strong);   color: var(--muted); }
.dryrun-unknown { background: var(--paper-2);    border-color: var(--line-strong);   color: var(--muted); }

.error-card {
  margin-top: 14px; padding: 14px 16px;
  background: var(--crimson-bg);
  border: 1.5px solid rgba(153,27,27,0.4);
  border-left-width: 5px;
  border-radius: 7px;
  box-shadow: var(--shadow-2);
}
.error-card-head {
  display: flex; gap: 12px; align-items: flex-start;
  justify-content: space-between; flex-wrap: wrap;
}
.error-card-text { flex: 1 1 280px; min-width: 0; }
.error-card-title {
  font-weight: 800; font-size: 13px; color: var(--crimson);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
}
.error-card-msg {
  font-size: 12.5px; font-weight: 500; color: var(--ink); line-height: 1.5;
}
.error-card-msg ul { margin: 6px 0 0 18px; padding: 0; }
.error-card-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.error-card-actions .btn { font-size: 11px; padding: 5px 10px; }
.error-card-actions .btn.analyze,
.stage-analyze .btn.analyze {
  background: linear-gradient(180deg, var(--indigo) 0%, var(--indigo-deep) 100%);
  color: #fff; border-color: var(--indigo-deep); font-weight: 700;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
  box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 2px 8px rgba(43,58,140,0.3);
}
.error-card-actions .btn.analyze:hover,
.stage-analyze .btn.analyze:hover {
  border-color: var(--indigo-deep); color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 4px 12px rgba(43,58,140,0.4);
}
.error-card-analysis {
  margin-top: 12px; padding: 12px 14px;
  background: rgba(255,255,255,0.7); border: 1px solid var(--line);
  border-radius: 6px; font-size: 12.5px; line-height: 1.55; color: var(--ink);
}
.error-card-analysis-content { white-space: pre-wrap; }
.error-card-analysis .model-tag {
  display: inline-block; margin-top: 10px; padding: 2px 8px; border-radius: 3px;
  background: var(--paper-2); border: 1px solid var(--line);
  font-family: "JetBrains Mono", monospace; font-size: 10px; color: var(--muted);
}
.error-card-analysis .loading {
  display: inline-flex; align-items: center; gap: 8px; color: var(--muted);
}
.error-card-analysis .loading::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--line-strong); border-top-color: var(--indigo);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-toasts {
  position: fixed; top: 80px; right: 20px; z-index: 90;
  display: flex; flex-direction: column; gap: 10px;
  width: min(440px, calc(100vw - 40px));
  pointer-events: none;
}
.error-toasts .error-card { pointer-events: auto; margin: 0; }

.mode-switch {
  display: inline-flex; gap: 0; padding: 3px;
  background: var(--paper-2); border: 1px solid var(--line-strong);
  border-radius: 7px;
  box-shadow: var(--shadow-1);
  margin-right: 4px;
}
.mode-switch .mode {
  background: transparent; color: var(--muted); border: none;
  padding: 5px 14px; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700;
  border-radius: 5px; text-transform: uppercase; letter-spacing: 0.5px;
  text-shadow: 0 1px 0 #fff;
  transition: all 0.12s ease;
}
.mode-switch .mode:hover { color: var(--magenta); }
.mode-switch .mode.active {
  color: #fff;
  background: linear-gradient(180deg, var(--magenta) 0%, var(--magenta-deep) 100%);
  text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
  box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 3px 10px rgba(157,23,77,0.3);
}

body.mode-lza .tab[data-mode="migration"],
body.mode-lza .tabpanel[data-mode="migration"] { display: none !important; }
body.mode-migration .tab[data-mode="lza"],
body.mode-migration .tabpanel[data-mode="lza"] { display: none !important; }

body.mode-migration #writesPill {
  border-color: rgba(157,23,77,0.5);
}

body.theme-dark {
  --bg: #0d1117;
  --bg-2: #161b22;
  --paper: #1c2128;
  --paper-2: #22272e;
  --line: #2d333b;
  --line-strong: #444c56;
  --ink: #e6edf3;
  --ink-2: #c9d1d9;
  --muted: #8b949e;
  --dim: #6e7681;

  --indigo: #79b8ff;
  --indigo-deep: #4e8edb;
  --emerald: #3fb950;
  --emerald-deep: #2ea043;
  --magenta: #ec4899;
  --magenta-deep: #be185d;
  --teal: #2dd4bf;
  --amber: #fbbf24;
  --amber-bg: rgba(251,191,36,0.12);
  --crimson: #f87171;
  --crimson-bg: rgba(248,113,113,0.12);
  --moss: #4ade80;
  --moss-bg: rgba(74,222,128,0.12);
  --gold: #f0b429;

  --shadow-1: 0 1px 0 rgba(255,255,255,0.03) inset, 0 1px 2px rgba(0,0,0,0.4);
  --shadow-2: 0 2px 0 rgba(255,255,255,0.03) inset, 0 4px 14px rgba(0,0,0,0.5);
  --shadow-hover: 0 2px 0 rgba(255,255,255,0.03) inset, 0 8px 22px rgba(0,0,0,0.55);
  --emboss-text: none;
  --emboss-text-strong: none;
}

body.theme-dark {
  background:
    radial-gradient(1100px 480px at 10% -8%, rgba(121, 184, 255, 0.08), transparent 60%),
    radial-gradient(900px 400px at 95% -5%, rgba(236, 72, 153, 0.06), transparent 60%),
    var(--bg);
}

body.theme-dark .topbar {
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
body.theme-dark .brand h1,
body.theme-dark .card h2,
body.theme-dark .step .title,
body.theme-dark .modal-card h3,
body.theme-dark .result-card h3 { text-shadow: none; }
body.theme-dark .btn { text-shadow: none; }
body.theme-dark .pill { text-shadow: none; }
body.theme-dark .tab { text-shadow: none; }
body.theme-dark .tabpanel h3 { text-shadow: none; }
body.theme-dark .filters label,
body.theme-dark .card label,
body.theme-dark .assign-head { text-shadow: none; }
body.theme-dark .grid th { text-shadow: none; }
body.theme-dark .grid .kind-mandatory,
body.theme-dark .grid .kind-workload { text-shadow: none; }
body.theme-dark .auto-status,
body.theme-dark .pipe-head h2 { text-shadow: none; }

body.theme-dark .grid {
  background: var(--paper);
  border-color: var(--line);
}
body.theme-dark .grid th {
  background: linear-gradient(180deg, var(--paper-2) 0%, #1a1f26 100%);
  color: var(--ink);
  border-bottom: 2px solid var(--line-strong);
}
body.theme-dark .grid tr:hover td { background: rgba(121,184,255,0.06); }
body.theme-dark .grid .kind-mandatory {
  background: rgba(251,191,36,0.13);
  border-color: rgba(251,191,36,0.4);
  color: var(--amber);
  box-shadow: none;
}
body.theme-dark .grid .kind-workload {
  background: rgba(121,184,255,0.13);
  border-color: rgba(121,184,255,0.4);
  color: var(--indigo);
  box-shadow: none;
}
body.theme-dark .grid .chip {
  background: var(--paper-2);
  border-color: var(--line-strong);
  color: var(--ink);
  box-shadow: none;
}
body.theme-dark .grid .chip.svc { color: var(--magenta); border-color: rgba(236,72,153,0.45); }
body.theme-dark .grid .chip.acct { color: var(--teal); border-color: rgba(45,212,191,0.45); }

body.theme-dark .filters select,
body.theme-dark .filters input,
body.theme-dark .card input,
body.theme-dark .card select,
body.theme-dark .card textarea {
  background: rgba(13,17,23,0.6);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: 0 1px 2px rgba(0,0,0,0.3) inset;
}
body.theme-dark .filters select:focus,
body.theme-dark .filters input:focus,
body.theme-dark .card input:focus,
body.theme-dark .card select:focus,
body.theme-dark .card textarea:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(121,184,255,0.2), 0 1px 2px rgba(0,0,0,0.3) inset;
}

body.theme-dark .stage {
  background: linear-gradient(180deg, #2b323b 0%, #1f252c 100%);
  border-color: var(--line-strong); color: var(--ink);
  text-shadow: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 1px 2px rgba(0,0,0,0.3);
}
body.theme-dark .stage:hover { border-color: var(--indigo); color: var(--indigo); }
body.theme-dark .stage.Succeeded {
  background: linear-gradient(180deg, rgba(74,222,128,0.32) 0%, rgba(46,160,67,0.15) 100%);
  border-color: rgba(74,222,128,0.55); color: #86efac;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 1px 2px rgba(0,0,0,0.35);
}
body.theme-dark .stage.InProgress {
  background: linear-gradient(180deg, rgba(121,184,255,0.32) 0%, rgba(56,139,253,0.15) 100%);
  border-color: rgba(121,184,255,0.55); color: #a9cdff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 1px 2px rgba(0,0,0,0.35);
}
body.theme-dark .stage.Failed {
  background: linear-gradient(180deg, rgba(248,113,113,0.30) 0%, rgba(218,54,51,0.15) 100%);
  border-color: rgba(248,113,113,0.55); color: #ffb4b4;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 1px 2px rgba(0,0,0,0.35);
}
body.theme-dark .stage.Stopped, body.theme-dark .stage.Cancelled {
  background: linear-gradient(180deg, rgba(251,191,36,0.30) 0%, rgba(180,83,9,0.15) 100%);
  border-color: rgba(251,191,36,0.5); color: #ffd98a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 1px 2px rgba(0,0,0,0.35);
}

body.theme-dark .pipeline-card,
body.theme-dark .auto-panel,
body.theme-dark .card,
body.theme-dark .tabs,
body.theme-dark .filters {
  background: var(--paper);
  border-color: var(--line);
}
body.theme-dark .pipe-last code,
body.theme-dark .result-card code,
body.theme-dark .modal-meta code,
body.theme-dark .modal .event .res {
  background: rgba(13,17,23,0.7);
  border-color: var(--line-strong);
  color: var(--indigo);
}
body.theme-dark .tab.active {
  background: linear-gradient(180deg, var(--indigo) 0%, var(--indigo-deep) 100%);
  color: #0d1117;
  box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 4px 12px rgba(121,184,255,0.25);
}
body.theme-dark .mode-switch { background: var(--paper-2); border-color: var(--line-strong); }
body.theme-dark .mode-switch .mode.active {
  background: linear-gradient(180deg, var(--magenta) 0%, var(--magenta-deep) 100%);
  color: #0d1117;
}

body.theme-dark .btn {
  background: linear-gradient(180deg, var(--paper-2) 0%, #1a1f26 100%);
  color: var(--ink);
  border-color: var(--line-strong);
}
body.theme-dark .btn:hover { border-color: var(--indigo); color: var(--indigo); }
body.theme-dark .btn.primary {
  background: linear-gradient(180deg, var(--emerald) 0%, var(--emerald-deep) 100%);
  color: #0d1117; border-color: var(--emerald-deep);
}
body.theme-dark .btn.violet {
  background: linear-gradient(180deg, var(--magenta) 0%, var(--magenta-deep) 100%);
  color: #0d1117; border-color: var(--magenta-deep);
}
body.theme-dark .btn.ghost { background: var(--paper-2); }
body.theme-dark .btn:disabled { background: var(--paper-2); color: var(--dim); border-color: var(--line); }

body.theme-dark .step .ico {
  background: var(--paper-2);
  border-color: var(--line-strong);
  color: var(--muted);
}
body.theme-dark .step.active .ico {
  background: linear-gradient(180deg, var(--indigo), var(--indigo-deep));
  color: #0d1117;
  box-shadow: 0 0 0 4px rgba(121,184,255,0.18);
}
body.theme-dark .step.done .ico {
  background: linear-gradient(180deg, var(--moss), #16a34a);
  color: #0d1117;
}
body.theme-dark .step .meta {
  background: var(--paper-2);
  border-color: var(--line);
  color: var(--indigo);
}
body.theme-dark .step:not(:last-child)::after { background: var(--line-strong); }
body.theme-dark .step.active:not(:last-child)::after { background: var(--indigo); }
body.theme-dark .step.done:not(:last-child)::after { background: var(--moss); }

body.theme-dark .diff {
  background: #0a0d12;
  border-color: var(--line-strong);
  color: var(--ink);
}
body.theme-dark .auto-status {
  background: var(--paper-2);
  border-color: var(--line);
  color: var(--muted);
}
body.theme-dark .auto-status.ok {
  background: rgba(74,222,128,0.1);
  border-color: rgba(74,222,128,0.4);
  color: var(--moss);
}

body.theme-dark .modal-card {
  background: var(--paper);
  border-color: var(--line-strong);
}
body.theme-dark .modal-meta {
  background: rgba(13,17,23,0.7);
  border-color: var(--line);
}

body.theme-dark .error-card {
  background: rgba(248,113,113,0.1);
  border-color: rgba(248,113,113,0.5);
  border-left-color: var(--crimson);
}
body.theme-dark .error-card-title { color: var(--crimson); }
body.theme-dark .error-card-msg { color: var(--ink); }
body.theme-dark .error-card-analysis {
  background: rgba(13,17,23,0.7);
  border-color: var(--line-strong);
  color: var(--ink);
}
body.theme-dark .error-card-analysis .model-tag {
  background: var(--paper-2);
  border-color: var(--line);
  color: var(--muted);
}

body.theme-dark .result-card {
  background: linear-gradient(180deg, rgba(74,222,128,0.08) 0%, rgba(74,222,128,0.04) 100%);
  border-color: rgba(74,222,128,0.4);
}
body.theme-dark .result-card.dry {
  background: linear-gradient(180deg, rgba(251,191,36,0.08) 0%, rgba(251,191,36,0.04) 100%);
  border-color: rgba(251,191,36,0.4);
}
body.theme-dark .result-card.err {
  background: linear-gradient(180deg, rgba(248,113,113,0.08) 0%, rgba(248,113,113,0.04) 100%);
  border-color: rgba(248,113,113,0.4);
}

body.theme-dark .assign-list {
  background: var(--paper-2);
  border-color: var(--line-strong);
  box-shadow: 0 1px 2px rgba(0,0,0,0.3) inset;
}
body.theme-dark .card label.assign-item:hover { background: rgba(121,184,255,0.06); }
body.theme-dark .assign-item .assign-name { color: var(--magenta); }
body.theme-dark .assign-item .assign-target { color: var(--muted); }

body.theme-dark .dryrun-pass    { background: rgba(74,222,128,0.12); border-color: rgba(74,222,128,0.4); color: var(--moss); }
body.theme-dark .dryrun-fail,
body.theme-dark .dryrun-error   { background: rgba(248,113,113,0.12); border-color: rgba(248,113,113,0.5); color: var(--crimson); }
body.theme-dark .dryrun-manual  { background: rgba(251,191,36,0.12); border-color: rgba(251,191,36,0.4); color: var(--amber); }
body.theme-dark .dryrun-pending,
body.theme-dark .dryrun-unknown { background: var(--paper-2); border-color: var(--line); color: var(--muted); }

body.theme-dark .scp-grid .bar {
  background: var(--paper-2);
  border-color: var(--line);
}
body.theme-dark .commit-chip {
  background: var(--paper-2);
  border-color: var(--line);
  color: var(--indigo);
}

body.theme-dark .pipeline-card::before { opacity: 0.85; }
body.theme-dark .auto-panel::before { opacity: 0.85; }

.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 23, 42, 0.55);
  display: grid; place-items: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.modal[hidden] { display: none; }
.modal-card {
  background: var(--paper); border: 2px solid var(--line-strong);
  border-radius: 12px; padding: 24px;
  width: 100%; max-width: 660px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 30px 70px rgba(0,0,0,0.35);
}
.modal-card.wide { max-width: 900px; }
.modal-card h3 { margin: 0 0 8px; font-size: 18px; font-weight: 800; text-shadow: var(--emboss-text-strong); }
.modal-meta {
  display: grid; gap: 6px; margin: 14px 0 16px;
  padding: 12px 14px;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 7px; font-size: 12px; font-weight: 600;
}
.modal-meta div { display: grid; grid-template-columns: 80px 1fr; gap: 8px; }
.modal-meta span { color: var(--muted); font-weight: 700; }
.modal-meta code { color: var(--indigo); font-size: 11.5px; font-weight: 700; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.modal pre.small { max-height: 240px; overflow-y: auto; font-size: 11.5px; }
.modal pre.build-log {
  background: #1a1a17; max-height: 320px; color: #e5e5e0;
  border-color: var(--line-strong);
  font-size: 11px; line-height: 1.45;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
.modal .events {
  margin-top: 10px; font-size: 11.5px;
  border-top: 1px solid var(--line); padding-top: 10px;
}
.modal .event { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.modal .event:last-child { border-bottom: 0; }
.modal .event .res { color: var(--indigo); font-family: "JetBrains Mono", monospace; font-weight: 700; }
.modal .event .stat { font-weight: 700; }
.modal .event .stat.fail { color: var(--crimson); }
.modal .event .stat.complete { color: var(--moss); }
.modal .event .stat.progress { color: var(--indigo); }
.modal .event .reason { color: var(--muted); margin-top: 3px; font-style: italic; font-weight: 500; }

#writesPill.on { color: var(--moss); border-color: rgba(21,128,61,0.4); background: var(--moss-bg); }
#writesPill.on .dot { background: var(--moss); box-shadow: 0 0 0 2px rgba(21,128,61,0.2); }
#writesPill.off { color: var(--amber); border-color: rgba(180,83,9,0.4); background: var(--amber-bg); }
#writesPill.off .dot { background: var(--amber); }

@media (max-width: 1100px) {
  .grid-2 { grid-template-columns: 1fr; }
  .auto-panel { position: static; }
}
@media (max-width: 720px) {
  .topbar { padding: 12px 16px; flex-wrap: wrap; }
  .brand h1 { font-size: 15px; }
  .brand .sub { font-size: 11px; }
  .actions { gap: 6px; }
  .actions .pill { font-size: 10px; padding: 4px 9px; }
  .shell { padding: 14px 16px 32px; }
  .pipeline-card { padding: 14px; }
  .pipe-stages { gap: 5px; }
  .stage { font-size: 11px; padding: 5px 9px; }
  .filters { padding: 10px; gap: 8px; }
  .filters input { min-width: 0; width: 100%; }
  .card { padding: 16px; }
  .card .row { gap: 10px; }
  .card .row > label { flex: 1 1 100%; }
  .card .row > label.check { margin-top: 8px; flex: 0 0 auto; }
  .grid th, .grid td { padding: 8px 11px; font-size: 12px; }
  .grid .col-email, .grid .col-warm { display: none; }
  .auto-panel { padding: 16px; }
}
@media (max-width: 480px) {
  .grid .col-gov { display: none; }
  .pipe-head h2 { font-size: 10px; }
  .stage { font-size: 10.5px; }
}

details.help {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-1);
  margin: 0 0 18px;
  overflow: hidden;
}
details.help > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  font-weight: 600;
  font-size: 13px;
  color: var(--indigo);
  user-select: none;
}
details.help > summary::-webkit-details-marker { display: none; }
details.help > summary::after {
  content: "\25BE";
  margin-left: auto;
  color: var(--dim);
  font-size: 12px;
  transition: transform 0.15s ease;
}
details.help[open] > summary::after { transform: rotate(180deg); }
details.help > summary .help-q {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--indigo);
  color: var(--paper);
  font-size: 12px;
  font-weight: 700;
  font-style: normal;
}
details.help[open] > summary { border-bottom: 1px solid var(--line); }
details.help .help-body { padding: 13px 15px 5px; }
details.help .help-body p {
  margin: 0 0 11px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
}
details.help .help-body p b { color: var(--indigo-deep); font-weight: 700; }
details.help .help-body code {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.5px 4px;
  font-size: 11.5px;
}

#screen-home, #trackBar, #spokeNav, #migSubNav, #opMore { display: none; }
body[data-screen="home"] #screen-home { display: block; }
body[data-screen="setup"] #trackBar, body[data-screen="operate"] #trackBar, body[data-screen="security"] #trackBar, body[data-screen="reports"] #trackBar, body[data-screen="help"] #trackBar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
body[data-screen="operate"] #spokeNav { display: flex; }
body[data-screen="operate"].mode-migration #migSubNav { display: flex; }
body[data-screen="operate"].mode-lza #opMore { display: flex; }
body:not([data-screen="operate"]) .pipeline-card { display: none !important; }
body[data-screen="operate"] .tabpanel[data-tab="landingzone"] { display: none !important; }
body[data-screen="home"] .tabpanel, body[data-screen="home"] #lzaNotice { display: none !important; }

#spokeNav { gap: 4px; padding: 5px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; overflow-x: auto; box-shadow: var(--shadow-1); flex-wrap: wrap; }
.spoke { background: transparent; color: var(--muted); border: none; padding: 9px 18px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; border-radius: 6px; white-space: nowrap; transition: all 0.12s ease; }
.spoke:hover { color: var(--magenta); background: var(--paper-2); }
.spoke.active { color: #fff; font-weight: 800; background: linear-gradient(180deg, var(--indigo) 0%, var(--indigo-deep) 100%); box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 4px 12px rgba(43,58,140,0.35); }
#opMore { margin-top: -4px; }

.hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 18px 0 14px; }
.track-card { text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 22px; cursor: pointer; font: inherit; transition: all 0.14s ease; box-shadow: var(--shadow-1); }
.track-card:hover { border-color: var(--indigo); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.track-card.featured { border: 2px solid var(--indigo); }
.track-card .tc-icon { font-size: 24px; line-height: 1; }
.track-card h3 { margin: 12px 0 6px; font-size: 17px; color: var(--ink); font-weight: 800; }
.track-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.55; }
.tc-badge { float: right; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; color: #fff; background: linear-gradient(180deg, var(--indigo), var(--indigo-deep)); padding: 3px 10px; border-radius: 999px; }
.lifecycle { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.lifecycle .track-card { padding: 16px; }
.lifecycle .track-card h3 { font-size: 14.5px; margin: 8px 0 5px; }
.lifecycle .track-card p { font-size: 12px; }

/* Landing-zone live setup progress: colored fill bar + milestone stepper */
.lz-prog { height: 10px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); overflow: hidden; }
.lz-prog-fill { height: 100%; border-radius: 999px; background: var(--teal); transition: width 0.6s ease; }
.lz-prog-fill.lz-prog-done { background: var(--emerald); }
.lz-prog-fill.lz-prog-failed { background: var(--crimson); }
.lz-prog-fill.lz-prog-active { animation: lz-pulse 1.6s ease-in-out infinite; }
@keyframes lz-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.72; } }
.lz-ms-list { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.lz-ms { font-size: 13px; color: var(--dim); display: flex; align-items: center; gap: 8px; }
.lz-ms-ic { display: inline-block; width: 16px; text-align: center; font-weight: 700; }
.lz-ms-done { color: var(--emerald); }
.lz-ms-active { color: var(--indigo); font-weight: 700; }
.lz-ms-failed { color: var(--crimson); font-weight: 700; }

/* Tower Status — AI environment judgment hero */
.tower-status-card { background: var(--paper); border: 1px solid var(--line-strong); border-top: 3px solid var(--indigo); border-radius: 14px; padding: 20px 22px; margin: 18px 0 6px; box-shadow: var(--shadow-1); }
.ts-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ts-title h2 { margin: 0; font-size: 19px; font-weight: 800; color: var(--ink); }
.ts-ai { font-size: 11px; font-weight: 800; color: var(--indigo); background: rgba(43,58,140,0.1); border: 1px solid rgba(43,58,140,0.25); border-radius: 999px; padding: 2px 8px; vertical-align: middle; margin-left: 6px; }
.ts-title p { margin: 4px 0 0; max-width: 78ch; }
.ts-head-right { display: flex; align-items: center; gap: 12px; }
.ts-grade { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; color: #fff; background: var(--dim); }
.ts-grade-good { background: var(--emerald); }
.ts-grade-warn { background: var(--amber); }
.ts-grade-bad { background: var(--crimson); }
.ts-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 20px; margin-top: 16px; }
.ts-col-h { margin: 0 0 8px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; padding-bottom: 5px; border-bottom: 2px solid var(--line); }
.ts-col-have { color: var(--indigo); border-color: var(--indigo); }
.ts-col-ok { color: var(--emerald); border-color: var(--emerald); }
.ts-col-bad { color: var(--crimson); border-color: var(--crimson); }
.ts-col-act { color: var(--amber); border-color: var(--amber); }
.ts-col ul { margin: 0; padding-left: 16px; }
.ts-col li { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; margin-bottom: 5px; }
.ts-foot { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }

/* Security & Governance — distinct violet palette + remediation worklist */
.sec-wrap { --sec: #7c5cff; --crit: #e5484d; --high: #f5a524; --med: #8b8d98; --ok: #2fbf71; }
.sec-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.sec-h { font-size: 19px; font-weight: 800; color: var(--ink); }
.sec-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; max-width: 74ch; line-height: 1.5; }
.sec-btn { font: inherit; font-size: 13px; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); cursor: pointer; }
.sec-btn:hover { border-color: var(--sec); color: var(--sec); }
.sec-posture { display: grid; grid-template-columns: auto repeat(auto-fit, minmax(110px, 1fr)); gap: 18px; background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--sec); border-radius: 14px; padding: 16px 20px; margin-bottom: 16px; }
.sec-score { display: flex; flex-direction: column; justify-content: center; padding-right: 18px; border-right: 1px solid var(--line); }
.sec-score-num { font-size: 38px; font-weight: 800; line-height: 1; color: var(--sec); }
.sec-score-lbl { font-size: 12px; color: var(--muted); margin-top: 4px; }
.sec-stat { display: flex; flex-direction: column; justify-content: center; }
.sec-stat-num { font-size: 22px; font-weight: 800; }
.sec-stat-lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; margin-top: 2px; }
.sec-worklist { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--paper); }
.sec-row { border-top: 1px solid var(--line); }
.sec-row:first-child { border-top: none; }
.sec-row-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; }
.sec-row-head:hover, .sec-row.open .sec-row-head { background: var(--paper-2); }
.sev { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 7px; white-space: nowrap; }
.sev-critical { background: rgba(229,72,77,0.14); color: var(--crit); }
.sev-high { background: rgba(245,165,36,0.16); color: var(--high); }
.sev-medium, .sev-low, .sev-informational { background: var(--paper-2); color: var(--muted); }
.sec-cid { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; font-weight: 700; }
.sec-rtitle { flex: 1; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-rstatus { font-size: 12px; color: var(--crit); }
.sec-chev { color: var(--dim); font-style: normal; transition: transform 0.15s ease; }
.sec-row.open .sec-chev { transform: rotate(180deg); }
.sec-fix { padding: 4px 16px 16px; }
.sec-fw { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.sec-tag { font-size: 11px; padding: 2px 8px; border-radius: 7px; background: var(--paper-2); color: var(--muted); border: 1px solid var(--line); }
.sec-lbl { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.sec-lbl code { font-size: 11.5px; color: var(--sec); }
.sec-txt { font-size: 14px; line-height: 1.5; margin-bottom: 12px; color: var(--ink-2); }
.sec-pre { margin: 0 0 12px; padding: 10px 12px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 8px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12.5px; overflow-x: auto; white-space: pre; }
.sec-safety { font-size: 12.5px; padding: 7px 12px; border-radius: 8px; margin-bottom: 12px; line-height: 1.4; }
.safe-safe { background: rgba(47,191,113,0.12); color: var(--ok); }
.safe-caution { background: rgba(245,165,36,0.14); color: var(--high); }
.safe-risky { background: rgba(229,72,77,0.14); color: var(--crit); }
.sec-apply { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sec-apply-btn { font: inherit; font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 8px; border: none; background: var(--sec); color: #fff; cursor: pointer; }
.sec-apply-btn:hover { filter: brightness(1.08); }
.sec-apply-note { font-size: 12px; color: var(--dim); }
.sec-empty { padding: 28px; text-align: center; color: var(--muted); font-size: 13.5px; }

/* FedRAMP scorecard hero */
.sec-hero { display: grid; grid-template-columns: 168px 1fr; gap: 22px; background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--sec); border-radius: 16px; padding: 20px 22px; margin-bottom: 16px; }
.sec-hero-l { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-right: 22px; border-right: 1px solid var(--line); }
.sec-grade { font-size: 50px; font-weight: 800; line-height: 1; width: 84px; height: 84px; display: flex; align-items: center; justify-content: center; border-radius: 20px; background: var(--paper-2); color: var(--muted); }
.sec-grade.g-a { background: linear-gradient(180deg, #2fbf71, #1e8e54); color: #fff; }
.sec-grade.g-b { background: linear-gradient(180deg, #6fc44a, #4e9a34); color: #fff; }
.sec-grade.g-c { background: linear-gradient(180deg, #f5a524, #c87f12); color: #fff; }
.sec-grade.g-d { background: linear-gradient(180deg, #f0762e, #c1551a); color: #fff; }
.sec-grade.g-f { background: linear-gradient(180deg, #e5484d, #b3373b); color: #fff; }
.sec-score-big { font-size: 26px; font-weight: 800; margin-top: 12px; color: var(--ink); }
.sec-score-cap { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.sec-hero-r { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.sec-hero-head { font-size: 16px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sec-ai { font-size: 10.5px; font-weight: 700; color: var(--sec); background: rgba(124,92,255,0.12); padding: 2px 8px; border-radius: 6px; letter-spacing: 0.3px; }
.sec-hero-sum { font-size: 13px; line-height: 1.5; color: var(--muted); margin: 6px 0 14px; }
.sec-fr-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sec-fr { border: 1px solid var(--line); border-left: 3px solid var(--med); border-radius: 10px; padding: 10px 12px; background: var(--paper-2); }
.sec-fr.ready { border-left-color: var(--ok); }
.sec-fr.partial { border-left-color: var(--high); }
.sec-fr.gaps { border-left-color: var(--crit); }
.sec-fr-name { font-size: 12px; font-weight: 700; color: var(--ink); }
.sec-fr-status { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin: 2px 0 4px; color: var(--muted); }
.sec-fr.ready .sec-fr-status { color: var(--ok); }
.sec-fr.partial .sec-fr-status { color: var(--high); }
.sec-fr.gaps .sec-fr-status { color: var(--crit); }
.sec-fr-reason { font-size: 11.5px; line-height: 1.4; color: var(--muted); }
.sec-gaps { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.sec-gaps-l { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.4px; margin-right: 2px; }
.sec-gap { font-size: 11.5px; padding: 3px 9px; border-radius: 7px; background: rgba(229,72,77,0.10); color: var(--crit); border: 1px solid rgba(229,72,77,0.20); }

/* Foundation / evidence row */
.sec-ev-h, .sec-worklist-h { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin: 4px 0 8px; }
.sec-ev-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.sec-ev { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--paper); }
.sec-ev-top { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
.sec-ev-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.sec-ev-dot.ok { background: var(--ok); }
.sec-ev-dot.warn { background: var(--high); }
.sec-ev-dot.off { background: var(--crit); }
.sec-ev-dot.unknown { background: var(--med); }
.sec-ev-title { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.sec-ev-ctrl { margin-left: auto; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10.5px; color: var(--dim); }
.sec-ev-sum { font-size: 12px; line-height: 1.45; color: var(--muted); }
.sec-ev-btn { margin-top: 9px; font: inherit; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 7px; border: none; background: var(--sec); color: #fff; cursor: pointer; }
.sec-ev-btn:hover { filter: brightness(1.08); }
.sec-ev-btn:disabled { opacity: 0.7; cursor: default; }
.sec-worklist-h { margin-top: 2px; }
.sec-count { display: inline-block; background: rgba(229,72,77,0.14); color: var(--crit); border-radius: 6px; padding: 0 7px; font-size: 11px; }

/* Reports */
.rpt-card { background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--sec, #7c5cff); border-radius: 16px; padding: 18px 20px; margin-bottom: 16px; }
.rpt-h { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.rpt-title { font-size: 17px; font-weight: 800; color: var(--ink); }
.rpt-badge { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 7px; }
.rpt-badge.ok { background: rgba(47,191,113,0.12); color: var(--ok, #2fbf71); }
.rpt-badge.bad { background: rgba(229,72,77,0.12); color: var(--crit, #e5484d); }
.rpt-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.rpt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.rpt-doc { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--paper-2); }
.rpt-doc-t { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.rpt-doc-s { font-size: 12px; color: var(--muted); margin: 3px 0 10px; }
.rpt-dl { font: inherit; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); cursor: pointer; }
.rpt-dl:hover { border-color: var(--sec, #7c5cff); color: var(--sec, #7c5cff); }
.rpt-dl.primary { background: var(--sec, #7c5cff); border-color: var(--sec, #7c5cff); color: #fff; }
.rpt-dl.primary:hover { filter: brightness(1.08); color: #fff; }
.rpt-doc-acts { display: flex; gap: 8px; align-items: center; }
.rpt-h .rpt-doc-acts { margin-left: auto; }
.rpt-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 12px 0; }
.rpt-num { font-size: 26px; font-weight: 800; color: var(--ink); }
.rpt-cap { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.rpt-evrow { display: flex; gap: 14px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); }
.rpt-ev { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.rpt-fams { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.rpt-lbl { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.4px; }
.rpt-fam { font-size: 12px; padding: 3px 9px; border-radius: 7px; background: var(--paper-2); border: 1px solid var(--line); color: var(--muted); }
.rpt-fam b { color: var(--crit, #e5484d); }
.rpt-tbl { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 13px; }
.rpt-tbl td { padding: 6px 8px; border-top: 1px solid var(--line); color: var(--ink-2, var(--ink)); }
.rpt-tbl td:first-child { font-family: 'JetBrains Mono', ui-monospace, monospace; width: 90px; }
.rpt-tbl td:nth-child(2) { width: 84px; color: var(--muted); font-size: 11px; text-transform: uppercase; }

/* Per-failure evidence (CloudTrail / Config positive-negative) in the worklist */
.sec-evblock { border: 1px solid var(--line); border-radius: 10px; padding: 2px 12px; margin-bottom: 12px; background: var(--paper-2); }
.sec-ev-line { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink); flex-wrap: wrap; }
.sec-ev-line:first-child { border-top: none; }
.sec-ev-line code { font-size: 11.5px; word-break: break-all; }
.sec-ev-k { min-width: 152px; color: var(--muted); }
.sec-ev-d { color: var(--muted); font-size: 12px; }
.ev-positive { color: var(--ok, #2fbf71); font-weight: 700; }
.ev-partial { color: var(--high, #f5a524); font-weight: 700; }
.ev-negative { color: var(--crit, #e5484d); font-weight: 700; }
.ev-unknown { color: var(--med, #8b8d98); font-weight: 700; }

/* ── Security area: left-nav shell ── */
.secx-wrap { --sec: #7c5cff; --crit: #e5484d; --high: #f5a524; --med: #8b8d98; --ok: #2fbf71; display: flex; gap: 0; align-items: flex-start; }
.secx-nav { flex: 0 0 196px; width: 196px; position: sticky; top: 12px; display: flex; flex-direction: column; gap: 2px; padding-right: 16px; border-right: 1px solid var(--line); }
.secx-nav-grp { font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 4px 10px 8px; }
.secx-navitem { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 11px; border: none; border-radius: 9px; background: transparent; color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background .12s, color .12s; }
.secx-navitem:hover { background: rgba(124,92,255,0.08); }
.secx-navitem.active { background: rgba(124,92,255,0.12); color: var(--sec); }
.secx-ico { font-size: 14px; opacity: 0.85; width: 16px; text-align: center; }
.secx-navitem.active .secx-ico { opacity: 1; }
.secx-badge { margin-left: auto; min-width: 18px; text-align: center; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--line); color: var(--muted); }
.secx-navitem.active .secx-badge { background: var(--sec); color: #fff; }
.secx-badge:empty { display: none; }
.secx-main { flex: 1 1 auto; min-width: 0; padding-left: 22px; }
.secx-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.secx-view { animation: secxfade .15s ease; }
@keyframes secxfade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* ── Controls filter bar ── */
.secx-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.secx-filters select, .secx-filters input { font: inherit; font-size: 13px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); }
.secx-filters input { flex: 1 1 220px; min-width: 160px; }
.secx-filters select:focus, .secx-filters input:focus { outline: none; border-color: var(--sec); }
.secx-fcount { font-size: 12px; color: var(--muted); }
.sec-row.filter-hidden { display: none; }

/* control row family + override chips */
.sec-fam { font-size: 10.5px; font-weight: 700; color: var(--muted); background: var(--line); border-radius: 5px; padding: 1px 6px; margin-left: 2px; }
.sec-acct { flex: 0 0 auto; font-size: 10.5px; font-weight: 600; color: var(--sec, #7c5cff); background: rgba(124,92,255,0.1); border: 1px solid rgba(124,92,255,0.28); border-radius: 6px; padding: 1px 8px; margin-left: 6px; white-space: nowrap; cursor: default; }
.sec-acct.multi { color: var(--high, #f5a524); background: rgba(245,165,36,0.1); border-color: rgba(245,165,36,0.3); }
.sec-acctsblk { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 0 4px; }
.sec-acctsblk-l { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-right: 4px; }
.sec-acctpill { font-size: 11.5px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 2px 9px; }
.sec-acctpill b { color: var(--sec, #7c5cff); margin-left: 3px; }
.sec-ovr { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 5px; margin-left: 4px; }
.sec-ovr-fp { background: rgba(47,191,113,0.16); color: var(--ok); }
.sec-ovr-ra { background: rgba(245,165,36,0.18); color: var(--high); }
.sec-rstatus.st-pass { color: var(--ok); }
.sec-rstatus.st-fail, .sec-rstatus.st-warn { color: var(--crit); }
.sec-rstatus.st-false-positive { color: var(--ok); }
.sec-rstatus.st-risk-accepted { color: var(--high); }

/* fix-panel action buttons (override / create poam) */
.sec-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sec-act { font: inherit; font-size: 12.5px; font-weight: 600; padding: 7px 13px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); cursor: pointer; }
.sec-act:hover { border-color: var(--sec); color: var(--sec); }

/* ── Artifacts view ── */
.art-card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; }
.art-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.art-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.art-ctrl { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--line); border-radius: 5px; padding: 1px 7px; }
.art-state { margin-left: auto; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 9px; border-radius: 999px; }
.art-state.ok { background: rgba(47,191,113,0.14); color: var(--ok); }
.art-state.warn { background: rgba(245,165,36,0.16); color: var(--high); }
.art-state.off { background: rgba(229,72,77,0.14); color: var(--crit); }
.art-state.unknown { background: var(--line); color: var(--med); }
.art-sum { font-size: 13px; color: var(--ink); margin-bottom: 10px; }
.art-rec { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.art-kv { display: flex; gap: 12px; padding: 7px 12px; font-size: 12.5px; border-top: 1px solid var(--line); }
.art-kv:first-child { border-top: none; }
.art-k { flex: 0 0 168px; color: var(--muted); }
.art-v { color: var(--ink); word-break: break-word; }
.art-v code { font-size: 11.5px; }

/* ── Third-party artifacts ── */
.secx-tp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin: 24px 0 12px; }
/* Help & Guides cards */
.help-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.help-card { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); padding: 20px; display: flex; flex-direction: column; }
.help-card-ic { font-size: 28px; margin-bottom: 12px; }
.help-card-t { font-size: 16px; font-weight: 800; color: var(--ink); }
.help-card-s { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 6px 0 16px; flex: 1; }
.help-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.help-card-pg { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }

/* Mission-control Wall */
.wall { position: fixed; inset: 0; z-index: 9999; background: #070910; }
.wall[hidden] { display: none; }
.wall-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wall-hud { position: absolute; inset: 0; pointer-events: none; font-family: ui-sans-serif, system-ui, sans-serif; }
.wall-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 16px; padding: 16px 22px; }
.wall-brand { display: flex; align-items: baseline; gap: 12px; }
.wall-live { display: inline-flex; align-items: center; gap: 7px; color: #e5484d; font-weight: 800; font-size: 12.5px; letter-spacing: .12em; }
.wall-livedot { width: 9px; height: 9px; border-radius: 50%; background: #e5484d; animation: wpulse 1.4s infinite; }
@keyframes wpulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.wall-title { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: .01em; }
.wall-sub { font-size: 12px; color: #7c8aa5; letter-spacing: .2em; text-transform: uppercase; }
.wall-clock { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 19px; color: #cfd6e4; font-weight: 600; letter-spacing: .06em; }
.wall-x { pointer-events: auto; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15); color: #cfd6e4; width: 38px; height: 38px; border-radius: 10px; cursor: pointer; font-size: 15px; }
.wall-x:hover { background: rgba(255,255,255,.13); }
.wall-stats { position: absolute; top: 66px; left: 22px; right: 312px; display: flex; gap: 12px; flex-wrap: wrap; }
.wstat { background: rgba(16,20,30,.55); border: 1px solid rgba(120,140,180,.14); border-radius: 12px; padding: 9px 15px; min-width: 116px; }
.wstat-n { font-size: 25px; font-weight: 800; color: #cfd6e4; line-height: 1; font-variant-numeric: tabular-nums; }
.wstat-l { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: #7c8aa5; margin-top: 5px; }
.wall-feed { position: absolute; top: 66px; right: 22px; bottom: 56px; width: 272px; background: rgba(12,16,24,.5); border: 1px solid rgba(120,140,180,.14); border-radius: 14px; padding: 14px; overflow: hidden; }
.wall-feed-h { font-size: 11.5px; text-transform: uppercase; letter-spacing: .09em; color: #9fb0cc; margin-bottom: 11px; font-weight: 700; }
.wall-feed-list { display: flex; flex-direction: column; gap: 10px; }
.wfeed-row { display: flex; gap: 9px; align-items: flex-start; animation: wfade .5s ease; }
@keyframes wfade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; } }
.wfeed-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: 0 0 auto; }
.wfeed-l { font-size: 12.5px; color: #dde4f0; line-height: 1.3; }
.wfeed-m { font-size: 11px; color: #7c8aa5; margin-top: 1px; }
.wall-ticker { position: absolute; bottom: 0; left: 0; right: 0; height: 38px; background: rgba(8,11,18,.82); border-top: 1px solid rgba(120,140,180,.14); overflow: hidden; display: flex; align-items: center; }
.wall-ticker-track { display: inline-flex; white-space: nowrap; animation: wmarquee 70s linear infinite; }
@keyframes wmarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.wtick { font-size: 12.5px; color: #aebcd4; padding: 0 14px; }
.wtick-sep { color: #3a4760; padding: 0 2px; }
.wall-launch { border-color: rgba(124,92,255,.5) !important; color: #b9a7ff !important; }
.wall-hint { position: absolute; bottom: 48px; left: 50%; transform: translateX(-50%); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: #5f6f8c; pointer-events: none; }
.wall-canvas { cursor: pointer; }
/* drill-in panel */
.wall-drill { position: absolute; top: 66px; right: 22px; bottom: 56px; width: 360px; background: rgba(12,16,24,.74); border: 1px solid rgba(120,140,180,.18); border-radius: 16px; padding: 16px 18px; overflow-y: auto; pointer-events: auto; }
.wall-drill[hidden] { display: none; }
.wd-load, .wd-empty { font-size: 12.5px; color: #8a99b5; padding: 6px 0; }
.wd-head { display: flex; align-items: center; gap: 12px; }
.wd-name { font-size: 19px; font-weight: 800; color: #fff; }
.wd-role { font-size: 11.5px; color: #7c8aa5; text-transform: capitalize; margin-top: 2px; }
.wd-grade { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; color: #0a0d14; }
.wd-back { margin-left: auto; pointer-events: auto; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15); color: #cfd6e4; border-radius: 9px; padding: 6px 11px; cursor: pointer; font-size: 12px; }
.wd-back:hover { background: rgba(255,255,255,.13); }
.wd-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.wd-sev { font-size: 12px; font-weight: 700; }
.wd-ai { background: rgba(124,92,255,.09); border: 1px solid rgba(124,92,255,.28); border-radius: 12px; padding: 12px; margin: 4px 0 14px; }
.wd-ai-h { font-size: 11px; font-weight: 800; letter-spacing: .05em; color: #b9a7ff; text-transform: uppercase; margin-bottom: 7px; }
.wd-ai-head { font-size: 13px; color: #e6eaf3; line-height: 1.5; margin-bottom: 10px; }
.wd-risk { border-top: 1px solid rgba(120,140,180,.13); padding: 8px 0; }
.wd-risk-t { font-size: 12.5px; font-weight: 700; color: #fff; }
.wd-risk-w { font-size: 12px; color: #9fb0cc; line-height: 1.45; margin: 2px 0; }
.wd-risk-a { font-size: 12px; color: #6ee7a8; line-height: 1.45; }
.wd-watch { margin-top: 8px; font-size: 12px; color: #f5c451; }
.wd-sec { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #7c8aa5; margin: 14px 0 8px; }
.wd-finds { display: flex; flex-direction: column; gap: 6px; }
.wd-find { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #dde4f0; }
.wd-find.clickable { cursor: pointer; border-radius: 7px; padding: 4px 6px; margin: 0 -6px; transition: background .12s; }
.wd-find.clickable:hover { background: rgba(124,92,180,.14); }
.wd-fgo { color: #7c8aa5; font-size: 16px; margin-left: auto; }
.wd-res { background: rgba(16,20,30,.5); border: 1px solid rgba(120,140,180,.14); border-radius: 9px; padding: 8px 10px; margin-bottom: 6px; }
.wd-res-top { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.wd-res-type { font-size: 12px; font-weight: 700; color: #dde4f0; }
.wd-res-rgn { font-size: 10px; color: #7c8aa5; margin-left: auto; }
.wd-res-arn { font-size: 10.5px; color: #9fb0cc; word-break: break-all; line-height: 1.35; }
.wd-ress { display: flex; flex-direction: column; }
.wd-remlink { display: inline-block; margin-top: 10px; font-size: 12px; color: #6ea8ff; text-decoration: none; }
.wd-remlink:hover { text-decoration: underline; }
.wd-fsev { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.wd-fsev.s-critical { background: #e5484d; } .wd-fsev.s-high { background: #f5a524; } .wd-fsev.s-medium { background: #f5c451; } .wd-fsev.s-low { background: #7c8aa5; }
.wd-ftitle { flex: 1; line-height: 1.3; } .wd-ffam { color: #7c8aa5; font-size: 10.5px; }
.wd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.wd-stat { background: rgba(16,20,30,.5); border: 1px solid rgba(120,140,180,.14); border-radius: 10px; padding: 9px; text-align: center; }
.wd-sn { font-size: 18px; font-weight: 800; color: #cfd6e4; } .wd-sn small { font-size: 11px; opacity: .7; }
.wd-sl { font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; color: #7c8aa5; margin-top: 3px; }
.wd-nbrs { display: flex; flex-wrap: wrap; gap: 6px; }
.wd-nbr { font-size: 11.5px; color: #aebcd4; background: rgba(16,20,30,.5); border: 1px solid rgba(120,140,180,.14); border-radius: 7px; padding: 3px 8px; }

/* Overview posture trend (folded-in ConMon) */
.cm-strip { margin: 14px 0 4px; }
.gr-slotbar { display: inline-block; width: 90px; height: 6px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; vertical-align: middle; margin-right: 6px; }
.gr-slotfill { display: block; height: 100%; background: #2fbf71; }
.gr-slotfill.warn { background: #f5a524; } .gr-slotfill.full { background: #e5484d; }

/* Guardrails (SCP/RCP library + CT controls) */
.gr-sec-h { font-size: 13px; font-weight: 800; color: var(--ink); margin: 20px 0 10px; }
.gr-sec-h:first-child { margin-top: 4px; }
.gr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gr-card { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); padding: 14px 16px; }
.gr-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gr-kind { font-size: 9.5px; font-weight: 800; letter-spacing: .04em; padding: 1px 6px; border-radius: 5px; }
.gr-kind.scp { background: rgba(124,92,255,0.16); color: #9b7cff; } .gr-kind.rcp { background: rgba(34,211,238,0.14); color: #22d3ee; }
.gr-name { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.gr-cat { font-size: 11px; color: var(--muted); }
.gr-sum { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 8px 0; }
.gr-ctrls { display: inline-flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
.gr-ctrl { display: inline-flex; font-size: 10px; font-weight: 700; color: var(--muted); background: var(--line); border-radius: 5px; padding: 1px 7px; }
.gr-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.gr-json { margin-top: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 11px; overflow-x: auto; color: var(--ink); }
.gr-detail { margin-top: 10px; }
.gr-think { font-size: 12.5px; color: var(--muted); padding: 8px 0; }
.gr-ai, .gr-apply { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 12px; }
.gr-ai-h { font-size: 12px; font-weight: 800; color: var(--ink); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.gr-ai-row { display: grid; grid-template-columns: 80px 1fr; gap: 10px; font-size: 12px; line-height: 1.5; margin-bottom: 5px; }
.gr-ai-row > span:first-child { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--sec, #7c5cff); padding-top: 2px; }
.gr-safe { font-size: 10px; font-weight: 700; color: #2fbf71; background: rgba(47,191,113,0.14); border-radius: 5px; padding: 1px 7px; }
.gr-cli { background: #0a0b0d; border: 1px solid var(--line); border-radius: 8px; padding: 11px; font-size: 11px; overflow-x: auto; color: #cdd3e0; white-space: pre; }
.gr-note { font-size: 11.5px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.gr-cttbl { width: 100%; }
.gr-cttbl th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; }
.gr-cttbl td { font-size: 12px; vertical-align: middle; }
.gr-cttbl tr.on { background: rgba(47,191,113,0.05); }
.gr-cttbl code { font-size: 11px; }
.gr-guide { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 5px; }
.gr-guide.g-mandatory { background: rgba(229,72,77,0.14); color: #e5484d; } .gr-guide.g-strongly { background: rgba(245,165,36,0.16); color: #f5a524; } .gr-guide.g-elective { background: var(--line); color: var(--muted); }
.gr-on { font-size: 11px; font-weight: 700; color: #2fbf71; }

/* FedRAMP 20x readiness */
.fx-hero { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; border: 1px solid var(--line); border-left-width: 4px; border-radius: 14px; background: var(--paper); padding: 16px 20px; margin-bottom: 16px; }
.fx-hero.ready { border-left-color: #2fbf71; } .fx-hero.mostly { border-left-color: #f5a524; } .fx-hero.gaps { border-left-color: #e5484d; }
.fx-hero-l { text-align: center; min-width: 120px; padding-right: 20px; border-right: 1px solid var(--line); }
.fx-hero-score { font-size: 38px; font-weight: 800; color: var(--ink); line-height: 1; } .fx-hero-score small { font-size: 18px; color: var(--muted); }
.fx-hero-cap { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-top: 4px; }
.fx-hero-h { font-size: 15px; font-weight: 800; color: var(--ink); }
.fx-hero-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.fx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fx-card { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); padding: 14px 16px; }
.fx-card.ready { border-color: rgba(47,191,113,0.35); } .fx-card.gaps { border-color: rgba(229,72,77,0.3); }
.fx-top { display: flex; align-items: baseline; justify-content: space-between; }
.fx-id { font-size: 11px; font-weight: 800; letter-spacing: 0.05em; color: var(--sec, #7c5cff); font-family: 'JetBrains Mono', ui-monospace, monospace; }
.fx-score { font-size: 22px; font-weight: 800; color: var(--ink); } .fx-score small { font-size: 12px; color: var(--muted); }
.fx-name { font-size: 14px; font-weight: 700; color: var(--ink); margin: 2px 0 8px; }
.fx-bar { height: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.fx-fill { height: 100%; border-radius: 999px; } .fx-fill.ready { background: #2fbf71; } .fx-fill.mostly { background: #f5a524; } .fx-fill.gaps { background: #e5484d; }
.fx-blurb { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 9px 0; }
.fx-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 11.5px; color: var(--muted); }
.fx-arts { display: flex; flex-wrap: wrap; gap: 4px; }
.fx-art { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 5px; }
.fx-art.ok { background: rgba(47,191,113,0.16); color: #2fbf71; } .fx-art.miss { background: var(--line); color: var(--muted); text-decoration: line-through; }

/* Account Ops guided flow */
.fl-card { border: 1px solid var(--line); border-radius: 16px; background: var(--paper); padding: 20px 22px; margin-bottom: 18px; }
.fl-eyebrow { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--sec, #7c5cff); margin-bottom: 6px; }
.fl-q { font-size: 19px; font-weight: 800; color: var(--ink); margin-bottom: 14px; }
.fl-title { font-size: 18px; font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.fl-crumbs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.fl-crumb { font-size: 12px; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; cursor: pointer; }
.fl-crumb span { color: var(--muted); margin-left: 3px; } .fl-crumb:hover { border-color: var(--sec, #7c5cff); }
.fl-restart { font-size: 12px; color: var(--sec, #7c5cff); background: none; border: none; cursor: pointer; padding: 3px 6px; }
.fl-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fl-opt { text-align: left; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 14px 16px; cursor: pointer; transition: border-color .12s, background .12s; }
.fl-opt:hover { border-color: var(--sec, #7c5cff); background: rgba(124,92,255,.05); }
.fl-opt-t { font-size: 14.5px; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.fl-opt-d { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.fl-load { font-size: 13px; color: var(--muted); padding: 8px 0; }
.fl-ai { font-size: 13px; color: var(--ink); line-height: 1.6; background: rgba(124,92,255,.07); border: 1px solid rgba(124,92,255,.22); border-radius: 11px; padding: 11px 13px; margin-bottom: 14px; }
.fl-ai-b { margin-right: 4px; }
.fl-steps { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.fl-step { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.fl-num { width: 22px; height: 22px; border-radius: 50%; background: var(--sec, #7c5cff); color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.fl-step-l { font-size: 13.5px; color: var(--ink); font-weight: 600; }
.fl-gate { font-size: 9.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #f5a524; background: rgba(245,165,36,.15); border-radius: 5px; padding: 2px 7px; margin-left: auto; }
.fl-caut-h { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.fl-caut { margin: 0 0 14px; padding-left: 18px; } .fl-caut li { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-bottom: 4px; }
.fl-gatenote { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.fl-gatenote .fl-gate { margin-left: 0; }
.fl-acts { display: flex; gap: 10px; flex-wrap: wrap; }
/* --sec is only defined inside .sec-wrap; the flow card lives in Account Ops,
   so define it here or .sec-btn.primary renders transparent (invisible). */
#flowGuide { --sec: #7c5cff; --ok: #2fbf71; --bad: #e5484d; }
/* guided-flow input + driven stepper */
.fl-q-sub { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: -8px 0 14px; }
.fl-inrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fl-input { flex: 1; min-width: 180px; font-size: 14px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--ink); }
.fl-input:focus { outline: none; border-color: var(--sec, #7c5cff); }
.fl-acct { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.fl-acct code { color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }
.fl-run { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.fl-rstep { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 11px 13px; }
.fl-rstep.active { border-color: var(--sec, #7c5cff); box-shadow: 0 0 0 1px rgba(124,92,255,.25); }
.fl-rstep.locked { opacity: .5; }
.fl-rstep.done .fl-num { background: var(--ok, #38c172); }
.fl-rhead { display: flex; align-items: center; gap: 11px; }
.fl-rbody { margin-top: 11px; padding-left: 33px; }
.fl-ghint { font-size: 12px; color: var(--muted); margin-top: 8px; }
.fl-gpass { font-size: 12.5px; font-weight: 700; color: var(--ok, #38c172); margin-top: 8px; }
.fl-gfail { font-size: 12.5px; font-weight: 600; color: var(--bad, #e3342f); margin-top: 8px; }
.fl-final { font-size: 12.5px; font-weight: 700; color: var(--ok, #38c172); }

/* Activity — AI log search */
.ls-search { display: flex; gap: 8px; margin-bottom: 10px; }
.ls-input { flex: 1; background: var(--paper); border: 1px solid var(--line); border-radius: 11px; padding: 11px 14px; font-size: 14px; color: var(--ink); }
.ls-input:focus { outline: none; border-color: var(--sec, #7c5cff); }
.ls-ex { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.ls-chip { font-size: 12px; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.ls-chip:hover { border-color: var(--sec, #7c5cff); color: var(--ink); }
.ls-load { font-size: 13px; color: var(--muted); padding: 14px 0; }
.ls-spin { display: inline-block; animation: lsspin 1.4s linear infinite; }
@keyframes lsspin { to { transform: rotate(360deg); } }
.ls-interp { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.ls-interp-l { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--sec, #7c5cff); margin-right: 6px; }
.ls-q { display: inline-block; font-size: 11px; font-family: 'JetBrains Mono', ui-monospace, monospace; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; margin-left: 4px; }
.ls-ai { border: 1px solid rgba(124,92,255,.28); background: rgba(124,92,255,.07); border-radius: 13px; padding: 14px 16px; margin-bottom: 14px; }
.ls-ai-h { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--sec, #9b7cff); margin-bottom: 8px; }
.ls-ai-a { font-size: 14px; color: var(--ink); line-height: 1.55; }
.ls-notable { margin: 9px 0 0; padding-left: 18px; }
.ls-notable li { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.ls-follow { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.ls-follow a { color: var(--sec, #7c5cff); text-decoration: none; }
.ls-follow a:hover { text-decoration: underline; }
.ls-meta { font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.ls-tbl { width: 100%; }
.ls-tbl th { font-size: 10px; text-transform: uppercase; letter-spacing: .03em; }
.ls-tbl td { font-size: 12px; vertical-align: middle; }
.ls-time, .ls-ip { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; color: var(--muted); white-space: nowrap; }
.ls-user { font-size: 11px; color: var(--ink); word-break: break-all; max-width: 220px; }
.ls-src { color: var(--muted); } .ls-res { font-size: 11px; color: var(--muted); word-break: break-all; }
.ls-tbl tr.ls-err { background: rgba(229,72,77,.06); }
.ls-ec { font-size: 10px; font-weight: 700; color: #e5484d; background: rgba(229,72,77,.14); border-radius: 5px; padding: 1px 6px; }
.ls-write { font-size: 9.5px; font-weight: 700; color: #f5a524; background: rgba(245,165,36,.14); border-radius: 5px; padding: 1px 6px; }

/* Exposure (Inspector + Access Analyzer) */
.exp-card { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); margin-bottom: 16px; overflow: hidden; }
.exp-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.exp-t { font-size: 14px; font-weight: 800; color: var(--ink); }
.exp-counts { display: flex; align-items: center; gap: 8px; }
.exp-sev { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; }
.exp-sev.s-critical { background: rgba(229,72,77,0.16); color: #e5484d; } .exp-sev.s-high { background: rgba(245,165,36,0.18); color: #f5a524; } .exp-sev.s-medium { background: rgba(200,162,0,0.16); color: #c8a200; } .exp-sev.s-low { background: var(--line); color: var(--muted); }
.exp-fixn, .exp-pubn { font-size: 11px; font-weight: 700; }
.exp-fixn { color: #2fbf71; } .exp-pubn { color: #e5484d; }
.exp-tbl { width: 100%; }
.exp-tbl th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; }
.exp-tbl td { font-size: 12.5px; vertical-align: middle; }
.exp-tbl code { background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 11px; }
.exp-fix { font-size: 11px; font-weight: 700; color: #2fbf71; }
.exp-pub { font-size: 10px; font-weight: 800; color: #e5484d; background: rgba(229,72,77,0.14); border-radius: 5px; padding: 1px 7px; }
.exp-ext { font-size: 10px; font-weight: 700; color: var(--high, #f5a524); }

/* Security Alerts */
.alq-summary { display: flex; gap: 18px; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.alq-sum-i b { color: var(--ink); font-size: 15px; margin-right: 3px; }
.alq-sum-i.sev-critical b { color: #e5484d; } .alq-sum-i.sev-high b { color: #f5a524; } .alq-sum-i.sev-medium b { color: #c8a200; }
.alq-list { display: flex; flex-direction: column; gap: 8px; }
.alq-card { border: 1px solid var(--line); border-left-width: 3px; border-radius: 11px; background: var(--paper); overflow: hidden; }
.alq-card.s-critical { border-left-color: #e5484d; } .alq-card.s-high { border-left-color: #f5a524; } .alq-card.s-medium { border-left-color: #c8a200; } .alq-card.s-low { border-left-color: var(--muted); }
.alq-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; }
.alq-sev { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; flex: 0 0 auto; }
.alq-sev.s-critical { background: rgba(229,72,77,0.16); color: #e5484d; } .alq-sev.s-high { background: rgba(245,165,36,0.18); color: #f5a524; } .alq-sev.s-medium { background: rgba(200,162,0,0.16); color: #c8a200; } .alq-sev.s-low { background: var(--line); color: var(--muted); }
.alq-label { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.alq-ctrl { font-size: 10.5px; font-weight: 700; color: var(--muted); background: var(--line); border-radius: 5px; padding: 1px 7px; }
.alq-meta { margin-left: auto; font-size: 12px; color: var(--muted); }
.alq-chev { color: var(--muted); transition: transform .15s; }
.alq-card.open .alq-chev { transform: rotate(180deg); }
.alq-body { padding: 0 14px 14px; }
.alq-facts { display: flex; flex-wrap: wrap; gap: 16px; padding: 4px 0 10px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.alq-facts b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.alq-facts code { background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }
.alq-triage { display: flex; flex-direction: column; gap: 7px; }
.alq-tr-row { display: grid; grid-template-columns: 96px 1fr; gap: 10px; font-size: 12.5px; line-height: 1.5; }
.alq-tr-l { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--sec, #7c5cff); padding-top: 2px; }
.alq-acts { display: flex; gap: 8px; margin-top: 12px; }

/* Continuous-monitoring (ConMon) dashboard */
.cm-hero { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; border: 1px solid var(--line); border-left-width: 4px; border-left-color: #2fbf71; border-radius: 14px; background: var(--paper); padding: 16px 20px; margin-bottom: 14px; }
.cm-auth { min-width: 220px; padding-right: 22px; border-right: 1px solid var(--line); }
.cm-auth-badge { font-size: 16px; font-weight: 800; color: #2fbf71; letter-spacing: 0.02em; }
.cm-auth-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.cm-auth-sub b { color: var(--ink); }
.cm-stats { display: flex; gap: 8px; flex: 1 1 auto; }
.cm-stat { flex: 1 1 0; text-align: center; padding: 2px 8px; border-left: 1px solid var(--line); }
.cm-stat:first-child { border-left: none; }
.cm-stat-n { font-size: 24px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.cm-stat-l { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-top: 4px; }
.cm-d { display: inline-block; margin-top: 3px; font-size: 11px; font-weight: 700; }
.cm-d.up { color: #2fbf71; } .cm-d.down { color: #e5484d; } .cm-d.flat { color: var(--muted); }
.cm-card { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); padding: 14px 16px; margin-bottom: 14px; }
.cm-card-h { font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.cm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cm-svg { width: 100%; height: 180px; display: block; }
.cm-grid { stroke: var(--line); stroke-width: 0.7; }
.cm-axis { fill: var(--muted); font-size: 9px; font-family: 'JetBrains Mono', ui-monospace, monospace; }
.cm-aging { display: flex; flex-direction: column; gap: 9px; padding-top: 4px; }
.cm-age-bar { height: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.cm-age-fill { height: 100%; border-radius: 999px; }
.cm-age-fill.a-0-30 { background: #2fbf71; } .cm-age-fill.a-31-60 { background: #4a9eff; } .cm-age-fill.a-61-90 { background: #f5a524; } .cm-age-fill.a-90p { background: #e5484d; }
.cm-age-l { font-size: 11.5px; color: var(--muted); margin-top: 3px; } .cm-age-l b { color: var(--ink); margin-left: 4px; }

/* Account operations launcher */
.ops-launch-head { margin-bottom: 18px; }
.ops-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ops-card { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); padding: 18px; cursor: pointer; transition: border-color .15s, transform .15s; font: inherit; }
.ops-card:hover { border-color: var(--accent, #79b8ff); transform: translateY(-2px); }
.ops-ic { font-size: 23px; }
.ops-card.accent { border-color: rgba(124,92,255,0.4); }
.ops-card.accent .ops-ic { color: var(--sec, #7c5cff); }
.ops-card.accent:hover { border-color: var(--sec, #7c5cff); }
.ops-card.danger .ops-ic { color: var(--crit, #e5484d); }
.ops-t { font-size: 15px; font-weight: 800; color: var(--ink); }
.ops-s { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* Migration wizard rail */
#migWizard { margin-bottom: 14px; }
.mw-bar { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); padding: 14px 18px; }
.mw-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mw-title { font-size: 13px; font-weight: 800; color: var(--ink); }
.mw-sum { font-size: 12px; color: var(--muted); }
.mw-sum code { background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }
.mw-sum b { color: var(--ink); }
.mw-sum-empty { color: var(--muted); font-style: italic; }
.mw-rail { display: flex; align-items: center; }
.mw-step { display: flex; align-items: center; gap: 8px; border: none; background: none; cursor: pointer; padding: 4px 6px; font: inherit; white-space: nowrap; }
.mw-num { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; background: var(--line); color: var(--muted); flex: 0 0 auto; transition: background .15s, color .15s; }
.mw-lbl { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.mw-step.done .mw-num { background: rgba(47,191,113,0.18); color: #2fbf71; }
.mw-step.done .mw-lbl { color: var(--ink); }
.mw-step.cur .mw-num { background: var(--sec, #7c5cff); color: #fff; }
.mw-step.cur .mw-lbl { color: var(--sec, #7c5cff); font-weight: 800; }
.mw-conn { flex: 1; height: 2px; min-width: 14px; background: var(--line); border-radius: 2px; margin: 0 2px; }
.mw-conn.done { background: rgba(47,191,113,0.45); }
.mw-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.mw-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mw-tools-l { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mw-tool { font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 4px 10px; cursor: pointer; }
.mw-tool:hover { border-color: var(--accent, #79b8ff); color: var(--ink); }
.mw-tool.cur { border-color: var(--sec, #7c5cff); color: var(--sec, #7c5cff); }
.mw-nav { display: flex; align-items: center; gap: 10px; }
.mw-final { font-size: 12px; font-weight: 700; color: #2fbf71; }

/* Unified AWS-native evidence card (CloudTrail / Config / GuardDuty / Security Hub) */
.secx-aws { margin-top: 24px; }
.awsx-card { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); overflow: hidden; }
.awsx-head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.awsx-title { font-size: 15px; font-weight: 800; color: var(--ink); }
.awsx-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.awsx-overall { margin-left: auto; flex: 0 0 auto; font-size: 11px; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.awsx-overall.ok { background: rgba(47,191,113,0.16); color: var(--ok, #2fbf71); }
.awsx-overall.warn { background: rgba(245,165,36,0.16); color: var(--high, #f5a524); }
.awsx-body { display: flex; flex-direction: column; }
.awsx-svc { padding: 13px 18px; border-bottom: 1px solid var(--line); }
.awsx-svc:last-child { border-bottom: none; }
.awsx-svc-l { display: flex; align-items: center; gap: 10px; }
.awsx-svc-name { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.awsx-svc-ctrl { font-size: 10.5px; font-weight: 700; color: var(--muted); background: var(--line); border-radius: 5px; padding: 1px 7px; }
.awsx-svc-state { margin-left: auto; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 9px; border-radius: 999px; background: rgba(47,191,113,0.16); color: var(--ok, #2fbf71); }
.awsx-svc-state.warn, .awsx-svc-state.fail { background: rgba(229,72,77,0.16); color: var(--crit, #e5484d); }
.awsx-svc-sum { font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.45; }
.awsx-svc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.awsx-chip { font-size: 11px; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; }
.awsx-chip b { color: var(--ink); font-weight: 700; }

/* 3-up grid of collapsible artifact-type slots */
.tpa-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tpa-slot { border: 1px solid var(--line); border-radius: 11px; background: var(--paper); overflow: hidden; align-self: start; }
.tpa-slot > summary { list-style: none; cursor: pointer; user-select: none; display: flex; align-items: center; gap: 8px; padding: 11px 14px; font-size: 13px; font-weight: 700; color: var(--ink); }
.tpa-slot > summary::-webkit-details-marker { display: none; }
.tpa-slot > summary::after { content: "▾"; color: var(--muted); transition: transform .15s; font-size: 11px; }
.tpa-slot[open] > summary::after { transform: rotate(180deg); }
.tpa-slot-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpa-slot-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.tpa-slot-dot.x-ok { background: #2fbf71; }
.tpa-slot-dot.x-warning, .tpa-slot-dot.x-urgent { background: #f5a524; }
.tpa-slot-dot.x-expired { background: #e5484d; }
.tpa-slot-dot.x-none { background: var(--muted); }
.tpa-slot-count { min-width: 20px; text-align: center; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: var(--line); color: var(--muted); }
.tpa-slot-body { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 7px; }
.tpa-slot-empty { font-size: 12px; color: var(--muted); padding: 2px 2px 4px; }
.tpa-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.tpa-row-main { flex: 1; min-width: 0; }
.tpa-row-title { font-size: 12.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpa-row-meta { font-size: 11px; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpa-row-act { flex: 0 0 auto; color: var(--muted); background: none; border: none; cursor: pointer; font-size: 14px; font-weight: 700; text-decoration: none; padding: 2px 4px; line-height: 1; }
.tpa-row-act:hover { color: var(--ink); }
.tpa-add { align-self: flex-start; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--sec, #7c5cff); background: none; border: 1px dashed var(--line); border-radius: 7px; padding: 5px 10px; cursor: pointer; }
.tpa-add:hover { border-color: var(--sec, #7c5cff); }
.tpa-exp { font-size: 10px; font-weight: 800; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 999px; flex: 0 0 auto; }
.tpa-exp.x-ok { background: rgba(47,191,113,0.16); color: var(--ok, #2fbf71); }
.tpa-exp.x-warning { background: rgba(245,165,36,0.16); color: var(--high, #f5a524); }
.tpa-exp.x-urgent { background: rgba(245,165,36,0.22); color: var(--high, #f5a524); }
.tpa-exp.x-expired { background: rgba(229,72,77,0.16); color: var(--crit, #e5484d); }
.tpa-exp.x-none { background: var(--line); color: var(--muted); }

/* ── Policies ── */
.pol-st { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; padding: 1px 8px; border-radius: 5px; }
.pol-st.s-ok { background: rgba(47,191,113,0.16); color: var(--ok, #2fbf71); }
.pol-st.s-warn { background: rgba(245,165,36,0.16); color: var(--high, #f5a524); }
.pol-st.s-draft { background: rgba(124,92,255,0.16); color: var(--sec, #7c5cff); }
.pol-st.s-bad { background: var(--line); color: var(--muted); }
.pol-ai { font-size: 10.5px; font-weight: 700; color: var(--sec, #7c5cff); }

/* ── POA&M view ── */
.secx-poambar { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.secx-inline { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.sec-btn.primary { background: var(--sec); color: #fff; border-color: var(--sec); }
.sec-btn.primary:hover { filter: brightness(1.08); color: #fff; }
.poam-row { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.poam-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.poam-cid { font-size: 12px; font-weight: 700; color: var(--sec); }
.poam-title { font-size: 14px; font-weight: 600; color: var(--ink); flex: 1 1 auto; min-width: 120px; }
.poam-risk { font-size: 10.5px; font-weight: 700; text-transform: uppercase; padding: 1px 7px; border-radius: 5px; }
.poam-risk.low { background: var(--line); color: var(--med); }
.poam-risk.moderate { background: rgba(245,165,36,0.16); color: var(--high); }
.poam-risk.high, .poam-risk.critical { background: rgba(229,72,77,0.14); color: var(--crit); }
.poam-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.poam-meta b { color: var(--ink); font-weight: 600; }
.poam-jira { color: var(--sec); text-decoration: none; font-weight: 600; }
.poam-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.poam-status-sel { font: inherit; font-size: 12px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--ink); }

/* ── Lightweight modal for override / poam forms ── */
.scx-ovl { position: fixed; inset: 0; z-index: 9998; background: rgba(8,10,16,0.55); display: flex; align-items: center; justify-content: center; padding: 24px; }
.scx-modal { width: 100%; max-width: 480px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; box-shadow: 0 24px 60px rgba(0,0,0,0.4); }
.scx-modal.scx-wide { max-width: 880px; }
.doc-head { display: flex; align-items: flex-start; gap: 16px; }
.doc-head h3 { flex: 1; }
.doc-head .sec-btn { flex: 0 0 auto; }
.doc-page { max-height: 64vh; overflow-y: auto; margin: 14px 0 4px; padding: 40px 52px; background: #fbfaf7; color: #1d1c1a; border: 1px solid var(--line); border-radius: 10px;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif; font-size: 15.5px; line-height: 1.75; }
:root[data-theme="dark"] .doc-page { background: #14161c; color: #d9dde6; border-color: rgba(120,140,180,0.16); }
.doc-page h4 { font-family: Georgia, serif; font-size: 17px; font-weight: 700; color: #111; margin: 22px 0 8px; letter-spacing: .005em; }
:root[data-theme="dark"] .doc-page h4 { color: #fff; }
.doc-page h4:first-child { margin-top: 0; }
.doc-page p { margin: 0 0 13px; }
.doc-page .doc-li { margin: 0 0 7px 22px; position: relative; }
.doc-page .doc-li:before { content: "•"; position: absolute; left: -16px; color: var(--sec, #7c5cff); }
.doc-page .doc-empty { color: var(--muted); font-style: italic; }
.doc-edit { width: 100%; min-height: 56vh; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 14px; line-height: 1.7; padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); box-sizing: border-box; resize: vertical; }
.scx-modal h3 { margin: 0 0 4px; font-size: 17px; color: var(--ink); }
.scx-modal .scx-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.scx-field { margin-bottom: 12px; }
.scx-field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.scx-field input, .scx-field select, .scx-field textarea { width: 100%; font: inherit; font-size: 13.5px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); box-sizing: border-box; }
.scx-field textarea { resize: vertical; min-height: 64px; }
.scx-row2 { display: flex; gap: 12px; }
.scx-row2 .scx-field { flex: 1; }
.scx-acts { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.scx-msg { font-size: 12.5px; color: var(--crit); margin-top: 8px; min-height: 16px; }

/* ── Organization map ── */
.om-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.om-aud { color: #7c5cff; }
.om-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 14px; font-size: 12.5px; color: var(--muted); }
.om-leg { display: flex; align-items: center; gap: 7px; }
.om-dot { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.om-dot.k-management { background: #f5a524; }
.om-dot.k-audit { background: #7c5cff; }
.om-dot.k-log-archive { background: #2dd4bf; }
.om-dot.k-workload { background: #79b8ff; }
.om-dot.k-sandbox { background: #8b949e; }
.om-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); padding: 8px 4px; }
.om-svg { display: block; margin: 0 auto; }
.om-link { fill: none; stroke: var(--line-strong, #2d333b); stroke-width: 1.6; stroke-dasharray: 1; stroke-dashoffset: 1; animation: omdraw 0.7s ease forwards; }
@keyframes omdraw { to { stroke-dashoffset: 0; } }
.om-pulse { fill: #7c5cff; opacity: 0.85; }
.om-node { opacity: 0; animation: ompop 0.45s cubic-bezier(.2,.8,.3,1) forwards; transform-box: fill-box; transform-origin: center; }
@keyframes ompop { from { opacity: 0; transform: translateY(6px) scale(.92); } to { opacity: 1; transform: none; } }
.om-card { fill: var(--bg); stroke: var(--line); stroke-width: 1.4; }
.om-root .om-card { fill: rgba(245,165,36,0.10); stroke: #f5a524; }
.om-name { fill: var(--ink); font: 700 13px 'Inter', system-ui, sans-serif; }
.om-id { fill: var(--muted); font: 11px 'JetBrains Mono', ui-monospace, monospace; }
.om-kind { font: 700 8.5px 'Inter', system-ui, sans-serif; letter-spacing: 0.08em; }
.om-ourect { fill: rgba(124,92,255,0.08); stroke: var(--line); stroke-width: 1.2; }
.om-ouname { fill: var(--ink); font: 700 12px 'Inter', system-ui, sans-serif; }
.k-management .om-stripe { fill: #f5a524; } .k-management .om-kind { fill: #f5a524; }
.k-audit .om-stripe { fill: #7c5cff; } .k-audit .om-kind { fill: #7c5cff; }
.k-audit .om-card { stroke: #7c5cff; stroke-width: 2; fill: rgba(124,92,255,0.07); }
.k-log-archive .om-stripe { fill: #2dd4bf; } .k-log-archive .om-kind { fill: #2dd4bf; }
.k-workload .om-stripe { fill: #79b8ff; } .k-workload .om-kind { fill: #79b8ff; }
.k-sandbox .om-stripe { fill: #8b949e; } .k-sandbox .om-kind { fill: #8b949e; }
.om-summary { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.om-summary b { color: var(--ink); }
.om-warn { color: #f5a524; }
.om-access { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; padding: 11px 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); font-size: 13px; color: var(--ink); }
.om-access.ok { border-color: rgba(47,191,113,0.4); }
.om-access b { font-weight: 600; }
.om-access code { font-size: 11.5px; }
.om-access-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.om-access-dot.ok { background: #2fbf71; }
.om-access-dot.warn { background: #f5a524; }

/* ── Org map: live posture ── */
.om-acct { cursor: pointer; }
.om-stat { stroke: var(--paper); stroke-width: 1.5; }
.s-red { fill: #e5484d; } .s-amber { fill: #f5a524; } .s-green { fill: #2fbf71; } .s-none { fill: #6e7681; }
.om-acct.g-red .om-card { stroke: rgba(229,72,77,0.7); }
.om-acct.g-amber .om-card { stroke: rgba(245,165,36,0.6); }
.om-acct.g-green .om-card { stroke: rgba(47,191,113,0.5); }
.om-acct.g-red .om-stat { animation: ompulse 1.6s ease-in-out infinite; }
@keyframes ompulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.om-failn { fill: #e5484d; font: 700 10px 'Inter', system-ui, sans-serif; }
.om-okn { fill: #2fbf71; font: 700 10px 'Inter', system-ui, sans-serif; }
.om-na { fill: #6e7681; font: 600 9.5px 'Inter', system-ui, sans-serif; }
/* accounts that have been closed (SUSPENDED → 90-day deletion) */
.om-closing-node { opacity: 0.66; }
.om-closing-node .om-stripe { fill: #f5a524; }
.om-closing-node .om-card { stroke-dasharray: 5 3; }
.om-closing-tag { fill: #f5a524; font: 800 8px 'Inter', system-ui, sans-serif; letter-spacing: 0.05em; text-transform: uppercase; }
.om-closingn { fill: #f5a524; font: 700 9.5px 'Inter', system-ui, sans-serif; }
.om-link.g-red { stroke: rgba(229,72,77,0.55); } .om-pulse.g-red { fill: #e5484d; }
.om-link.g-amber { stroke: rgba(245,165,36,0.5); } .om-pulse.g-amber { fill: #f5a524; }
.om-link.g-green { stroke: rgba(47,191,113,0.45); } .om-pulse.g-green { fill: #2fbf71; }

/* attention hero */
.om-hero { display: flex; align-items: stretch; gap: 24px; flex-wrap: wrap; border: 1px solid var(--line); border-left-width: 4px; border-radius: 14px; padding: 16px 22px; margin-bottom: 14px; background: var(--paper); }
.om-hero.g-red { border-left-color: #e5484d; } .om-hero.g-amber { border-left-color: #f5a524; } .om-hero.g-green { border-left-color: #2fbf71; } .om-hero.g-none { border-left-color: #6e7681; }
.om-hero-l { display: flex; flex-direction: column; justify-content: center; min-width: 180px; padding-right: 22px; border-right: 1px solid var(--line); }
.om-hero-grade { font-size: 23px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.1; }
.om-hero-grade.s-red { color: #e5484d; } .om-hero-grade.s-amber { color: #f5a524; } .om-hero-grade.s-green { color: #2fbf71; } .om-hero-grade.s-none { color: #8b949e; }
.om-hero-cap { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: 3px; }
.om-hero-assessed { font-size: 12px; color: var(--muted); margin-top: 10px; }
.om-hero-assessed b { color: var(--ink); }
.om-hero-r { flex: 1 1 420px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.om-hero-stats { display: flex; align-items: stretch; }
.om-hstat { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2px 6px; border-left: 1px solid var(--line); }
.om-hstat:first-child { border-left: none; }
.om-hstat b { font-size: 26px; font-weight: 800; line-height: 1; color: var(--ink); }
.om-hstat em { font-style: normal; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-top: 5px; }
.om-hstat.g-yellow b { color: #f5c542; } .om-hstat.g-blue b { color: #4a9eff; } .om-hstat.g-green b { color: #2fbf71; } .om-hstat.g-none b { color: #8b949e; }
.om-hero-stats .om-hstat:first-child b { color: #e5484d; }
.om-hero-risks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.om-hero-rlbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.om-hero-allclear { color: var(--muted); font-size: 12.5px; }
.om-risk { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line); transition: transform .1s ease; }
.om-risk:hover { transform: translateY(-1px); }
.om-risk.g-red { background: rgba(229,72,77,0.12); color: #e5484d; border-color: rgba(229,72,77,0.4); }
.om-risk.g-amber { background: rgba(245,165,36,0.12); color: #f5a524; border-color: rgba(245,165,36,0.4); }
.om-hint { color: var(--muted); font-style: italic; }

/* node-detail modal */
.omd-kind { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--line); border-radius: 5px; padding: 2px 7px; vertical-align: middle; }
.omd-grade { display: inline-block; font-size: 13px; font-weight: 800; padding: 4px 12px; border-radius: 999px; margin: 6px 0 14px; }
.omd-grade.s-red { background: rgba(229,72,77,0.14); color: #e5484d; } .omd-grade.s-amber { background: rgba(245,165,36,0.16); color: #f5a524; } .omd-grade.s-green { background: rgba(47,191,113,0.14); color: #2fbf71; } .omd-grade.s-none { background: var(--line); color: var(--muted); }
.omd-stats { display: flex; gap: 22px; }
.omd-n { font-size: 26px; font-weight: 800; color: var(--ink); }
.omd-n.g-red { color: #e5484d; } .omd-n.g-amber { color: #f5a524; }
.omd-cap { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* ── Org map: NIST letter-grade colour system (A green / B blue / C yellow / D-F red) ── */
.s-blue { fill: #4a9eff; } .s-yellow { fill: #f5c542; }
.om-grade { stroke: var(--paper); stroke-width: 1.5; }
.om-gradetxt { fill: #fff; font: 800 11px 'Inter', system-ui, sans-serif; }
.om-acct.c-green .om-card { stroke: rgba(47,191,113,0.55); }
.om-acct.c-blue .om-card { stroke: rgba(74,158,255,0.6); }
.om-acct.c-yellow .om-card { stroke: rgba(245,197,66,0.7); }
.om-acct.c-red .om-card { stroke: rgba(229,72,77,0.7); }
.om-acct.c-red .om-grade { animation: ompulse 1.6s ease-in-out infinite; }
.om-failn { fill: #e5484d; font: 700 10px 'Inter', system-ui, sans-serif; }
.om-failn.c-yellow { fill: #f5c542; } .om-failn.c-blue { fill: #4a9eff; } .om-failn.c-green { fill: #2fbf71; }
.om-link.g-blue { stroke: rgba(74,158,255,0.5); } .om-pulse.g-blue { fill: #4a9eff; }
.om-link.g-yellow { stroke: rgba(245,197,66,0.55); } .om-pulse.g-yellow { fill: #f5c542; }
.om-hero.g-blue { border-left-color: #4a9eff; } .om-hero.g-yellow { border-left-color: #f5c542; }
.om-hero-grade.s-blue { color: #4a9eff; } .om-hero-grade.s-yellow { color: #f5c542; }
.om-hero-stats .g-blue b { color: #4a9eff; } .om-hero-stats .g-yellow b { color: #f5c542; }
.om-risk.g-yellow { background: rgba(245,197,66,0.14); color: #d9a400; border-color: rgba(245,197,66,0.4); }
.om-risk.g-red { background: rgba(229,72,77,0.12); color: #e5484d; border-color: rgba(229,72,77,0.4); }
.omd-grade.s-blue { background: rgba(74,158,255,0.14); color: #4a9eff; }
.omd-grade.s-yellow { background: rgba(245,197,66,0.16); color: #c79400; }
.omd-na { font-size: 13px; color: var(--muted); padding: 8px 12px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); margin-bottom: 10px; }
.omd-na b { color: var(--ink); }
.om-glegend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.om-gl { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--muted); }
.om-gdot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.om-gdot.s-green { background: #2fbf71; } .om-gdot.s-blue { background: #4a9eff; }
.om-gdot.s-yellow { background: #f5c542; } .om-gdot.s-red { background: #e5484d; } .om-gdot.s-none { background: #6e7681; }

/* ── Inventory (live accounts) ── */
.inv-role { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 5px; background: var(--line); color: var(--muted); }
.inv-role.k-management { color: #f5a524; } .inv-role.k-audit { color: #7c5cff; } .inv-role.k-log-archive { color: #2dd4bf; } .inv-role.k-workload { color: #79b8ff; }
.inv-grade { display: inline-block; min-width: 20px; text-align: center; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; color: #fff; }
.inv-grade.s-green { background: #2fbf71; } .inv-grade.s-blue { background: #4a9eff; } .inv-grade.s-yellow { background: #f5c542; color: #4a3a00; } .inv-grade.s-red { background: #e5484d; } .inv-grade.s-none { background: var(--line); color: var(--muted); }
.inv-dec { font-size: 11px; font-weight: 700; }
.inv-dec.yes { color: var(--ok, #2fbf71); } .inv-dec.no { color: var(--muted); }

/* ── Graphical LZA pipeline flow (always drawn; status-coloured; AI on failure) ── */
.pl-notice { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; line-height: 1.5; }
.pl-notice.bad { color: #e5484d; }
.pl-notice b { color: var(--ink); } .pl-notice.bad b { color: #e5484d; }
.pl-notice a { color: var(--accent, #79b8ff); text-decoration: none; font-weight: 600; }
.pl-notice a:hover { text-decoration: underline; }
.pl-k { font-weight: 700; } .pl-k.ok { color: #2fbf71; } .pl-k.bad { color: #e5484d; }
.pl-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; }
.pl-stage { display: flex; align-items: center; gap: 7px; padding: 7px 11px; margin: 4px 0;
  border: 1px solid var(--line); border-radius: 9px; background: var(--paper);
  font-size: 12px; font-weight: 600; white-space: nowrap; animation: plin .4s ease both; }
@keyframes plin { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.pl-stage.pl-click { cursor: pointer; transition: border-color .15s, transform .15s; }
.pl-stage.pl-click:hover { border-color: var(--accent, #79b8ff); transform: translateY(-1px); }
.pl-name { color: var(--ink); }
.pl-stage.s-none .pl-name { color: var(--muted); }
.pl-dot { width: 8px; height: 8px; border-radius: 50%; background: #6e7681; flex: 0 0 auto; }
.pl-stage.s-ok .pl-dot { background: #2fbf71; }
.pl-stage.s-bad .pl-dot { background: #e5484d; animation: ompulse 1.4s ease-in-out infinite; }
.pl-stage.s-run .pl-dot { background: #f5c542; animation: ompulse 1.2s ease-in-out infinite; }
.pl-stage.s-ok { border-color: rgba(47,191,113,0.4); }
.pl-stage.s-bad { border-color: rgba(229,72,77,0.55); background: rgba(229,72,77,0.06); }
.pl-stage.s-run { border-color: rgba(245,197,66,0.5); }
.pl-conn { width: 14px; height: 2px; background: var(--line); flex: 0 0 auto; border-radius: 2px; }
.pl-conn.s-ok { background: linear-gradient(90deg, #2fbf71, #2fbf71 60%, var(--line)); background-size: 200% 100%; animation: plflow 1.6s linear infinite; }
@keyframes plflow { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ── Policy AI customization box ── */
.pol-aibox { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); margin: 0 0 14px; overflow: hidden; }
.pol-aibox > summary { list-style: none; cursor: pointer; padding: 12px 16px; font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 7px; user-select: none; }
.pol-aibox > summary::-webkit-details-marker { display: none; }
.pol-aibox > summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .15s; }
.pol-aibox[open] > summary::after { transform: rotate(180deg); }
.pol-aibox-ic { color: #a371f7; font-size: 14px; }
.pol-aibox-sub { font-weight: 500; color: var(--muted); }
.pol-aibox-body { padding: 0 16px 16px; }
.pol-aibox-body p { margin: 0 0 10px; line-height: 1.5; }
.pol-aibox-body textarea { width: 100%; box-sizing: border-box; resize: vertical; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; color: var(--ink); font: inherit; font-size: 13px; }
.pol-aibox-body textarea:focus { outline: none; border-color: #a371f7; }
.pol-aibox-body .row.actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }

/* ── Per-control proof window ── */
.sec-proof { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 6px 0 4px; background: var(--bg); }
.proof-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.proof-badge { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 6px; }
.proof-badge.cloudtrail { background: rgba(121,184,255,0.16); color: #79b8ff; }
.proof-badge.config { background: rgba(45,212,191,0.16); color: #2dd4bf; }
.proof-status { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; padding: 3px 9px; border-radius: 999px; }
.proof-status.ok { background: rgba(47,191,113,0.16); color: var(--ok); }
.proof-status.bad { background: rgba(229,72,77,0.16); color: var(--crit); }
.proof-status.unknown { background: var(--line); color: var(--muted); }
.proof-count { font-size: 12px; color: var(--muted); }
.proof-explain { font-size: 13px; line-height: 1.55; color: var(--ink); margin-bottom: 12px; }
.proof-lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin: 10px 0 6px; }
.proof-rec { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.proof-kv { display: flex; gap: 12px; padding: 6px 12px; font-size: 12.5px; border-top: 1px solid var(--line); }
.proof-kv:first-child { border-top: none; }
.proof-k { flex: 0 0 150px; color: var(--muted); }
.proof-v { color: var(--ink); word-break: break-all; }
.proof-v code { font-size: 11.5px; }
.proof-found, .proof-raw { margin-top: 10px; }
.proof-found summary, .proof-raw summary { cursor: pointer; font-size: 12.5px; color: var(--sec); }
.proof-json { max-height: 280px; overflow: auto; font-size: 11px; line-height: 1.45; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-top: 8px; }
.sec-ovrnote { font-size: 12.5px; padding: 8px 12px; border-radius: 8px; background: rgba(245,165,36,0.1); color: var(--high); margin-bottom: 10px; }

/* ── Operate: grouped left nav (replaces the two top tab rows) ── */
#opSidebar { display: none; }
body[data-screen="operate"] .shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); column-gap: 26px; align-items: start; }
body[data-screen="operate"] #trackBar { grid-column: 1 / -1; }
body[data-screen="operate"] #spokeNav,
body[data-screen="operate"] #opMore,
body[data-screen="operate"].mode-migration #migSubNav { display: none !important; }
body[data-screen="operate"] #opSidebar {
  display: flex; flex-direction: column; gap: 3px;
  grid-column: 1; grid-row: 2 / span 60; position: sticky; top: 18px; align-self: start;
  padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: var(--shadow-1);
}
.opx-item, .opx-head { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: none; background: transparent; color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; padding: 9px 12px; border-radius: 9px; cursor: pointer; transition: background .14s ease, color .14s ease; position: relative; }
.opx-ico { width: 18px; text-align: center; opacity: .82; font-size: 14px; flex: 0 0 auto; }
.opx-item:hover, .opx-head:hover { background: rgba(121,184,255,0.09); }
.opx-item.active { background: rgba(121,184,255,0.15); color: var(--accent, #79b8ff); }
.opx-item.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--accent, #79b8ff); transform-origin: center; animation: opxbar .25s ease; }
@keyframes opxbar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.opx-solo { font-weight: 700; }
.opx-group { margin-top: 4px; }
.opx-head { color: var(--muted); font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.opx-caret { margin-left: auto; font-style: normal; font-size: 10px; opacity: .7; transition: transform .22s ease; }
.opx-group.collapsed .opx-caret { transform: rotate(-90deg); }
.opx-sub { display: flex; flex-direction: column; gap: 2px; overflow: hidden; max-height: 820px; opacity: 1; padding-left: 8px; transition: max-height .3s ease, opacity .2s ease, margin .2s ease; }
.opx-group.collapsed .opx-sub { max-height: 0; opacity: 0; }
.opx-sub .opx-item { font-size: 13px; padding: 7px 12px; }
.opx-sublabel { font-size: 9.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 10px 12px 4px; display: flex; align-items: center; gap: 6px; opacity: .8; }
.opx-sub .opx-item.active::before { left: -8px; }
body[data-screen="operate"] #opSidebar > * { animation: opxin .34s ease both; }
body[data-screen="operate"] #opSidebar > *:nth-child(1) { animation-delay: .03s; }
body[data-screen="operate"] #opSidebar > *:nth-child(2) { animation-delay: .08s; }
body[data-screen="operate"] #opSidebar > *:nth-child(3) { animation-delay: .13s; }
body[data-screen="operate"] #opSidebar > *:nth-child(4) { animation-delay: .18s; }
body[data-screen="operate"] #opSidebar > *:nth-child(5) { animation-delay: .23s; }
@keyframes opxin { from { opacity: 0; transform: translateX(-9px); } to { opacity: 1; transform: none; } }
/* live status badges on the operate nav */
.opx-num { margin-left: auto; min-width: 18px; text-align: center; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--line); color: var(--muted); animation: opxpop .3s ease; }
.opx-num.warn { background: rgba(245,165,36,0.16); color: #f5a524; }
.opx-num:empty { display: none; }
.opx-status { width: 8px; height: 8px; border-radius: 50%; margin-left: auto; flex: 0 0 auto; }
.opx-status.s-red { background: #e5484d; box-shadow: 0 0 0 3px rgba(229,72,77,0.16); animation: ompulse 1.6s ease-in-out infinite; }
.opx-status.s-amber { background: #f5a524; box-shadow: 0 0 0 3px rgba(245,165,36,0.16); }
.opx-status.s-green { background: #2fbf71; box-shadow: 0 0 0 3px rgba(47,191,113,0.16); }
@keyframes opxpop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
