: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); }

/* ── Suite bar — the platform chrome + app switcher (uses --su-* tokens) ── */
.suite-bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  height: var(--su-bar-h); padding: 0 18px;
  background: var(--su-ground); border-bottom: 1px solid var(--su-line);
  font-family: var(--su-sans); color: var(--su-ink-2);
}
.su-brand { display: flex; align-items: center; gap: 8px; }
.su-mark { color: var(--su-accent); font-size: 13px; }
.su-brand-t { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--su-muted); }
.su-switch { position: relative; }
.su-switch-btn { display: flex; align-items: center; gap: 8px; font: inherit; font-size: 13px; font-weight: 600; color: var(--su-ink); background: var(--su-panel); border: 1px solid var(--su-line-strong); border-radius: var(--su-r-pill); padding: 5px 13px; cursor: pointer; }
.su-switch-btn:hover { border-color: var(--su-accent); }
.su-chev { color: var(--su-muted); font-size: 10px; }
.su-menu { position: absolute; top: calc(100% + 8px); left: 0; width: 308px; background: var(--su-panel); border: 1px solid var(--su-line-strong); border-radius: var(--su-r-md); box-shadow: var(--su-shadow-2); padding: 6px; z-index: 40; }
.su-item { display: flex; align-items: center; gap: 12px; padding: 9px 11px; border-radius: var(--su-r-sm); text-decoration: none; color: var(--su-ink); }
.su-item:hover { background: var(--su-panel-2); }
.su-item.current { background: var(--su-accent-wash); }
.su-item-ic { font-size: 18px; flex: none; }
.su-item-t { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 1px; }
.su-item-cat { font-size: 9px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--su-accent); }
.su-item-t b { font-size: 13.5px; }
.su-item-d { font-size: 11px; color: var(--su-muted); }
.su-item-chk { color: var(--su-good); font-weight: 800; flex: none; }
.su-item-arr { color: var(--su-muted); flex: none; }
.su-spacer { flex: 1; }
.su-link { font-size: 11.5px; color: var(--su-muted); text-decoration: none; }
.su-link:hover { color: var(--su-accent); }
@media (max-width: 560px) { .su-brand-t, .su-link { display: none; } .su-menu { width: calc(100vw - 36px); } }

.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: var(--su-bar-h); 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; }
/* Stacked home: the five tracks run across the top, then the org map gets the FULL
   width beneath. The map is the densest thing on the page and was boxed into a
   320px-narrower column by the left nav rail. DOM order already puts the nav
   first, so this is purely a grid change — the same single-column shape the
   narrow breakpoint always used, now applied at every width. */
.home-2col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 6px; }
.home-nav .home-cards-h { margin: 0 0 4px; }
.home-nav .hub-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: 10px 0 0; }
.home-main { min-width: 0; }
@media (max-width: 920px) {

  .home-nav .hub-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
.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: 12px 16px; text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px; vertical-align: middle;
}
.grid td:first-child { font-weight: 600; }
/* Only long policy-ARN chips may break to keep the table inside its card —
   never names, headers, or OU targets (those stay on clean single tokens) */
.grid .chip { overflow-wrap: anywhere; }
.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-size: 12px; color: var(--indigo); font-weight: 600; letter-spacing: .1px;
}
.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-flex; align-items: center; padding: 3px 10px; margin: 2px 5px 3px 0;
  background: var(--paper-2);
  border: 1px solid var(--line); border-radius: 7px;
  font-size: 11px; font-weight: 600; letter-spacing: .1px;
  color: var(--ink-2, var(--ink));
}
.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;
}
.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,
html.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,
html.theme-dark body {
  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,
html.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: rgba(255,255,255,0.015);
  color: var(--muted);
  border-bottom: 1px 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: rgba(255,255,255,0.03);
  border-color: var(--line-strong);
  color: var(--ink-2);
  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); opacity: .55; cursor: not-allowed; }
body.theme-dark .btn.danger { background: rgba(229,72,77,.12); color: var(--crimson, #e5484d); border-color: rgba(229,72,77,.55); }
body.theme-dark .btn.danger:hover { background: var(--crimson, #e5484d); color: #fff; border-color: var(--crimson, #e5484d); }

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; }

/* ── Support form ─────────────────────────────────────────────── */
.sup-card { max-width: 640px; padding: 0; display: flex; flex-direction: column; }
.sup-head { display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.sup-head .sup-x { flex: 0 0 auto; }
.sup-body { padding: 16px 22px 6px; overflow-y: auto; }
.sup-foot { display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 14px 22px; border-top: 1px solid var(--line);
  background: var(--paper-2); border-radius: 0 0 10px 10px; }
.sup-l { display: block; font-size: 12px; font-weight: 700; color: var(--muted);
  margin: 14px 0 5px; letter-spacing: .01em; }
.sup-l:first-child { margin-top: 0; }
.sup-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sup-ta, .sup-mono { width: 100%; resize: vertical; line-height: 1.5; }
.sup-mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; }
.sup-file { display: block; width: 100%; font-size: 12.5px; color: var(--muted);
  padding: 7px 0; }
.sup-file::file-selector-button { font: inherit; font-weight: 700; font-size: 12px;
  margin-right: 10px; padding: 6px 12px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); }
.svc-seg-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.svc-seg { font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--paper); color: var(--muted); transition: all .12s ease; }
.svc-seg:hover { border-color: var(--accent, #79b8ff); color: var(--ink); }
.svc-seg.on { border-color: var(--accent, #79b8ff); color: var(--accent, #79b8ff);
  background: rgba(121,184,255,0.12); }
.sup-diag { margin: 16px 0 4px; font-size: 12.5px; }
.sup-diag summary { cursor: pointer; color: var(--muted); font-weight: 700; }
.sup-diag-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px;
  margin: 10px 0 4px; padding: 12px 14px; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: 8px; }
.sup-diag-row { display: flex; justify-content: space-between; gap: 10px;
  font-size: 12px; }
.sup-diag-row span { color: var(--muted); font-weight: 600; }
.sup-diag-row b { color: var(--ink); font-weight: 700; text-align: right;
  word-break: break-word; }
.sup-status { flex: 1; }
.sup-done { text-align: center; padding: 34px 28px 30px; }
.sup-done-mark { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center; font-size: 26px; font-weight: 800;
  color: #fff; background: #2ea043; box-shadow: 0 6px 18px rgba(46,160,67,.4); }
.sup-done h3 { margin: 0 0 6px; }
.sup-done p { margin: 6px auto; max-width: 42ch; line-height: 1.55; }
.sup-ticket { display: inline-block; margin: 12px 0 6px; padding: 8px 18px;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 18px;
  font-weight: 800; letter-spacing: .04em; color: var(--accent, #79b8ff);
  border: 1px dashed var(--accent, #79b8ff); border-radius: 8px;
  background: rgba(121,184,255,0.08); }
.sup-done .btn { margin-top: 16px; }
@media (max-width: 560px) { .sup-two, .sup-diag-grid { grid-template-columns: 1fr; } }
.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); }

/* Global pipeline chip — appears on every screen while a landing-zone change deploys,
   animating to draw the eye and pointing to where to watch it. */
.lza-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: 999px; cursor: pointer; font: inherit;
  font-size: 12px; font-weight: 600; color: #cdbcff;
  background: rgba(124,92,255,0.14); border: 1px solid rgba(124,92,255,0.5);
  animation: lzaChipGlow 2s ease-in-out infinite;
}
.lza-chip:hover { background: rgba(124,92,255,0.24); }
.lza-chip-dot { width: 8px; height: 8px; border-radius: 50%; background: #7c5cff;
  animation: lzaChipPulse 1.3s ease-in-out infinite; }
.lza-chip-go { opacity: .82; font-weight: 700; }
.lza-chip.failed { color: #ffb4b4; background: rgba(163,45,45,0.16);
  border-color: rgba(163,45,45,0.6); animation: none; }
.lza-chip.failed .lza-chip-dot { background: #e46a6a; animation: none; }
@keyframes lzaChipPulse { 0%,100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.55); opacity: .5; } }
@keyframes lzaChipGlow { 0%,100% { box-shadow: 0 0 0 0 rgba(124,92,255,0.5); }
  50% { box-shadow: 0 0 0 5px rgba(124,92,255,0); } }
@media (prefers-reduced-motion: reduce) {
  .lza-chip, .lza-chip-dot { animation: none !important; }
}

@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; }
/* Controls — status card grid (layout B): severity-edged cards, prominent control number */
.sec-worklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; align-items: start; }
.sec-worklist .sec-card { border: 1px solid var(--line); border-left: 4px solid var(--edge, var(--line)); border-radius: 12px; background: var(--paper); overflow: hidden; }
.sec-worklist .sec-card.edge-hi { --edge: var(--crit); }
.sec-worklist .sec-card.edge-med { --edge: var(--high); }
.sec-worklist .sec-card.edge-lo { --edge: var(--dim); }
.sec-worklist .sec-card.edge-ok { --edge: var(--ok, #2fbf71); }
.sec-worklist .sec-card.edge-ovr { --edge: var(--dim); }
.sec-card .sec-row-head { display: flex; flex-direction: column; align-items: stretch; gap: 7px; padding: 13px 15px; cursor: pointer; }
.sec-card .sec-row-head:hover, .sec-card.open .sec-row-head { background: var(--paper-2); }
.scard-top { display: flex; align-items: flex-start; gap: 9px; }
.scard-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.sec-card .sec-cid { font-size: 17px; letter-spacing: -0.01em; color: var(--text); }
.sec-svc { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10.5px; font-weight: 700; color: var(--muted); background: var(--line); border-radius: 5px; padding: 1px 6px; }
.sec-card .sec-chev { margin-left: auto; }
.sec-card .sec-rtitle { flex: none; white-space: normal; overflow: visible; font-size: 13.5px; line-height: 1.45; color: var(--text); }
.scard-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.scard-nist { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10.5px; color: var(--muted); }
.scard-safety { font-size: 10.5px; font-weight: 700; padding: 1px 8px; border-radius: 20px; white-space: nowrap; }
.scard-safety.ss-safe { background: rgba(47,191,113,0.14); color: var(--ok); }
.scard-safety.ss-caution { background: rgba(245,165,36,0.16); color: var(--high); }
.scard-safety.ss-risky { background: rgba(229,72,77,0.14); color: var(--crit); }
.sec-dethead { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; padding: 2px 0 11px; }
.sec-dethead .sec-cid { font-size: 16px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 700; }
/* NIST 800-53 control(s) are the headline — biggest, boldest, top-left — on card + detail */
.sec-card .sec-nisthead, .sec-dethead .sec-nisthead { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 19px; font-weight: 800; letter-spacing: 0.01em; color: var(--ink); }
.sec-detttl { font-size: 13px; color: var(--muted); line-height: 1.4; }
.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-issue { margin: 8px 0 4px; padding: 11px 13px; border: 1px solid var(--line); border-left: 3px solid var(--crit, #e5484d); border-radius: 10px; background: var(--bg); }
.sec-issue .proof-lbl { margin-bottom: 6px; }
.sec-issue .sec-txt { margin-bottom: 0; }
.sec-issue .sec-txt b { color: var(--crit, #e5484d); }
.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 { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; padding: 10px 12px; border-radius: 10px; margin: 12px 0; line-height: 1.45; }
.sec-safety .ss-ico { font-size: 17px; flex: none; line-height: 1.2; }
.sec-safety .ss-t { font-weight: 700; font-size: 13px; }
.sec-safety .ss-d { opacity: 0.92; margin-top: 2px; }
.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; } }

/* ── ATO Now — the readiness gate (marquee nav item + gate checklist) ── */
.secx-navitem.ato { color: var(--sec); font-weight: 800; margin-bottom: 5px; }
.secx-navitem.ato .secx-ico { opacity: 1; color: var(--sec); }
.secx-navitem.ato:hover { background: rgba(124,92,255,0.10); }

.ato-hero { display: flex; align-items: center; gap: 20px; padding: 18px 22px; margin-bottom: 18px;
  border: 1px solid var(--line); border-top: 3px solid var(--sec); border-radius: 16px; background: var(--paper); }
.ato-hero.rdy { border-top-color: var(--ok); background: rgba(47,191,113,0.05); }
.ato-hero.adv { border-top-color: var(--high); background: rgba(245,165,36,0.05); }
.ato-hero.blk { border-top-color: var(--sec); }
.ato-hero-txt { flex: 1 1 auto; min-width: 0; }
.ato-verdict { font-size: 21px; font-weight: 800; letter-spacing: -0.3px; color: var(--ink); }
.ato-hero.rdy .ato-verdict { color: var(--ok); }
.ato-hero.adv .ato-verdict { color: var(--high); }
.ato-vsub { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.5; max-width: 74ch; }
.ato-count { flex: 0 0 auto; text-align: center; }
.ato-count-n { display: block; font-size: 24px; font-weight: 800; color: var(--ink); }
.ato-count-l { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.ato-produce { flex: 0 0 auto; font: inherit; font-size: 13.5px; font-weight: 700; padding: 10px 18px;
  border-radius: 10px; border: 1px solid var(--ok); background: var(--ok); color: #fff; cursor: pointer; }
.ato-produce:hover { filter: brightness(1.06); }

.ato-ring { flex: 0 0 84px; transform: rotate(-90deg); }
.ato-ring-bg { fill: none; stroke: var(--line); stroke-width: 6; }
.ato-ring-fg { fill: none; stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset .5s ease; }
.ato-ring-fg.rdy { stroke: var(--ok); }
.ato-ring-fg.blk { stroke: var(--sec); }
.ato-ring-n { transform: rotate(90deg); transform-origin: 42px 42px; text-anchor: middle; font-size: 16px; font-weight: 800; fill: var(--ink); }
.ato-ring-l { transform: rotate(90deg); transform-origin: 42px 42px; text-anchor: middle; font-size: 9px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; fill: var(--muted); }

.ato-gates { display: flex; flex-direction: column; gap: 10px; }
.ato-g { display: flex; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); }
.ato-g.fail { border-left: 3px solid var(--crit); }
.ato-g.partial { border-left: 3px solid var(--high); }
.ato-g.pass { border-left: 3px solid var(--ok); background: var(--paper-2); }
.ato-g-ico { flex: 0 0 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; color: #fff; }
.ato-g.pass .ato-g-ico { background: var(--ok); }
.ato-g.partial .ato-g-ico { background: var(--high); }
.ato-g.fail .ato-g-ico { background: var(--crit); }
.ato-g-body { flex: 1 1 auto; min-width: 0; }
.ato-g-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.ato-g-label { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.ato-g-cat { font-size: 10.5px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: var(--muted); padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; }
.ato-g-metric { font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.ato-g-word { margin-left: auto; font-size: 11.5px; font-weight: 700; padding: 2px 10px; border-radius: 7px; }
.ato-g-word.pass { background: rgba(47,191,113,0.12); color: var(--ok); }
.ato-g-word.partial { background: rgba(245,165,36,0.14); color: var(--high); }
.ato-g-word.fail { background: rgba(229,72,77,0.12); color: var(--crit); }
.ato-g-detail { font-size: 12.8px; color: var(--ink-2, var(--ink)); line-height: 1.55; margin-top: 6px; }
.ato-g-todo { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-top: 8px; padding: 8px 11px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 9px; }
.ato-g-todo-k { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; color: var(--sec); margin-right: 8px; }
.ato-g-acts { display: flex; gap: 8px; margin-top: 11px; }
.ato-g-fix, .ato-g-verify { font: inherit; font-size: 12px; font-weight: 600; padding: 6px 13px; border-radius: 8px; cursor: pointer; }
.ato-g-fix { border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); }
.ato-g-fix:hover { border-color: var(--sec); color: var(--sec); }
.ato-g-verify { border: 1px solid var(--sec); background: var(--sec); color: #fff; }
.ato-g-verify:hover { filter: brightness(1.08); }
.ato-g-verify:disabled { opacity: 0.6; cursor: default; }

.ato-pkg { margin-top: 18px; padding: 18px 20px; border: 1px solid var(--line); border-top: 3px solid var(--ok); border-radius: 16px; background: var(--paper); }
.ato-pkg-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ato-pkg-title { font-size: 16px; font-weight: 800; color: var(--ink); }
.ato-pkg-sub { font-size: 12.5px; color: var(--muted); }
.ato-pkg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ato-pkg-doc { border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; background: var(--paper-2); }
.ato-pkg-t { font-size: 13px; font-weight: 700; color: var(--ink); }
.ato-pkg-f { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.ato-pkg-acts { display: flex; gap: 9px; flex-wrap: wrap; }

/* ── 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-reset { font: inherit; font-size: 13px; font-weight: 600; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--muted); cursor: pointer; white-space: nowrap; transition: border-color .14s ease, color .14s ease; }
.secx-reset:hover { border-color: var(--indigo, #79b8ff); color: var(--ink); }
.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-bl { font-size: 10.5px; font-weight: 700; border-radius: 5px; padding: 1px 6px; border: 1px solid transparent; }
.sec-bl.bl-low { color: #2fbf71; background: rgba(47,191,113,0.12); border-color: rgba(47,191,113,0.30); }
.sec-bl.bl-moderate { color: #e0a800; background: rgba(224,168,0,0.12); border-color: rgba(224,168,0,0.30); }
.sec-bl.bl-high { color: #e5484d; background: rgba(229,72,77,0.12); border-color: rgba(229,72,77,0.30); }
.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: radial-gradient(1200px 760px at 50% 42%, #0e1320, #070910 72%); }
.wall[hidden] { display: none; }
/* The Live Wall now renders the Org Map (its om-pulse flows are the fluid data
   movement); the legacy particle canvas is retired. */
.wall-canvas { display: none; }
.wall-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.wall-stage .om-scroll { border: none; background: transparent; padding: 0; overflow: visible; box-shadow: none; transition: transform .25s ease; }
.wall-stage .om-svg { filter: drop-shadow(0 0 26px rgba(124, 92, 255, 0.18)); }

/* Collapsible org directory tree (Org Map view + Live Wall) */
.orgtree { max-width: 760px; margin: 0 auto; }
.ot-root { display: flex; align-items: center; gap: 10px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); font-size: 15px; }
.ot-rico { color: var(--indigo, #7c5cff); font-size: 16px; }
.ot-tree { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.ot-ou { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--paper); }
.ot-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; cursor: pointer; padding: 11px 15px; font: inherit; color: var(--ink); }
.ot-ouhdr:hover, .ot-acct:hover { background: rgba(127, 140, 180, 0.08); }
.ot-caret { flex: 0 0 12px; width: 12px; color: var(--muted); font-size: 10px; }
.ot-folder { color: var(--indigo, #7c5cff); font-size: 13px; }
.ot-name { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ot-kind { font-size: 10.5px; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.ot-count { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.ot-accts { border-top: 1px solid var(--line); }
.ot-acct { padding-left: 38px; border-top: 1px solid rgba(127, 127, 127, 0.08); }
.ot-acct:first-child { border-top: 0; }
.ot-fail { color: #e5484d; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.ot-susp { opacity: .55; }
.ot-grade { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 800; }
.ot-grade.g-green { background: rgba(47, 191, 113, 0.16); color: #2fbf71; }
.ot-grade.g-blue { background: rgba(74, 158, 255, 0.16); color: #4a9eff; }
.ot-grade.g-yellow { background: rgba(245, 197, 66, 0.16); color: #f5c542; }
.ot-grade.g-red { background: rgba(229, 72, 77, 0.16); color: #e5484d; }
.ot-grade.g-none { background: rgba(127, 127, 127, 0.12); color: var(--muted); }
/* Live Wall: bigger + scrollable, themed dark */
.wall-stage .orgtree { width: 92%; max-width: 720px; max-height: 84vh; overflow-y: auto; font-size: 15px; }
.wall-stage .ot-root, .wall-stage .ot-ou { background: rgba(255, 255, 255, 0.03); border-color: #232b3a; }
.wall-stage .ot-name { color: #e6edf3; }
.wall-stage .ot-row { padding: 13px 16px; }
.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(--ink-2); background: var(--paper-2); border: 1px solid var(--line-strong); border-radius: 7px; padding: 2px 8px; letter-spacing: .2px; }
.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); }
/* Control id — a designed identifier pill, not raw <code> */
.gr-cid { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10.5px; font-weight: 600; letter-spacing: .3px; color: var(--indigo, #7c5cff); background: rgba(124,92,255,0.10); border: 1px solid rgba(124,92,255,0.25); border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.gr-cname { font-weight: 600; color: var(--ink); }
.gr-guide { display: inline-flex; font-size: 10px; font-weight: 800; padding: 2px 9px; border-radius: 999px; letter-spacing: .2px; text-transform: uppercase; white-space: nowrap; }
.gr-guide.g-mandatory { background: rgba(229,72,77,0.14); color: #e5484d; border: 1px solid rgba(229,72,77,.3); } .gr-guide.g-strongly { background: rgba(245,165,36,0.16); color: #f5a524; border: 1px solid rgba(245,165,36,.32); } .gr-guide.g-elective { background: var(--paper-2); color: var(--muted); border: 1px solid var(--line-strong); }
/* Type — subtle labeled dot (Preventive = amber, Detective = blue) */
.gr-behavior { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.gr-behavior::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.gr-behavior.b-preventive::before { background: #f5a524; }
.gr-behavior.b-detective::before { background: var(--indigo, #79b8ff); }
/* Status — pills, not plain text */
.gr-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.gr-status.on { color: #2fbf71; background: rgba(47,191,113,0.12); border: 1px solid rgba(47,191,113,0.32); }
.gr-status.off { color: var(--muted); background: var(--paper-2); border: 1px solid var(--line-strong); }
.gr-status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
/* Frameworks & coverage */
.fw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.fw-tile { border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: 12px; background: var(--paper); padding: 14px 15px; transition: box-shadow .15s, transform .15s, border-color .15s; }
.fw-tile[onclick] { cursor: pointer; }
.fw-tile[onclick]:hover { box-shadow: 0 6px 20px rgba(0,0,0,.28); transform: translateY(-1px); }
.fw-tile.fw-good { border-left-color: #2fbf71; } .fw-tile.fw-warn { border-left-color: #f5a524; } .fw-tile.fw-bad { border-left-color: #e5484d; } .fw-tile.fw-none { border-left-color: var(--muted); } .fw-tile.fw-pending { border-left-color: var(--indigo, #7c5cff); opacity: .82; }
.fw-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fw-name { font-weight: 700; font-size: 13px; color: var(--ink); }
.fw-badge { font-size: 8.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 5px; padding: 1px 5px; }
.fw-badge.pend { color: var(--indigo, #7c5cff); border-color: rgba(124,92,255,.4); }
.fw-cov { font-size: 30px; font-weight: 800; letter-spacing: -.5px; margin: 8px 0 2px; color: var(--ink); }
.fw-tile.fw-good .fw-cov { color: #2fbf71; } .fw-tile.fw-warn .fw-cov { color: #f5a524; } .fw-tile.fw-bad .fw-cov { color: #e5484d; } .fw-tile.fw-pending .fw-cov { color: var(--muted); font-size: 24px; }
.fw-cov-lbl { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: -1px 0 5px; }
.fw-badge.off { color: var(--muted); border-color: var(--line); }
.fw-tile.fw-off { opacity: .9; border-left-color: var(--muted); display: flex; flex-direction: column; }
.fw-off-msg { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 10px 0 12px; }
.fw-off-act { margin-top: auto; }
.fw-toggle { font: inherit; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--muted); cursor: pointer; flex: none; }
.fw-toggle:hover { border-color: var(--sec, #7c5cff); color: var(--sec, #7c5cff); }
.fw-toggle.on { background: rgba(47,191,113,.14); border-color: rgba(47,191,113,.4); color: #2fbf71; }
/* composition bar + colored counts — the "how" behind a framework tile */
.fw-bar { display: flex; gap: 2px; height: 7px; border-radius: 4px; overflow: hidden; margin: 9px 0 9px; background: var(--line); }
.fw-seg { display: block; min-width: 2px; }
.fw-seg.pass { background: #2fbf71; } .fw-seg.fail { background: #f5a524; } .fw-seg.none { background: var(--line-strong); }
.fw-counts { display: flex; flex-wrap: wrap; gap: 6px 13px; font-size: 11px; margin-bottom: 8px; }
.fw-c { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fw-c::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.fw-c.pass::before { background: #2fbf71; } .fw-c.fail::before { background: #f5a524; } .fw-c.none::before { background: var(--line-strong); }
.fw-how { font-size: 10.5px; color: var(--muted); line-height: 1.5; }
.fw-how b { color: var(--ink-2, var(--ink)); font-weight: 700; }
/* framework detail modal — per-family breakdown */
.fwd-h { font-size: 12px; font-weight: 700; color: var(--ink); margin: 16px 0 8px; }
.fwd-fams { display: flex; flex-direction: column; gap: 8px; max-height: 42vh; overflow: auto; }
.fwd-fam { display: grid; grid-template-columns: 34px minmax(90px, 1fr) auto; align-items: center; gap: 12px; }
.fwd-fam-k { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; font-weight: 700; color: var(--sec, #7c5cff); }
.fwd-fam-bar { display: block; }
.fwd-fam-bar .fw-bar { margin: 0; }
.fwd-fam-n { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ── Change Control cockpit ── */
.cg-banner { display: flex; align-items: center; gap: 13px; padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; border: 1px solid var(--line); }
.cg-banner.cg-shadow { background: rgba(245,165,36,.07); border-color: rgba(245,165,36,.35); }
.cg-banner.cg-enforce { background: rgba(47,191,113,.07); border-color: rgba(47,191,113,.35); }
.cg-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.cg-shadow .cg-dot { background: #f5a524; } .cg-enforce .cg-dot { background: #2fbf71; }
.cg-txt { display: flex; flex-direction: column; gap: 2px; }
.cg-txt b { font-size: 13.5px; color: var(--ink); } .cg-txt span { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.cg-await { margin-left: auto; flex: none; font-size: 11.5px; font-weight: 700; color: var(--sec, #7c5cff); background: rgba(124,92,255,.12); border-radius: 999px; padding: 3px 11px; }

.cg-card { background: var(--paper); border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; margin-bottom: 11px; }
.cg-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cg-title { font-size: 14.5px; font-weight: 680; color: var(--ink); }
.cg-branch { margin-left: auto; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; color: var(--muted); background: var(--paper-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; }
.cg-state { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 9px; border-radius: 6px; }
.st-gray { color: var(--muted); background: var(--line); }
.st-blue { color: #3aa0ff; background: rgba(58,160,255,.13); }
.st-green { color: #2fbf71; background: rgba(47,191,113,.13); }
.st-indigo { color: var(--sec, #7c5cff); background: rgba(124,92,255,.14); }
.st-amber { color: #d68a00; background: rgba(245,165,36,.16); }
.st-red { color: #e5484d; background: rgba(229,72,77,.13); }
.st-muted { color: var(--muted); background: var(--line); opacity: .8; }
.cg-verdict { font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: 6px; }
.vb-pass { color: #2fbf71; background: rgba(47,191,113,.12); }
.vb-exc { color: #d68a00; background: rgba(245,165,36,.15); }
.vb-fail { color: #e5484d; background: rgba(229,72,77,.12); }
.cg-meta { font-size: 12.5px; color: var(--muted); margin-top: 7px; }
.cg-meta b { color: var(--ink-2, var(--ink)); }
.cg-vsum { font-size: 12.8px; color: var(--ink-2, var(--ink)); margin-top: 6px; line-height: 1.5; }
.cg-timeline { margin-top: 9px; }
.cg-timeline > summary { cursor: pointer; font-size: 11.5px; color: var(--muted); list-style: none; }
.cg-timeline > summary::-webkit-details-marker { display: none; }
.cg-timeline > summary::before { content: "▸ "; }
.cg-timeline[open] > summary::before { content: "▾ "; }
.cg-evs { margin-top: 7px; display: flex; flex-direction: column; gap: 5px; border-left: 2px solid var(--line); padding-left: 12px; }
.cg-ev { display: flex; gap: 10px; font-size: 11.5px; align-items: baseline; }
.cg-ev-s { font-weight: 700; color: var(--ink-2, var(--ink)); min-width: 70px; }
.cg-ev-m { color: var(--muted); flex: 1; }
.cg-ev-by { color: var(--faint, #8b8f9a); font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10.5px; }
.cg-acts { display: flex; gap: 8px; margin-top: 12px; }
.cg-btn { font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 14px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); cursor: pointer; }
.cg-btn:hover { border-color: var(--sec, #7c5cff); }
.cg-btn.primary { background: var(--sec, #7c5cff); border-color: var(--sec, #7c5cff); color: #fff; }
.cg-btn.primary:hover { filter: brightness(1.08); }
.cg-btn.ghost { color: var(--muted); }
.cg-btn.xs { font-size: 11.5px; padding: 4px 11px; }
.cg-btn.danger { color: #e5484d; border-color: rgba(229,72,77,.4); background: rgba(229,72,77,.06); }
.cg-btn.danger:hover { border-color: #e5484d; background: rgba(229,72,77,.12); }

/* lock chip — is main actually locked? (branch protection, read live) */
.cg-lock { margin-left: auto; flex: none; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 11px; border: 1px solid var(--line-strong); }
.cg-lock-on { color: #2fbf71; background: rgba(47,191,113,.12); border-color: rgba(47,191,113,.35); }
.cg-lock-off { color: #d68a00; background: rgba(245,165,36,.13); border-color: rgba(245,165,36,.4); }
.cg-lock-unknown { color: var(--muted); background: var(--line); }
.cg-lock + .cg-await { margin-left: 0; }

/* break-glass strip — the governed emergency override */
.cg-bg { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 11px; margin: -6px 0 16px; border: 1px dashed var(--line-strong); background: var(--paper); }
.cg-bg.open { border-style: solid; border-color: rgba(229,72,77,.55); background: rgba(229,72,77,.07); }
.cg-bg-ic { font-size: 15px; flex: none; }
.cg-bg.open .cg-bg-ic { color: #e5484d; }
.cg-bg-ic.muted { color: var(--faint, #8b8f9a); }
.cg-bg-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cg-bg-txt b { font-size: 12.5px; color: #e5484d; letter-spacing: .02em; }
.cg-bg-txt span { font-size: 12px; color: var(--muted); line-height: 1.45; }
.cg-bg-txt code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10.5px; color: var(--ink-2, var(--ink)); background: var(--paper-2); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }
.cg-bg .cg-btn { margin-left: auto; flex: none; }
.fw-sub { font-size: 11px; color: var(--muted); line-height: 1.4; }
.cov-summary { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.cov-big { font-size: 26px; font-weight: 800; color: var(--indigo, #7c5cff); letter-spacing: -.5px; }
.cov-lbl { font-size: 12px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.cov-fams { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.cov-fam { font-size: 11px; color: var(--ink-2); background: var(--paper-2); border: 1px solid var(--line-strong); border-radius: 7px; padding: 3px 9px; }
.cov-fam b { color: var(--indigo, #7c5cff); }
.resp-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin: 12px 0 8px; border: 1px solid var(--line); }
.resp-seg.aws { background: #2fbf71; } .resp-seg.both { background: #f5a524; } .resp-seg.customer { background: var(--indigo, #7c5cff); }
.resp-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 11.5px; }
.resp-k { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; }
.resp-k::before { content: ""; width: 9px; height: 9px; border-radius: 3px; }
.resp-k.aws::before { background: #2fbf71; } .resp-k.both::before { background: #f5a524; } .resp-k.customer::before { background: var(--indigo, #7c5cff); }
.lp-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 14px; }
.lp-stat { min-width: 92px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: var(--paper); }
.lp-stat.bad { border-color: rgba(229,72,77,.4); } .lp-stat.warn { border-color: rgba(245,165,36,.4); }
.lp-n { font-size: 22px; font-weight: 800; color: var(--muted); }
.lp-stat.bad .lp-n { color: #e5484d; } .lp-stat.warn .lp-n { color: #f5a524; }
.lp-l { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-top: 2px; }
.ato-md h4 { font-size: 13px; font-weight: 800; color: var(--indigo, #7c5cff); margin: 14px 0 5px; text-transform: uppercase; letter-spacing: .03em; }
.ato-md h4:first-child { margin-top: 0; }
.ato-md p { font-size: 13.5px; line-height: 1.6; margin: 4px 0; color: var(--ink-2); }
.ato-md ul { margin: 4px 0 4px 4px; padding-left: 18px; }
.ato-md li { font-size: 13px; line-height: 1.55; margin: 2px 0; color: var(--ink-2); }
.ato-md b { color: var(--ink); }
.sec-wayfind { margin-top: 12px; font-size: 12px; color: var(--muted); }
.sec-wayfind a { color: var(--indigo, #7c5cff); font-weight: 600; text-decoration: none; }
.sec-wayfind a:hover { text-decoration: underline; }

/* 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; padding-top: 8px; padding-bottom: 8px; }
.exp-tbl code { background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 11px; }
.exp-tbl tbody tr { transition: background .12s ease; }
.exp-tbl tbody tr:hover { background: rgba(121,184,255,0.07); }
.exp-rt { font-weight: 600; color: var(--ink-2); }
.exp-id { display: inline-flex; flex-direction: column; line-height: 1.3; max-width: 360px; }
.exp-id-n { font-weight: 600; color: var(--ink-2); font-size: 12.5px; word-break: break-all; transition: color .12s ease; }
.exp-id-c { color: var(--dim); font-size: 10.5px; margin-top: 1px; }
.exp-tbl tbody tr:hover .exp-id-n { color: var(--indigo); }
.exp-act { display: flex; flex-wrap: wrap; gap: 4px; }
.exp-act-i { font-size: 10.5px; color: var(--muted); background: var(--paper-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; white-space: nowrap; }
.exp-tbl tbody tr:hover .exp-act-i { border-color: var(--line-strong); color: var(--ink-2); }
.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); }
.exp-trusted { font-size: 10px; font-weight: 800; color: #2fbf71; background: rgba(47,191,113,0.13); border-radius: 5px; padding: 1px 7px; }
/* Directional external-access flow: WHO ⟶ WHAT, arrow colored by access kind */
.exp-flow th:nth-child(2) { width: 140px; }
.exp-flow-arr { text-align: center; white-space: nowrap; vertical-align: middle; }
.exp-flow-arr .exp-arr-act { display: block; font-size: 9.5px; color: var(--muted); line-height: 1.2; margin-bottom: 1px; font-family: "JetBrains Mono", ui-monospace, monospace; }
.exp-flow-arr .exp-arr-line { display: block; font-size: 20px; line-height: .8; color: var(--muted); }
.exp-flow-arr.k-public .exp-arr-line { color: #e5484d; }
.exp-flow-arr.k-external .exp-arr-line { color: var(--high, #f5a524); }
.exp-flow-arr.k-inorg .exp-arr-line { color: var(--indigo, #7c5cff); }
.exp-flow-arr.k-sso .exp-arr-line { color: #2fbf71; }
.exp-to .exp-rt { display: block; font-size: 10px; margin-top: 1px; }
.exp-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; font-size: 12px; color: var(--muted); margin: 6px 0 12px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.exp-legend b { color: var(--ink); }
.exp-leg-arr { color: var(--indigo, #7c5cff); font-size: 15px; font-weight: 700; vertical-align: middle; }
.exp-leg-kinds { display: flex; flex-wrap: wrap; gap: 5px 16px; align-items: center; }
.exp-leg-k { display: inline-flex; align-items: center; gap: 5px; }
.exp-trustedn { font-size: 11px; font-weight: 700; color: #2fbf71; }
.exp-extn { font-size: 11px; font-weight: 700; color: var(--high, #f5a524); }
.exp-tr-ok td { opacity: 0.6; }

/* Security Alerts */
.alerts-clear { text-align: center; padding: 34px 20px 46px; display: flex; flex-direction: column; align-items: center; }
.ac-radar { position: relative; width: 210px; height: 190px; display: flex; align-items: flex-end; justify-content: center; margin-bottom: 6px; }
.ac-ring { position: absolute; left: 50%; top: 46%; width: 150px; height: 150px; margin: -75px 0 0 -75px; border: 1.5px solid var(--ok, #2fbf71); border-radius: 50%; opacity: 0; animation: acring 3.4s ease-out infinite; }
.ac-ring:nth-child(2) { animation-delay: 1.13s; }
.ac-ring:nth-child(3) { animation-delay: 2.26s; }
@keyframes acring { 0% { transform: scale(.22); opacity: .5; } 85% { opacity: 0; } 100% { transform: scale(1); opacity: 0; } }
.ac-lh { position: relative; z-index: 2; }
.ac-tower { width: 74px; height: auto; display: block; filter: drop-shadow(0 4px 16px rgba(47,191,113,.28)); }
.ac-tower .ac-roof, .ac-tower .ac-room, .ac-tower .ac-stripe { fill: var(--ok, #2fbf71); }
.ac-tower .ac-body { fill: var(--paper-2, #22272e); stroke: var(--line); stroke-width: .5; }
.ac-tower .ac-plinth { fill: var(--dim); }
.ac-lamp { position: absolute; top: 15px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: var(--ok, #2fbf71); animation: aclamp 2.2s ease-in-out infinite; }
@keyframes aclamp { 0%,100% { box-shadow: 0 0 10px 3px rgba(47,191,113,.4); opacity: .7; } 50% { box-shadow: 0 0 22px 9px rgba(47,191,113,.75); opacity: 1; } }
.ac-beam { position: absolute; top: 19px; left: 50%; width: 108px; height: 40px; margin-left: -54px; background: conic-gradient(from -30deg at 50% 0, transparent, rgba(47,191,113,.22), transparent 60deg); transform-origin: 50% 0; animation: acbeam 5.5s ease-in-out infinite; }
@keyframes acbeam { 0%,100% { transform: rotate(-34deg); } 50% { transform: rotate(34deg); } }
.ac-title { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; margin-top: 4px; animation: acfade .5s ease both; }
.ac-chk { color: var(--ok, #2fbf71); }
.ac-sub { font-size: 14px; color: var(--ink-2); margin-top: 8px; animation: acfade .5s ease .1s both; }
.ac-hint { font-size: 12px; color: var(--muted); margin-top: 12px; max-width: 470px; line-height: 1.55; animation: acfade .5s ease .2s both; }
@keyframes acfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ac-ring, .ac-lamp, .ac-beam, .ac-title, .ac-sub, .ac-hint { animation: none; } .ac-ring { display: none; } }
.alerts-clear.ac-compact { padding: 24px 16px 28px; }
.ac-compact .ac-radar { width: 150px; height: 128px; }
.ac-compact .ac-ring { width: 104px; height: 104px; margin: -52px 0 0 -52px; }
.ac-compact .ac-tower { width: 54px; }

/* Working / provisioning variant — accent-colored, with a continuously ROTATING
   beacon (a "control tower spinning") shown while a new account is committing and
   queuing onto the LZA pipeline, so the user knows it's working and takes ~a minute. */
.ac-working .ac-tower .ac-roof, .ac-working .ac-tower .ac-room, .ac-working .ac-tower .ac-stripe { fill: var(--sec, #7c5cff); }
.ac-working .ac-tower { filter: drop-shadow(0 4px 16px rgba(124, 92, 255, .32)); }
.ac-working .ac-ring { border-color: var(--sec, #7c5cff); animation-duration: 2.6s; }
.ac-working .ac-lamp { background: var(--sec, #7c5cff); animation: aclampv 1.4s ease-in-out infinite; }
@keyframes aclampv { 0%, 100% { box-shadow: 0 0 10px 3px rgba(124, 92, 255, .45); opacity: .75; } 50% { box-shadow: 0 0 22px 9px rgba(124, 92, 255, .82); opacity: 1; } }
.ac-working .ac-beam { background: conic-gradient(from -30deg at 50% 0, transparent, rgba(124, 92, 255, .26), transparent 62deg); transform-origin: 50% 0; animation: acspin 2.4s linear infinite; }
@keyframes acspin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.ac-working .ac-title { color: var(--ink); }
.ac-working .ac-dots i { display: inline-block; width: 5px; height: 5px; margin-left: 3px; border-radius: 50%; background: var(--sec, #7c5cff); animation: aclampv 1.2s ease-in-out infinite; }
.ac-working .ac-dots i:nth-child(2) { animation-delay: .18s; }
.ac-working .ac-dots i:nth-child(3) { animation-delay: .36s; }
@media (prefers-reduced-motion: reduce) { .ac-working .ac-beam, .ac-working .ac-lamp, .ac-working .ac-dots i { animation: none; } }
.ac-compact .ac-title { font-size: 18px; }
.ac-compact .ac-sub { font-size: 13px; }
.exp-off { padding: 22px 18px 26px; text-align: center; }
.exp-off-t { font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; margin-bottom: 7px; }
.exp-off-s { font-size: 13px; color: var(--muted); line-height: 1.6; max-width: 500px; margin: 0 auto; }
.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; }
/* Living evidence graphic — accounts orbit an evidence core, telemetry flows inward */
.awsx-living { padding: 10px 8px 2px; border-bottom: 1px solid var(--line); }
.awsx-living svg { width: 100%; height: auto; display: block; overflow: visible; }
.awsx-flow { fill: none; stroke-width: 1.6; stroke-dasharray: 2.5 8; stroke-linecap: round; opacity: .75; animation: awsxflow 1.5s linear infinite; }
@keyframes awsxflow { to { stroke-dashoffset: -21; } }
.awsx-core-glow { animation: awsxpulse 3s ease-in-out infinite; }
@keyframes awsxpulse { 0%,100% { r: 26px; opacity: .12; } 50% { r: 38px; opacity: .28; } }
.awsx-core { filter: drop-shadow(0 0 6px rgba(0,0,0,.35)); }
.awsx-core-t { font-size: 8.5px; font-weight: 800; fill: var(--ink); text-transform: uppercase; letter-spacing: .06em; }
.awsx-core-s { font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.awsx-core-pill { stroke-width: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); }
.awsx-nlabel { font-size: 9px; font-weight: 700; fill: var(--ink-2, #c9d2e0); }
.awsx-nkind { font-size: 7.5px; font-weight: 700; fill: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
/* Living access graphic — trusted green mesh vs. red unknown/shadow-IT access */
.acc-living { padding: 8px 8px 2px; }
.acc-living svg { width: 100%; height: auto; display: block; overflow: visible; }
.acc-flow { fill: none; stroke-width: 1.6; stroke-dasharray: 2.5 8; stroke-linecap: round; opacity: .8; animation: accflow 1.5s linear infinite; }
@keyframes accflow { to { stroke-dashoffset: -21; } }
.acc-mesh { stroke: #2fbf71; stroke-width: 1; opacity: .22; stroke-dasharray: 2 5; }
.acc-ext-flow { fill: none; stroke-width: 1.6; stroke-dasharray: 3 6; stroke-linecap: round; opacity: .85; animation: accextflow 1.1s linear infinite; }
@keyframes accextflow { to { stroke-dashoffset: -18; } }
.acc-core-glow { animation: accpulse 3s ease-in-out infinite; }
@keyframes accpulse { 0%,100% { r: 26px; opacity: .12; } 50% { r: 38px; opacity: .28; } }
.acc-core { filter: drop-shadow(0 0 6px rgba(0,0,0,.35)); }
.acc-core-t { font-size: 8.5px; font-weight: 800; fill: var(--ink); text-transform: uppercase; letter-spacing: .06em; }
.acc-core-s { font-size: 7.5px; font-weight: 900; letter-spacing: .08em; }
.acc-nl { font-size: 9px; font-weight: 700; fill: var(--ink-2, #c9d2e0); }
.acc-extl { font-size: 8px; font-weight: 700; fill: #e5484d; }
.acc-q { font-size: 10px; font-weight: 900; fill: #e5484d; }
.acc-cap { font-size: 10px; font-weight: 700; }
.acc-cap.ok { fill: #2fbf71; }
.acc-cap.bad { fill: #e5484d; }
.awsx-head { display: flex; align-items: center; gap: 14px; padding: 15px 18px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(124,92,255,.05), transparent); }
.awsx-head-l { min-width: 0; }
.awsx-title { font-size: 15px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.awsx-sub { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.awsx-overall { margin-left: auto; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; font-size: 11px;
  font-weight: 800; letter-spacing: .02em; padding: 4px 11px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.awsx-ov-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(255,255,255,.05); }
.awsx-overall.ok { background: rgba(47,191,113,.15); color: var(--ok, #2fbf71); }
.awsx-overall.warn { background: rgba(245,165,36,.15); color: var(--high, #f5a524); }
.awsx-overall.off { background: rgba(229,72,77,.15); color: var(--crit, #e5484d); }
.awsx-body { display: flex; flex-direction: column; }
.awsx-svc { padding: 13px 18px; border-bottom: 1px solid var(--line); transition: background .12s; }
.awsx-svc:last-child { border-bottom: none; }
.awsx-svc:hover { background: rgba(255,255,255,.014); }
.awsx-svc-l { display: flex; align-items: center; gap: 10px; }
.awsx-svc-ico { flex: 0 0 auto; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.awsx-svc-ico svg { width: 15px; height: 15px; }
.awsx-svc-ico.k-cloudtrail { color: #79b8ff; }
.awsx-svc-ico.k-config { color: #2dd4bf; }
.awsx-svc-ico.k-guardduty { color: #7c5cff; }
.awsx-svc-ico.k-securityhub { color: #38bdf8; }
.awsx-svc-name { font-size: 13.5px; font-weight: 700; color: var(--ink); letter-spacing: -.005em; }
.awsx-svc-ctrl { font-size: 10px; font-weight: 700; color: var(--sec, #7c5cff); background: rgba(124,92,255,.1);
  border: 1px solid rgba(124,92,255,.22); border-radius: 5px; padding: 1px 7px;
  font-family: 'JetBrains Mono', ui-monospace, monospace; letter-spacing: -.02em; }
.awsx-svc-state { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .04em; padding: 3px 10px; border-radius: 999px; }
.awsx-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.awsx-svc-state.s-ok { background: rgba(47,191,113,.15); color: var(--ok, #2fbf71); }
.awsx-svc-state.s-warn { background: rgba(245,165,36,.15); color: var(--high, #f5a524); }
.awsx-svc-state.s-off { background: rgba(229,72,77,.15); color: var(--crit, #e5484d); }
.awsx-svc-state.s-unknown { background: var(--line); color: var(--muted); }
.awsx-svc-sum { font-size: 12.5px; color: var(--ink-2, var(--muted)); margin-top: 6px; line-height: 1.5; padding-left: 36px; }
.awsx-svc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; padding-left: 36px; }
.awsx-chip { font-size: 10.5px; font-weight: 600; color: var(--muted); background: var(--bg); border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 8px; display: inline-flex; gap: 5px; align-items: center; }
.awsx-chip b { font-weight: 800; font-variant-numeric: tabular-nums; }
.awsx-chip.t-info b { color: var(--ink); }
.awsx-chip.t-good { color: var(--ok, #2fbf71); background: rgba(47,191,113,.1); border-color: rgba(47,191,113,.25); }
.awsx-chip.t-good b { color: var(--ok, #2fbf71); }
.awsx-chip.t-warn { color: var(--high, #f5a524); background: rgba(245,165,36,.1); border-color: rgba(245,165,36,.25); }
.awsx-chip.t-warn b { color: var(--high, #f5a524); }
.awsx-chip.t-bad { color: var(--crit, #e5484d); background: rgba(229,72,77,.1); border-color: rgba(229,72,77,.25); }
.awsx-chip.t-bad b { color: var(--crit, #e5484d); }

/* Demo/seeded data guard — anything NOT a real reading gets flagged in loud
   magenta so it can never masquerade as live. Real readings never get this. */
.demo-flag { outline: 2px dashed #ff00e5 !important; outline-offset: -2px; position: relative;
  background: rgba(255,0,229,.06) !important; }
.demo-tag { display: inline-flex; align-items: center; font-size: 9.5px; font-weight: 900; letter-spacing: .06em;
  text-transform: uppercase; color: #12010f; background: #ff00e5; border-radius: 5px; padding: 2px 7px; margin-right: 8px; }
.demo-banner { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; color: #ff00e5;
  background: rgba(255,0,229,.1); border: 1.5px dashed #ff00e5; border-radius: 9px; padding: 9px 13px; margin-bottom: 12px;
  letter-spacing: .01em; }

/* Control evidence intake — drop docs, AI maps them to controls */
.cintake { display: flex; align-items: center; gap: 16px; justify-content: space-between; flex-wrap: wrap;
  border: 1.5px dashed rgba(124,92,255,.4); border-radius: 13px; padding: 16px 18px; margin-bottom: 14px;
  background: linear-gradient(180deg, rgba(124,92,255,.06), rgba(255,255,255,.01)); transition: border-color .12s, background .12s; }
.cintake.drag { border-color: var(--sec,#7c5cff); background: rgba(124,92,255,.14); }
.cintake-l { display: flex; align-items: center; gap: 13px; min-width: 0; }
.cintake-ico { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px;
  color: var(--sec,#7c5cff); background: rgba(124,92,255,.12); border: 1px solid rgba(124,92,255,.28); }
.cintake-ico svg { width: 20px; height: 20px; }
.cintake-t { font-size: 14px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.cintake-s { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 2px; max-width: 62ch; }
.cintake-btn { flex: 0 0 auto; font-size: 13px; font-weight: 700; cursor: pointer; padding: 9px 16px; border-radius: 9px;
  color: #fff; background: var(--sec,#7c5cff); border: 1px solid var(--sec,#7c5cff); transition: filter .12s; }
.cintake-btn:hover { filter: brightness(1.08); }
.cintake-results { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.ci-status { font-size: 12.5px; color: var(--sec,#7c5cff); font-weight: 700; padding: 4px 2px; }
.ci-status.bad { color: var(--crit,#e5484d); }
.ci-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.ci-row.review { border-color: rgba(245,165,36,.35); background: rgba(245,165,36,.05); }
.ci-file { font-weight: 700; color: var(--ink); max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-map { color: var(--ink-2,var(--muted)); }
.ci-map b { color: var(--sec,#7c5cff); font-family: 'JetBrains Mono', ui-monospace, monospace; }
.ci-badge { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; border-radius: 5px; padding: 2px 7px; }
.ci-badge.att { color: var(--ok,#2fbf71); background: rgba(47,191,113,.14); }
.ci-badge.need { color: var(--high,#f5a524); background: rgba(245,165,36,.14); }
.ci-conf { font-size: 10.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.ci-review { color: var(--high,#f5a524); }
.ci-view { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--sec,#7c5cff); background: none; border: none; cursor: pointer; text-decoration: underline; }
.sec-att { font-size: 10px; font-weight: 800; border-radius: 5px; padding: 1px 7px; letter-spacing: .01em; }
.sec-att.ok { color: var(--ok,#2fbf71); background: rgba(47,191,113,.13); }
.sec-att.docs { color: var(--sec,#7c5cff); background: rgba(124,92,255,.13); }
.sec-att.need { color: var(--high,#f5a524); background: rgba(245,165,36,.13); }
.sec-evidence { margin-top: 2px; }
.ev-status { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; border-radius: 5px; padding: 2px 7px; margin-left: 8px; }
.ev-status.ok { color: var(--ok,#2fbf71); background: rgba(47,191,113,.13); }
.ev-status.need { color: var(--high,#f5a524); background: rgba(245,165,36,.13); }
.ev-status.docs { color: var(--sec,#7c5cff); background: rgba(124,92,255,.13); }
.ev-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; padding: 8px 0; border-top: 1px solid var(--line); }
.ev-name { font-weight: 700; color: var(--ink); }
.ev-t { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--line); border-radius: 5px; padding: 1px 6px; }
.ev-t.att { color: var(--ok,#2fbf71); background: rgba(47,191,113,.13); }
.ev-sum { color: var(--muted); font-size: 12px; flex: 1; min-width: 140px; }
.ev-acts { margin-left: auto; display: flex; gap: 6px; }
.ev-btn { font-size: 11.5px; font-weight: 700; color: var(--ink-2,var(--ink)); background: var(--bg); border: 1px solid var(--line);
  border-radius: 7px; padding: 4px 10px; cursor: pointer; text-decoration: none; }
.ev-btn:hover { border-color: var(--sec,#7c5cff); color: var(--sec,#7c5cff); }
.ev-btn.del { color: var(--muted); padding: 4px 9px; }
.ev-empty { font-size: 12px; color: var(--muted); font-style: italic; padding: 8px 0; }
.docv-card { max-width: 900px; width: 92vw; height: 86vh; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.docv-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.docv-name { font-size: 14px; font-weight: 800; color: var(--ink); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docv-acts { display: flex; gap: 7px; flex: 0 0 auto; }
.docv-frame { flex: 1; width: 100%; border: none; background: #fff; }
.docv-img { flex: 1; overflow: auto; display: grid; place-items: center; background: #0d1017; padding: 16px; }
.docv-img img { max-width: 100%; max-height: 100%; }
.docv-none { flex: 1; display: grid; place-content: center; gap: 12px; text-align: center; color: var(--muted); }

/* Generate-from-environment band — platform-produced evidence */
.genx-band { border: 1px solid var(--line); border-radius: 13px; background:
  linear-gradient(180deg, rgba(124,92,255,.07), rgba(255,255,255,.012)); padding: 15px 16px 16px; margin-bottom: 16px; }
.genx-hd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; margin-bottom: 13px; }
.genx-hd-t { font-size: 13.5px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.genx-hd-s { flex: 1 1 320px; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.genx-status { flex-basis: 100%; font-size: 12px; font-weight: 700; color: var(--sec, #7c5cff); opacity: 0; transition: opacity .2s; }
.genx-status.on { opacity: 1; }
.genx-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
@media (max-width: 900px) { .genx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.genx-card { display: flex; flex-direction: column; gap: 5px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper); padding: 12px 12px 13px; }
.genx-label { font-size: 12.5px; font-weight: 800; color: var(--ink); letter-spacing: -.005em; }
.genx-src { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--sec, #7c5cff); }
.genx-desc { font-size: 11.5px; color: var(--muted); line-height: 1.5; flex: 1; }
.genx-ctrls { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.genx-ctrl { font-size: 9.5px; font-weight: 700; color: var(--ink-2); background: var(--bg); border: 1px solid var(--line);
  border-radius: 5px; padding: 1px 5px; font-variant-numeric: tabular-nums; }
.genx-btn { margin-top: 8px; font-size: 12px; font-weight: 700; cursor: pointer; padding: 6px 10px; border-radius: 8px;
  color: #fff; background: var(--sec, #7c5cff); border: 1px solid var(--sec, #7c5cff); transition: filter .12s; }
.genx-btn:hover:not(:disabled) { filter: brightness(1.08); }
.genx-btn:disabled { opacity: .6; cursor: default; }
.genx-msg { font-size: 11px; color: var(--muted); line-height: 1.45; margin-top: 2px; }

/* 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; }
/* Auto-draft suggestions — untracked critical/high findings */
.poam-sug { border: 1px solid var(--high, #f5a524); border-radius: 12px; background: rgba(245,165,36,0.06); padding: 14px 16px; margin-bottom: 14px; }
.poam-sug-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.poam-sug-hl { font-size: 14.5px; color: var(--ink); }
.poam-sug-hl b { color: var(--high, #f5a524); font-size: 16px; }
.poam-sug-sub { font-size: 12.5px; color: var(--muted); margin: 6px 0 12px; line-height: 1.5; }
.poam-sug-list { display: flex; flex-direction: column; gap: 6px; }
.poam-sug-row { display: flex; align-items: center; gap: 10px; padding: 8px 11px; background: var(--paper); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-size: 13px; }
.poam-sug-row:hover { border-color: var(--line-strong); }
.poam-sug-row input { flex: none; width: 15px; height: 15px; accent-color: var(--sec); }
.poam-sug-t { flex: 1 1 auto; min-width: 0; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poam-sug-eta { flex: none; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.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; }
/* Always-visible horizontal scroller for the org map — `overflow-x: scroll` reserves
   the track, and styling ::-webkit-scrollbar defeats the OS "overlay scrollbar" that
   otherwise hides it until you scroll (why it "sometimes didn't show"). Padding at the
   bottom keeps the styled bar clear of the map. */
.om-scroll {
  overflow-x: scroll; overflow-y: hidden;
  border: 1px solid var(--line); border-radius: 16px; background: var(--paper);
  padding: 8px 4px 6px;
  scrollbar-width: thin;                                   /* Firefox */
  scrollbar-color: var(--violet, #7c5cff) rgba(124,92,255,0.10);
  -webkit-overflow-scrolling: touch;                       /* momentum scroll on iOS */
}
.om-scroll::-webkit-scrollbar { height: 12px; -webkit-appearance: none; }
.om-scroll::-webkit-scrollbar-track { background: rgba(124,92,255,0.10); border-radius: 8px; margin: 0 8px; }
.om-scroll::-webkit-scrollbar-thumb {
  background: var(--violet, #7c5cff); border-radius: 8px;
  border: 3px solid transparent; background-clip: content-box; min-width: 40px;
}
.om-scroll::-webkit-scrollbar-thumb:hover { background: #9a7cff; background-clip: content-box; }
.om-svg { display: block; margin: 0 auto; }
/* Org page: the animated constellation as the top graphic, separated from the tree below */
.org-constellation { margin: 2px 0 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.org-constellation:empty { display: none; }
.org-browse-h { margin-top: 4px; }
/* Identity Center inventory (Access screen) — live roles & groups, read-only */
.ic-inv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 10px; }
.ic-inv-h { font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.ic-inv-n { display: inline-block; min-width: 18px; text-align: center; padding: 0 6px; border-radius: 9px; background: var(--line); font-size: 11px; font-weight: 700; }
.ic-inv-list { display: flex; flex-direction: column; gap: 6px; }
.ic-inv-row { padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.ic-inv-name { font-weight: 600; font-size: 13px; }
.ic-inv-tag { float: right; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 7px; padding: 1px 6px; }
.ic-inv-tag.lza { color: var(--accent, #7c5cff); border-color: var(--accent, #7c5cff); }
.ic-inv-desc { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; clear: both; }
@media (max-width: 760px) { .ic-inv-grid { grid-template-columns: 1fr; } }
/* Activity log result chips */
.act-ok { color: var(--ok, #2fbf71); font-weight: 600; font-size: 12px; }
.act-fail { color: var(--crimson, #e5484d); font-weight: 600; font-size: 12px; }
.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 color 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-colored; 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: 0; margin: 6px 0 4px; background: var(--bg); }
.proof-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; cursor: pointer; list-style: none; }
.proof-head::-webkit-details-marker { display: none; }
.proof-head::after { content: "▸"; color: var(--dim); margin-left: 4px; transition: transform 0.15s ease; }
.sec-proof[open] .proof-head::after { transform: rotate(90deg); }
.sec-proof[open] .proof-head { border-bottom: 1px solid var(--line); }
.proof-toggle { font-size: 11px; color: var(--muted); margin-left: auto; }
.proof-body { padding: 12px 16px 14px; }
.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;
  /* Never let a long menu run off-screen — the sidebar scrolls within the viewport
     so the bottom groups stay reachable even when everything is expanded. */
  max-height: calc(100vh - 36px); overflow-y: auto;
  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; display: grid; grid-template-rows: auto 1fr; transition: grid-template-rows .32s cubic-bezier(.4,0,.2,1); }
.opx-group.collapsed { grid-template-rows: auto 0fr; }
.opx-head { color: var(--indigo); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.opx-head .opx-ico { opacity: 1; }
.opx-caret { margin-left: auto; font-style: normal; font-size: 10px; color: var(--indigo); opacity: .9; transition: transform .28s cubic-bezier(.4,0,.2,1); }
.opx-group.collapsed .opx-caret { transform: rotate(-90deg); }
.opx-sub { display: flex; flex-direction: column; gap: 2px; overflow: hidden; min-height: 0; opacity: 1; padding-left: 8px; transition: opacity .24s ease .04s; }
.opx-group.collapsed .opx-sub { opacity: 0; transition: opacity .16s ease; }
.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; } }

/* Document cards (Help -> Documents) */
.collateral { margin-top: 14px; }
.collateral-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; padding: 14px; }
.collateral-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 16px; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.collateral-card:hover { border-color: var(--indigo); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.18); }
.collateral-kind { align-self: flex-start; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; color: var(--indigo); border: 1px solid var(--indigo); border-radius: 5px; padding: 2px 7px; }
.collateral-name { font-size: 16px; font-weight: 700; color: var(--ink); }
.collateral-desc { font-size: 12.5px; color: var(--muted); line-height: 1.4; }

/* Region picker (Control Tower setup wizard) */
.region-pick { margin: 4px 0 2px; }
.region-home { display: block; max-width: 380px; }
.region-home select { display: block; width: 100%; margin-top: 5px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); color: var(--ink); font: inherit; }
.region-home select:focus { outline: none; border-color: var(--indigo); }
.region-warn { margin: 8px 0 12px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--muted); }
.region-warn b { color: var(--ink); }
.region-gov-h { font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.region-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px 10px; }
.region-chk { display: flex; align-items: center; gap: 7px; padding: 4px 6px; border-radius: 6px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.region-chk:hover { background: var(--bg); }
.region-chk input { accent-color: var(--indigo); }
.region-chk.is-home { color: var(--ink); font-weight: 600; }

/* NIST baseline lens — Low/Moderate/High/All selector (Security controls) */
.baseline-bar { margin: 10px 0 12px; }
.baseline-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--bg); }
.bl-seg { padding: 6px 16px; font-size: 13px; font-weight: 600; color: var(--muted); background: transparent; border: none; border-right: 1px solid var(--line); cursor: pointer; }
.bl-seg:last-child { border-right: none; }
.bl-seg:hover { color: var(--ink); }
.bl-seg.active { background: var(--sec, #7c5cff); color: #fff; }
.bl-n { font-weight: 700; opacity: 0.65; font-variant-numeric: tabular-nums; }
.bl-seg.active .bl-n { opacity: 0.9; }
.baseline-note { margin-top: 9px; font-size: 12.5px; line-height: 1.55; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 10px 13px; }
.baseline-note b { color: var(--ink); }
.wn-why { color: var(--sec, #7c5cff); cursor: pointer; text-decoration: underline; font-weight: 600; white-space: nowrap; }
.wn-why:hover { opacity: 0.82; }
.bl-src { font-weight: 400; }
.bl-pass { display: inline-block; margin-left: 4px; padding-left: 10px; border-left: 1px solid var(--line); }

/* FedRAMP 20x — evidence-only KSIs (no automated control basis) */
.fx-card.evidence { opacity: .82; }
.fx-score.evid { font-size: 11px; font-weight: 700; color: var(--muted); }
.fx-evid-note { font-weight: 500; color: var(--muted); font-size: 12px; }

/* Org-map loading — lighthouse with a circling beam */
.om-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 46px 0; min-height: 210px; }
.lighthouse { position: relative; width: 130px; height: 112px; }
.lh-beam { position: absolute; left: 50%; top: 30px; width: 160px; height: 56px;
  background: linear-gradient(90deg, rgba(121,184,255,.5), rgba(121,184,255,.06) 58%, transparent);
  clip-path: polygon(0 48%, 100% 0, 100% 100%); transform-origin: 0 50%;
  animation: lh-sweep 3.4s linear infinite; filter: blur(1px); pointer-events: none; }
@keyframes lh-sweep { to { transform: rotate(360deg); } }
.lh-lamp { position: absolute; left: 50%; top: 25px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%;
  background: #ffe98a; box-shadow: 0 0 16px 5px rgba(255,224,130,.85); animation: lh-pulse 1.5s ease-in-out infinite; z-index: 2; }
@keyframes lh-pulse { 0%,100% { opacity: .6; } 50% { opacity: 1; } }
.lh-tower { position: absolute; left: 50%; bottom: 0; width: 64px; height: 96px; margin-left: -32px; z-index: 1; }
.lh-roof { fill: var(--indigo, #79b8ff); }
.lh-room { fill: #ffe98a; opacity: .92; }
.lh-body { fill: var(--ink-2, #c9d1d9); }
.lh-stripe { fill: #e5484d; }
.lh-base { fill: var(--line-strong, #444c56); }
.om-loading-text { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.om-dots::after { content: ''; display: inline-block; width: 1.2em; text-align: left; animation: lh-dots 1.5s steps(4, end) infinite; }
@keyframes lh-dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }

/* No home-view flash on hard refresh: keep views hidden until the saved nav is
   restored (JS adds body.nav-ready right after _restoreNav). */
body:not(.nav-ready) #screen-home,
body:not(.nav-ready) .tabpanel { visibility: hidden; }

/* ── First-run Site Setup Wizard ── */
#setupWizard { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center;
  background: var(--bg, #0d1117); overflow: auto; padding: 32px 16px; }
.su-bg { position: absolute; inset: 0; display: grid; place-items: center; opacity: .09; pointer-events: none; }
.su-bg .ct-beacon { transform: scale(2.7); }
.su-card { position: relative; width: 100%; max-width: 460px; background: var(--card, #161b22);
  border: 1px solid var(--line, #30363d); border-radius: 16px; padding: 30px 30px 32px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.su-card.working, .su-card.done { text-align: center; }
.su-head h1 { font-size: 22px; margin: 0 0 8px; color: var(--ink, #e6edf3); }
.su-head p { font-size: 13.5px; color: var(--muted, #8b949e); margin: 0 0 14px; line-height: 1.5; }
.su-detect { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.su-chip { font-size: 11px; color: var(--ink-2, #c9d1d9); background: var(--chip, #21262d);
  border: 1px solid var(--line, #30363d); border-radius: 999px; padding: 3px 9px; }
.su-form { display: flex; flex-direction: column; gap: 13px; }
.su-l { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-2, #c9d1d9); }
.su-req { color: #e5484d; font-weight: 500; }
.su-opt { color: var(--muted, #8b949e); font-weight: 500; }
.su-in { font-size: 14px; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line, #30363d);
  background: var(--bg-2, #0d1117); color: var(--ink, #e6edf3); width: 100%; box-sizing: border-box; }
.su-in:focus { outline: none; border-color: var(--indigo, #79b8ff); box-shadow: 0 0 0 3px rgba(121,184,255,.18); }
.su-hint { font-size: 12px; color: var(--muted, #8b949e); margin: -6px 0 2px; }
.su-adv { border: 1px solid var(--line, #30363d); border-radius: 9px; padding: 8px 12px; }
.su-adv summary { font-size: 12.5px; font-weight: 600; color: var(--ink-2, #c9d1d9); cursor: pointer; }
.su-adv .su-l { margin-top: 10px; }
.su-err { color: #e5484d; font-size: 12.5px; min-height: 14px; }
.su-btn { margin-top: 6px; font-size: 14px; font-weight: 700; padding: 11px; border-radius: 9px; border: none;
  background: var(--indigo, #79b8ff); color: #0b1220; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.su-btn:hover { filter: brightness(1.06); }
.su-btn span { transition: transform .15s; }
.su-btn:hover span { transform: translateX(3px); }
.su-working { font-size: 20px; margin: 18px 0 6px; color: var(--ink, #e6edf3); }
.su-subtle { font-size: 13px; color: var(--muted, #8b949e); margin: 0 0 16px; line-height: 1.5; }
.su-steps { list-style: none; margin: 18px 0 0; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 9px; }
.su-step { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--muted, #8b949e); }
.su-step .su-ic { width: 16px; flex: none; }
.su-step.done .su-ic, .su-step.warn .su-ic, .su-step.skipped .su-ic { color: #2ea043; }
.su-step.running .su-ic { color: var(--indigo, #79b8ff); animation: su-spin 1s linear infinite; display: inline-block; }
.su-step.error .su-ic { color: #e5484d; }
.su-step.done .su-lab, .su-step.running .su-lab, .su-step.warn .su-lab { color: var(--ink-2, #c9d1d9); }
.su-step em { font-style: normal; color: var(--muted, #8b949e); opacity: .85; font-size: 12px; }
@keyframes su-spin { to { transform: rotate(360deg); } }
.su-creds { background: var(--bg-2, #0d1117); border: 1px solid var(--line, #30363d); border-radius: 9px; padding: 12px; margin: 0 0 16px; text-align: left; }
.su-creds code { color: var(--ink, #e6edf3); }
.su-check { width: 56px; height: 56px; margin: 4px auto 0; border-radius: 50%; background: rgba(46,160,67,.16);
  color: #2ea043; font-size: 30px; display: grid; place-items: center; }
.su-check.su-bad { background: rgba(229,72,77,.16); color: #e5484d; }

/* flashing control-tower beacon (the "working" animation) */
.ct-beacon { position: relative; width: 132px; height: 116px; margin: 0 auto; }
.ctb-beam { position: absolute; left: 50%; top: 26px; width: 168px; height: 60px;
  background: linear-gradient(90deg, rgba(121,184,255,.55), rgba(121,184,255,.06) 58%, transparent);
  clip-path: polygon(0 48%, 100% 0, 100% 100%); transform-origin: 0 50%;
  animation: ctb-sweep 2.6s linear infinite; filter: blur(1px); }
@keyframes ctb-sweep { to { transform: rotate(360deg); } }
.ctb-lamp { position: absolute; left: 50%; top: 20px; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%;
  background: #ffe98a; box-shadow: 0 0 18px 6px rgba(255,224,130,.9); animation: ctb-flash .9s ease-in-out infinite; z-index: 2; }
@keyframes ctb-flash { 0%,100% { opacity: .35; box-shadow: 0 0 8px 2px rgba(255,224,130,.5); } 50% { opacity: 1; box-shadow: 0 0 22px 7px rgba(255,224,130,1); } }
.ctb-tower { position: absolute; left: 50%; bottom: 0; width: 64px; height: 96px; margin-left: -32px; z-index: 1; }
.ctb-mast { fill: var(--line-strong, #444c56); }
.ctb-roof { fill: var(--indigo, #79b8ff); }
.ctb-cab { fill: #ffe98a; opacity: .92; }
.ctb-body { fill: var(--ink-2, #c9d1d9); }
.ctb-stripe { fill: #e5484d; }
.ctb-base { fill: var(--line-strong, #444c56); }
.su-toggle { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; color: var(--ink-2, #c9d1d9); cursor: pointer; }
.su-toggle input { width: 16px; height: 16px; accent-color: var(--indigo, #79b8ff); cursor: pointer; }
#su-dns-wrap { display: flex; flex-direction: column; gap: 13px; margin-top: 2px; }

/* + New OU affordance in the account wizard */
.ou-pick { display: flex; gap: 8px; align-items: stretch; }
.ou-pick select { flex: 1; }
.ou-new-btn { white-space: nowrap; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line, #30363d);
  background: var(--chip, #21262d); color: var(--ink-2, #c9d1d9); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.ou-new-btn:hover { border-color: var(--indigo, #79b8ff); color: var(--ink, #e6edf3); }
.ou-result { display: block; margin-top: 6px; }
.ou-result.ok { color: var(--ink-2, #c9d1d9); }
.ou-result.err { color: #e5484d; }

/* Org Hygiene (Drift) — inline resolve actions */
.btn-mini { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--line, #30363d); background: var(--chip, #21262d); color: var(--ink-2, #c9d1d9); }
.btn-mini:hover { border-color: var(--indigo, #79b8ff); color: var(--ink, #e6edf3); }
.btn-mini.danger { color: #e5484d; }
.btn-mini.danger:hover { border-color: #e5484d; background: rgba(229,72,77,.1); }
.drift-kind { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 600; }

/* OU governance view */
.ou-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 4px; }

/* ── Org tree (collapsible OU → account hierarchy) ── */
.otree-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.otree-toolbar #otSearch { max-width: 280px; }
.otree-legend { font-size: 11px; color: var(--muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.otl-i { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.otl-sw { width: 11px; height: 11px; border-radius: 4px; display: inline-block; }
.otl-sw.ou { color: var(--indigo); background: none; width: auto; height: auto; font-size: 12px; line-height: 1; }
.otl-sw.ctrl { background: rgba(45,212,191,0.18); border: 1px solid rgba(45,212,191,0.5); }
.otl-sw.guard { background: rgba(167,139,250,0.18); border: 1px solid rgba(167,139,250,0.55); }
.otl-sep { width: 1px; height: 12px; background: var(--line-strong); margin: 0 2px; }
.otree-hfseg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.otree-hf { font-size: 12px; font-weight: 600; color: var(--muted); background: transparent; border: none; border-right: 1px solid var(--line); padding: 5px 11px; cursor: pointer; transition: background .14s ease, color .14s ease; }
.otree-hf:last-child { border-right: none; }
.otree-hf:hover { color: var(--ink); }
.otree-hf.active { background: rgba(121,184,255,0.14); color: var(--indigo); }
.otree-hf[data-hf="failing"].active { background: var(--crimson-bg); color: var(--crimson); }
.otree-hf[data-hf="attention"].active { background: var(--amber-bg); color: var(--amber); }
.otree { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.otree-head { display: flex; align-items: center; gap: 9px; padding: 9px 13px; background: var(--bg-2); border-bottom: 1px solid var(--line-strong);
  font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.oth-name { flex: 1; }
.oth-n { width: 74px; text-align: right; flex: 0 0 auto; }
.oth-h { width: 78px; text-align: center; flex: 0 0 auto; }
.otree-row { display: flex; align-items: center; gap: 9px; padding: 8px 13px; border-bottom: 1px solid var(--line); font-size: 13px; }
.otree-row:last-child { border-bottom: none; }
.otree-ou { cursor: pointer; }
.otree-ou:hover { background: rgba(121,184,255,0.06); }
.otree-ou.open { background: rgba(121,184,255,0.04); }
.otree-tog { width: 16px; flex: 0 0 auto; background: none; border: none; color: var(--dim); cursor: pointer; font-size: 11px; padding: 0; transition: transform .15s ease; }
.otree-ou.open > .otree-tog { transform: rotate(90deg); }
.otree-tog.sp { display: inline-block; }
.otree-ico { flex: 0 0 auto; font-size: 12px; }
.otree-ico.ou { color: var(--indigo); }
.otree-ico.ac { color: var(--dim); }
.otree-name { flex: 1; min-width: 0; color: var(--ink); font-weight: 600; font-size: 13.5px; letter-spacing: -0.005em; }
.otree-ou > .otree-name { color: var(--indigo); }
.otree-acct .otree-name { font-weight: 500; color: var(--ink-2); font-size: 12.5px; letter-spacing: 0; }
.otree-name.mono, .otree-mid { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.otree-mid { font-size: 11px; color: var(--dim); font-weight: 400; }
.otree-n { width: 74px; text-align: right; flex: 0 0 auto; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.otree-h { width: 78px; text-align: center; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.otree-ratio { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.otree-ratio.bad { color: var(--amber); }
.otree-ratio.ok { color: var(--muted); }
.otree-dot { font-size: 12px; }
.otree-dot.dot-red { color: var(--crimson, #f87171); }
.otree-dot.dot-amber { color: var(--amber, #fbbf24); }
.otree-dot.dot-green { color: var(--emerald, #3fb950); }
.otree-dot.dot-none { color: var(--dim); opacity: .5; }
.otree-drift { font-size: 10px; font-weight: 700; color: var(--amber); background: var(--amber-bg); border-radius: 5px; padding: 0 5px; margin-left: 6px; }
.otree-tag { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--line); border-radius: 4px; padding: 1px 5px; }
.otree-grade-wrap { flex: 0 0 auto; }
.otree-grade { font-size: 11px; font-weight: 800; border-radius: 5px; padding: 1px 7px; }
.otree-grade.g-red { color: var(--crimson); background: var(--crimson-bg); }
.otree-grade.g-amber, .otree-grade.g-yellow { color: var(--amber); background: var(--amber-bg); }
.otree-grade.g-green { color: var(--emerald); background: var(--moss-bg); }
.otree-grade.g-none { color: var(--dim); background: var(--line); }
.otree-move { flex: 0 0 auto; display: flex; gap: 5px; align-items: center; }
.otree-move .ou-input.sm { font-size: 11px; padding: 3px 6px; }
/* 'Move OU' button — hidden until 'Edit structure' is on. */
.otree-mvou { display: none; flex: 0 0 auto; margin-left: 8px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .01em; padding: 2px 9px; border-radius: 6px; cursor: pointer;
  color: var(--indigo); background: rgba(121,184,255,.08); border: 1px solid rgba(121,184,255,.28); }
.otree-mvou:hover { background: rgba(121,184,255,.16); border-color: var(--indigo); }
.ot-edit .otree-ou:hover > .otree-mvou, .ot-edit .otree-mvou:focus-visible { display: inline-flex; }
.ot-edit .otree-mvou { display: inline-flex; opacity: .45; transition: opacity .12s; }
.ot-edit .otree-ou:hover > .otree-mvou { opacity: 1; }
/* Move-OU modal */
.oumv-card { max-width: 520px; }
.oumv-lead { font-size: 13px; line-height: 1.6; color: var(--ink-2); margin: 4px 0 14px; }
.oumv-frow { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.oumv-frow label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); flex: 0 0 auto; }
.oumv-frow .ou-input { flex: 1; }
.oumv-plan { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-height: 48px; background: rgba(255,255,255,.015); }
.oumv-plan.bad { color: var(--crimson); border-color: rgba(248,113,113,.35); }
.oumv-newpath { font-size: 14px; margin-bottom: 8px; color: var(--ink); }
.oumv-newpath b { color: var(--indigo); }
.oumv-badge { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; border-radius: 5px; padding: 2px 7px; margin-left: 6px; }
.oumv-badge.ok { color: var(--emerald); background: var(--moss-bg); }
.oumv-badge.warn { color: var(--amber); background: var(--amber-bg); }
.oumv-steps { margin: 4px 0 0; padding-left: 20px; }
.oumv-steps li { font-size: 12.5px; line-height: 1.65; color: var(--ink-2); }
.oumv-note { margin-top: 10px; font-size: 11.5px; color: var(--muted); font-style: italic; }
.oumv-acts { justify-content: space-between; margin-top: 18px; }
.oumv-left { display: flex; gap: 8px; }
.otree-drow { display: flex; align-items: baseline; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.015); }
.otree-drow-h { flex: 0 0 auto; font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); min-width: 92px; }
.otd-ctrl .otree-drow-h { color: var(--teal, #2dd4bf); }
.otd-guard .otree-drow-h { color: #a78bfa; }
.otree-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.otree-ctrl { font-size: 10.5px; font-weight: 600; color: var(--teal, #2dd4bf); background: rgba(45,212,191,0.09); border: 1px solid rgba(45,212,191,0.28); border-radius: 6px; padding: 1.5px 8px; }
.otree-ctrl.drift { color: var(--amber); background: var(--amber-bg); border-color: var(--amber); }
.otree-gr { font-size: 10.5px; font-weight: 600; color: #a78bfa; background: rgba(167,139,250,0.10); border: 1px solid rgba(167,139,250,0.30); border-radius: 6px; padding: 1.5px 8px; }
.otree-gr.inherited { color: var(--muted); background: var(--paper-2); border-color: var(--line); font-style: italic; font-weight: 500; }
.otree-peek { padding: 7px 12px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.02); font-size: 12px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.pk-lbl { font-weight: 700; color: var(--ink-2); }
.pk-lbl.ok { color: var(--emerald); }
.pk-sev { font-size: 11px; font-weight: 700; border-radius: 5px; padding: 1px 7px; }
.pk-sev.crit { color: var(--crimson); background: var(--crimson-bg); }
.pk-sev.high { color: var(--amber); background: var(--amber-bg); }
.pk-sev.med { color: var(--indigo); background: rgba(121,184,255,0.10); }
.pk-sev.low { color: var(--muted); background: var(--paper-2); }
.otree-pklink { color: var(--indigo); cursor: pointer; font-weight: 600; text-decoration: underline; }
.otree-pklink:hover { opacity: .82; }
.otree-peek .otree-move { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
/* Read/triage by default — the per-account move only appears in Edit structure mode */
.tabpanel[data-tab="ou"]:not(.ot-edit) .otree-peek .otree-move { display: none; }
/* the write toolbar's .ou-toolbar display:flex overrides [hidden] — gate it on edit mode */
.tabpanel[data-tab="ou"]:not(.ot-edit) #ouWriteBar { display: none; }
.ot-edit-toggle.active { background: rgba(121,184,255,0.14); color: var(--indigo); border-color: var(--indigo); }
.pk-mvlbl { font-size: 11px; color: var(--muted); }
.otree-peek .ou-input.sm { font-size: 11px; padding: 3px 6px; }
.otree-needpick { outline: 2px solid var(--amber); border-radius: 6px; }

.ou-check { font-size: 12px; color: var(--ink-2, #c9d1d9); display: flex; gap: 4px; align-items: center; }
.ou-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.ou-card { border: 1px solid var(--line, #30363d); border-radius: 12px; padding: 14px 16px;
  background: var(--chip, rgba(127,127,127,.03)); display: flex; flex-direction: column; gap: 10px; }
.ou-card.ignored { opacity: .72; border-style: dashed; }
.ou-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ou-card-head h3 { margin: 0; font-size: 15px; }
.ou-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line, #30363d); color: var(--ink-2, #c9d1d9); }
.ou-tag.ign { color: #d29922; border-color: rgba(210,153,34,.4); }
.ou-tag.creating { color: #fff; background: var(--sec, #7c5cff); border-color: var(--sec, #7c5cff); animation: ouGlowPulse 1.6s ease-in-out infinite; }
.ou-del { margin-left: 8px; background: transparent; border: 1px solid var(--line, #30363d); color: var(--muted, #8b949e); border-radius: 6px; cursor: pointer; font-size: 12px; line-height: 1; padding: 3px 7px; }
.ou-del:hover { color: #e5484d; border-color: rgba(229, 72, 77, .5); background: rgba(229, 72, 77, .06); }
.ou-card.creating { border-color: var(--sec, #7c5cff); animation: ouGlow 1.8s ease-in-out infinite; }
@keyframes ouGlow {
  0%, 100% { box-shadow: 0 0 0 1px var(--sec, #7c5cff), 0 0 14px rgba(124,92,255,.30); }
  50%      { box-shadow: 0 0 0 1px var(--sec, #7c5cff), 0 0 28px rgba(124,92,255,.65); }
}
@keyframes ouGlowPulse { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }
.ou-accts { display: flex; flex-direction: column; gap: 4px; }
.ou-acct { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 4px 0; border-bottom: 1px solid rgba(127,127,127,.1); }
.ou-acct:last-child { border-bottom: 0; }
.ou-acct-name { font-size: 13px; font-weight: 600; }
.ou-acct-move { display: flex; gap: 5px; align-items: center; }
.ou-guard { display: flex; flex-direction: column; gap: 5px; }
.ou-guard-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.ou-guard-lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--ink-2, #8b949e); min-width: 44px; }
.ou-scp { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line, #30363d); }
.ou-scp.direct { color: #2ea043; border-color: rgba(46,160,67,.4); background: rgba(46,160,67,.08); }
.ou-scp.inherited { color: #d29922; border-color: rgba(210,153,34,.35); }
.ou-input { font-size: 12px; padding: 4px 8px; border-radius: 7px; border: 1px solid var(--line, #30363d);
  background: var(--bg, transparent); color: var(--ink, inherit); }
.ou-input.sm { max-width: 150px; }
.ou-attach { display: flex; gap: 5px; align-items: center; padding-top: 8px; border-top: 1px solid rgba(127,127,127,.12); }

/* CT landing-zone status card (Controls tab) */
.lz-status { border: 1px solid var(--line, #30363d); border-radius: 10px; padding: 10px 14px; margin: 0 0 14px;
  background: var(--chip, rgba(127,127,127,.03)); display: flex; flex-direction: column; gap: 6px; }
.lz-row { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.lz-k { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--ink-2, #8b949e); min-width: 96px; }
.lz-v { color: var(--ink, inherit); }
.lz-pill { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line, #30363d); }
.lz-pill.ok { color: #2ea043; border-color: rgba(46,160,67,.4); background: rgba(46,160,67,.08); }
.lz-pill.warn { color: #d29922; border-color: rgba(210,153,34,.4); background: rgba(210,153,34,.08); }

/* Orbital org map — OUs as rotating rings, accounts orbiting on them */
.om-orb-wrap { display: flex; justify-content: center; padding: 8px 0 2px; }
.om-orb-svg { width: 100%; max-width: 720px; height: auto; overflow: visible; }
.om-orb-ring { fill: none; stroke: rgba(46,230,255,.15); stroke-width: 1.2; }
.om-orb-card { fill: rgba(13,18,28,.92); stroke: rgba(46,230,255,.28); stroke-width: 1; }
.om-orb-chip { cursor: pointer; }
.om-orb-chip:hover .om-orb-card { stroke: rgba(46,230,255,.75); fill: rgba(20,28,42,.97); }
.om-orb-chip.closing .om-orb-card { stroke-dasharray: 3 3; opacity: .55; }
.om-orb-nm { fill: #e6edf3; font: 600 11px Inter, system-ui, sans-serif; }
.om-orb-kind { fill: #7d8794; font: 600 7.5px 'JetBrains Mono', monospace; letter-spacing: .04em; }
.om-orb-dot { filter: drop-shadow(0 0 3px currentColor); }
.om-orb-oulabel rect { fill: rgba(46,230,255,.09); stroke: rgba(46,230,255,.32); stroke-width: 1; }
.om-orb-oulabel text { fill: #9fe9f5; font: 700 10px 'JetBrains Mono', monospace; letter-spacing: .04em; }
.om-orb-glow { fill: rgba(46,230,255,.13); filter: blur(7px); }
.om-orb-corering { fill: rgba(8,12,20,.96); stroke: #2ee6ff; stroke-width: 1.6; filter: drop-shadow(0 0 8px rgba(46,230,255,.55)); }
.om-orb-coret { fill: #2ee6ff; font: 800 13px 'JetBrains Mono', monospace; letter-spacing: .12em; }
.om-orb-coreid { fill: #7d8794; font: 600 8px 'JetBrains Mono', monospace; }

/* OU grouping capsule on the top-down org map (violet, matching the tree palette) */
.om-group { fill: rgba(124,92,255,.05); stroke: rgba(124,92,255,.3); stroke-width: 1.5; stroke-dasharray: 5 6; opacity: 0; animation: omGroupIn .55s ease forwards; }
@keyframes omGroupIn { from { opacity: 0; } to { opacity: 1; } }

/* ─── Global assistant dock — collapsible Sonnet agent, present on every screen ─── */
#agentDock { position: fixed; inset: 0 0 0 auto; z-index: 1200; pointer-events: none; }
#agentDock > * { pointer-events: auto; }
.agent-tab {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 7px; border: 1px solid var(--line); border-right: none;
  border-radius: 12px 0 0 12px; background: var(--paper); color: var(--accent, #79b8ff);
  box-shadow: var(--shadow-1); cursor: pointer; font: inherit; font-weight: 700; font-size: 12px;
  transition: background .14s ease, color .14s ease;
}
.agent-tab:hover { background: rgba(121,184,255,0.12); }
.agent-tab-ico { font-size: 16px; }
.agent-tab-label { writing-mode: vertical-rl; text-orientation: mixed; letter-spacing: .08em; text-transform: uppercase; }
#agentDock:not(.agent-collapsed) .agent-tab { display: none; }

.agent-panel {
  position: fixed; top: 0; right: 0; height: 100vh; width: 372px; max-width: 92vw;
  display: flex; flex-direction: column; background: var(--paper); border-left: 1px solid var(--line);
  box-shadow: -10px 0 34px rgba(0,0,0,.20); transform: translateX(0); transition: transform .26s ease;
}
#agentDock.agent-collapsed .agent-panel { transform: translateX(100%); }
.agent-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.agent-title { font-weight: 800; font-size: 14px; letter-spacing: .01em; }
.agent-spark { color: var(--accent, #79b8ff); margin-right: 4px; }
.agent-collapse { border: none; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; border-radius: 8px; }
.agent-collapse:hover { background: rgba(121,184,255,0.10); color: var(--ink); }

.agent-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.agent-msg { max-width: 92%; padding: 9px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; white-space: normal; word-wrap: break-word; }
.agent-a { align-self: flex-start; background: rgba(127,127,127,0.10); color: var(--ink); border-bottom-left-radius: 4px; }
.agent-u { align-self: flex-end; background: rgba(121,184,255,0.16); color: var(--ink); border-bottom-right-radius: 4px; }
.agent-typing { display: inline-flex; gap: 4px; align-items: center; }
.agent-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); opacity: .5; animation: agentBlink 1.1s infinite both; }
.agent-typing span:nth-child(2) { animation-delay: .18s; }
.agent-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes agentBlink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: .9; } }

.agent-inputrow { display: flex; gap: 8px; align-items: flex-end; padding: 12px 12px 6px; border-top: 1px solid var(--line); }
.agent-inputrow textarea {
  flex: 1; resize: none; max-height: 120px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg, rgba(127,127,127,0.05)); color: var(--ink); font: inherit; font-size: 13.5px; line-height: 1.4;
}
.agent-inputrow textarea:focus { outline: none; border-color: var(--accent, #79b8ff); }
.agent-send { flex: 0 0 auto; width: 38px; height: 38px; border: none; border-radius: 10px; background: var(--accent, #79b8ff); color: #06121f; font-size: 18px; font-weight: 800; cursor: pointer; }
.agent-send:hover { filter: brightness(1.08); }
.agent-foot { padding: 4px 16px 12px; font-size: 11px; color: var(--muted); text-align: center; }
@media (max-width: 560px) { .agent-panel { width: 100vw; } }

/* ─────────────────── RBAC: admin gear, role pill, admin panel ─────────────────── */
#adminGearBtn { font-size: 15px; line-height: 1; }
#rolePill { text-transform: capitalize; font-weight: 700; letter-spacing: .2px; }
body.role-admin #rolePill { color: var(--accent, #79b8ff); }
.btn.xs { padding: 3px 8px; font-size: 10.5px; }
.btn.danger, .btn.ghost.danger:hover { color: var(--crimson, #d1242f); border-color: var(--crimson, #d1242f); }

/* View-only roles: hide the primary mutation entry points (server still enforces). */
body.role-viewonly [data-action="apply"],
body.role-viewonly [data-action="autoapprove"],
body.role-viewonly #planBtn { display: none !important; }

/* Audit role: trim the operate sidebar to just the Audit Log + Activity, and hide
   the operate content widgets so the experience is genuinely audit-only. */
body.role-audit #opSidebar > .opx-solo,
body.role-audit #opSidebar > .opx-group:not(:last-child) { display: none; }
body.role-audit #opSidebar > .opx-group:last-child .opx-head { pointer-events: none; opacity: .8; }
body.role-audit #opSidebar > .opx-group:last-child .opx-sub { display: block !important; }
body.role-audit #opSidebar > .opx-group:last-child .opx-item:not([data-op="audit"]):not([data-op="activity"]) { display: none; }
body.role-audit #pipeline, body.role-audit #lzaNotice, body.role-audit .mode-switch { display: none; }

/* Admin panel */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 4px; flex-wrap: wrap; }
.admin-tabs { display: flex; gap: 4px; }
.admin-tab { font: inherit; font-size: 12.5px; font-weight: 700; padding: 6px 14px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.admin-tab.active { color: var(--ink); border-color: var(--accent, #79b8ff); background: rgba(121,184,255,0.10); }
.admin-pane { margin-top: 14px; }
.admin-pane[hidden] { display: none; }
.admin-create { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 16px; background: var(--paper, rgba(127,127,127,.03)); }
.ac-h, .am-h, .am-h2 { font-weight: 800; font-size: 13px; margin-bottom: 8px; color: var(--ink); }
.ac-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ac-row input, .ac-row select, .am-saml input, .urow-inline select { font: inherit; font-size: 13px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); }
.ac-row input[type="email"] { flex: 1; min-width: 200px; }
.ac-note { margin-top: 8px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-actions-cell { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.admin-empty { text-align: center; color: var(--muted); padding: 20px; }
.rolechip { font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.rolechip.r-admin { color: var(--accent, #79b8ff); border-color: var(--accent, #79b8ff); background: rgba(121,184,255,.10); }
.rolechip.r-poweruser { color: var(--indigo, #7c5cff); border-color: var(--indigo, #7c5cff); background: rgba(124,92,255,.10); }
.rolechip.r-user { color: var(--moss, #2fbf71); border-color: var(--moss, #2fbf71); background: rgba(47,191,113,.10); }
.rolechip.r-audit { color: var(--amber, #d9a300); border-color: var(--amber, #d9a300); background: rgba(217,163,0,.10); }
.rolechip.r-none { color: var(--muted); }
.tagx { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; padding: 1px 6px; border-radius: 5px; background: rgba(121,184,255,.14); color: var(--accent, #79b8ff); }
.tagx.warn { background: rgba(217,163,0,.16); color: var(--amber, #d9a300); }
/* Inline status line + in-row editors (no browser prompt/confirm/alert) */
.admin-msg { font-size: 12.5px; padding: 8px 12px; border-radius: 8px; margin-bottom: 12px; border: 1px solid transparent; animation: amMsgIn .18s ease; }
.admin-msg:empty { display: none; }
.admin-msg.ok { background: rgba(47,191,113,.10); border-color: rgba(47,191,113,.30); color: var(--moss, #2fbf71); }
.admin-msg.err { background: rgba(229,72,77,.10); border-color: rgba(229,72,77,.32); color: var(--crimson, #e5484d); }
@keyframes amMsgIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.urow-editing > td { background: rgba(124,92,255,.06); box-shadow: inset 3px 0 0 var(--indigo, #7c5cff); }
.urow-inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 3px 2px; animation: amMsgIn .18s ease; }
.urow-inline .urow-lbl { font-size: 13px; color: var(--ink); font-weight: 600; }
.urow-inline .urow-btns { display: flex; gap: 6px; margin-left: auto; }
.urow-inline.danger { box-shadow: none; }
.urow-inline.danger .urow-lbl { color: var(--crimson, #e5484d); font-weight: 700; }
.urow-editing:has(.urow-inline.danger) > td { background: rgba(229,72,77,.06); box-shadow: inset 3px 0 0 var(--crimson, #e5484d); }
.pt-input { width: 100%; font: inherit; font-size: 14px; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); margin-top: 6px; }
.pt-input:focus { outline: none; border-color: var(--indigo, #7c5cff); }
/* Terminal-action warning banner (Close account) */
.close-warn { font-size: 13px; line-height: 1.6; padding: 12px 14px; margin: 0 0 14px; border: 1px solid rgba(229,72,77,.4); border-radius: 10px; background: rgba(229,72,77,.08); color: var(--ink); }
.close-warn b { color: var(--crimson, #e5484d); }
/* Deep-link highlight on the Adopt row when arriving from Reinstate */
.adopt-focus { border-color: var(--indigo, #7c5cff) !important; box-shadow: 0 0 0 2px var(--indigo, #7c5cff), 0 10px 34px rgba(124,92,255,.28); animation: adoptPulse 1.1s ease 2; }
@keyframes adoptPulse { 0%,100% { box-shadow: 0 0 0 2px var(--indigo,#7c5cff), 0 10px 34px rgba(124,92,255,.28); } 50% { box-shadow: 0 0 0 4px rgba(124,92,255,.55), 0 10px 34px rgba(124,92,255,.28); } }
/* Privileged-access callout on the Access view */
.iam-priv { margin: 10px 0 16px; padding: 12px 14px; border: 1px solid rgba(229,72,77,.35); border-radius: 10px; background: rgba(229,72,77,.07); }
.iam-priv-h { font-size: 13px; font-weight: 700; color: var(--crimson, #e5484d); margin-bottom: 8px; }
.iam-priv-h b { color: var(--crimson, #e5484d); }
.iam-priv-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.privchip { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.privchip.admin { border-color: rgba(229,72,77,.5); background: rgba(229,72,77,.1); color: var(--crimson, #e5484d); }
.privchip-k { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; opacity: .7; }
.iam-priv-note { margin-top: 8px; }
/* Inline help badge — a small "?" with a hover/focus popover explaining a part */
.hqi { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: 7px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--paper); color: var(--muted); font-size: 10.5px; font-weight: 800; line-height: 1; cursor: help; position: relative; vertical-align: middle; user-select: none; }
.hqi:hover, .hqi:focus-visible, .hqi:focus-within { border-color: var(--indigo, #7c5cff); color: var(--indigo, #7c5cff); outline: none; }
.hqi-pop { position: absolute; left: 0; top: calc(100% + 8px); width: 300px; max-width: 72vw; background: var(--bg-2, #161b22); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 10px; padding: 11px 13px; font: 400 12px/1.55 inherit; letter-spacing: normal; text-transform: none; text-align: left; box-shadow: 0 12px 34px rgba(0,0,0,.5); z-index: 60; opacity: 0; visibility: hidden; transition: opacity .12s ease; pointer-events: none; }
.hqi-pop b { color: var(--indigo, #7c5cff); font-weight: 700; }
.hqi:hover .hqi-pop, .hqi:focus-within .hqi-pop { opacity: 1; visibility: visible; }
/* Feedback toasts (replace browser alert()) */
#toastHost { position: fixed; z-index: 9999; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; max-width: 360px; font-size: 13px; line-height: 1.45; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2, #161b22); color: var(--ink); box-shadow: 0 8px 28px rgba(0,0,0,.45); opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; cursor: pointer; }
.toast.show { opacity: 1; transform: none; }
.toast.ok { border-color: rgba(47,191,113,.5); }
.toast.ok::before { content: "✓ "; color: var(--moss, #2fbf71); font-weight: 800; }
.toast.err { border-color: rgba(229,72,77,.5); }
.toast.err::before { content: "⚠ "; color: var(--crimson, #e5484d); font-weight: 800; }
/* Sign-in settings */
.am-opts { display: grid; gap: 8px; margin-bottom: 14px; }
.am-opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.am-opt.sel { border-color: var(--accent, #79b8ff); background: rgba(121,184,255,.08); }
.am-opt input { margin-top: 3px; }
.am-t { font-weight: 800; font-size: 13px; }
.am-saml { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: 8px; }
.am-saml[hidden] { display: none; }
.am-saml label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.am-saml input { width: 100%; box-sizing: border-box; }
.am-activate { margin-top: 12px; }
.am-cmd { font-family: ui-monospace, monospace; font-size: 11px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.am-ok { color: var(--moss, #2fbf71); font-weight: 700; font-size: 12.5px; margin-top: 8px; }
.am-err { color: var(--crimson, #d1242f); font-weight: 700; font-size: 12.5px; margin-top: 8px; }

/* ─────────────── Shared settings form (wizard + admin gear) ─────────────── */
.settings-form { display: flex; flex-direction: column; gap: 14px; }
.set-group { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--paper, rgba(127,127,127,.02)); }
.set-group-h { font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--accent, #79b8ff); margin-bottom: 10px; }
.set-adv { border-style: dashed; }
.set-adv > summary { font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); cursor: pointer; padding: 2px 0; }
.set-adv[open] > summary { margin-bottom: 10px; color: var(--ink); }
.setf { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,320px); gap: 8px 16px; align-items: start; padding: 8px 0; border-top: 1px solid var(--line); }
.set-group > .setf:first-of-type, .set-adv > .setf:first-of-type { border-top: none; }
.setf-l { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.setf-l label { font-weight: 700; font-size: 13px; color: var(--ink); }
.setf-help { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.setf-c { display: flex; align-items: center; justify-content: flex-end; }
.setf-in { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); }
.setf-in:focus { outline: none; border-color: var(--accent, #79b8ff); }
textarea.setf-in { resize: vertical; min-height: 40px; font-family: ui-monospace, monospace; font-size: 12px; }
.setf-bool .setf-c { justify-content: flex-end; }
.setf-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.setf-switch input { opacity: 0; width: 0; height: 0; }
.setf-slider { position: absolute; inset: 0; cursor: pointer; background: var(--line-strong, #b4b3ac); border-radius: 999px; transition: .15s; }
.setf-slider::before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; }
.setf-switch input:checked + .setf-slider { background: var(--moss, #2fbf71); }
.setf-switch input:checked + .setf-slider::before { transform: translateX(20px); }
/* Wizard: settings form sits inside the su-card; tighten to match the wizard skin */
.su-form-settings { gap: 14px; }
.su-form-settings .set-group { background: rgba(255,255,255,.02); border-color: rgba(255,255,255,.10); }
.su-form-settings .setf { border-top-color: rgba(255,255,255,.07); }
.su-form-settings .setf-in { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.14); color: #e6edf3; }
@media (max-width: 620px) { .setf { grid-template-columns: 1fr; } .setf-c { justify-content: flex-start; } }

/* ─────────────────────────── Living OU List ───────────────────────────
   The OU view is a polished, living List (no map): soft entrance, health-tinted
   accent rails, hover lift, a staggered reveal when a node expands, and gently
   breathing red/amber health dots. All scoped to .otree.living. */
.otree.living { box-shadow: 0 2px 10px rgba(0,0,0,.16); animation: otIn .3s ease both; }
@keyframes otIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.otree.living .otree-row { position: relative; transition: background .16s ease, box-shadow .16s ease, padding-left .12s ease; }
/* health accent rail down the left of each OU row */
.otree.living .otree-ou[data-health="red"]    { box-shadow: inset 3px 0 0 var(--crimson, #f87171); }
.otree.living .otree-ou[data-health="amber"],
.otree.living .otree-ou[data-health="yellow"] { box-shadow: inset 3px 0 0 var(--amber, #fbbf24); }
.otree.living .otree-ou[data-health="green"]   { box-shadow: inset 3px 0 0 var(--emerald, #3fb950); }
.otree.living .otree-ou:hover { background: rgba(121,184,255,.09); }
.otree.living .otree-ou.open  { background: rgba(121,184,255,.06); }
.otree.living .otree-ou.open > .otree-name { color: var(--ink); }
/* chevron: smoother rotate, brightens on hover */
.otree.living .otree-tog { transition: transform .2s cubic-bezier(.4,0,.2,1), color .18s; }
.otree.living .otree-ou:hover > .otree-tog { color: var(--indigo); }
/* breathing health dots — subtle life, red/amber only */
.otree.living .otree-dot.dot-red   { animation: otDotPulse 2.4s ease-in-out infinite; }
.otree.living .otree-dot.dot-amber { animation: otDotPulse 3.4s ease-in-out infinite; }
@keyframes otDotPulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
/* staggered reveal of a node's accounts/controls when it expands */
.otree.living .otree-accts.reveal > * { animation: otReveal .24s ease both; }
.otree.living .otree-accts.reveal > *:nth-child(2)   { animation-delay: .03s; }
.otree.living .otree-accts.reveal > *:nth-child(3)   { animation-delay: .06s; }
.otree.living .otree-accts.reveal > *:nth-child(4)   { animation-delay: .09s; }
.otree.living .otree-accts.reveal > *:nth-child(n+5) { animation-delay: .12s; }
@keyframes otReveal { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .otree.living, .otree.living .otree-accts.reveal > *,
  .otree.living .otree-dot.dot-red, .otree.living .otree-dot.dot-amber { animation: none; }
}

/* ─────────────── Access map — assignments as color-coded cards ─────────────── */
.acx-legend { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.acx-key { font-size: 10px; font-weight: 800; padding: 2px 9px; border-radius: 999px; border: 1px solid; }
.acx-key.pv-high { color: #e5484d; border-color: #e5484d; background: rgba(229,72,77,.10); }
.acx-key.pv-med  { color: #f5a524; border-color: #f5a524; background: rgba(245,165,36,.10); }
.acx-key.pv-std  { color: #7c5cff; border-color: #7c5cff; background: rgba(124,92,255,.10); }
.acx-key.pv-low  { color: #2fbf71; border-color: #2fbf71; background: rgba(47,191,113,.10); }
.acx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 10px; }
.acx-empty { padding: 16px; }
.acx-card { border: 1px solid var(--line); border-left: 3px solid var(--accent, #7c5cff); border-radius: 12px; background: var(--bg-2); overflow: hidden; transition: box-shadow .15s, transform .15s; }
.acx-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.28); transform: translateY(-1px); }
.acx-head { display: flex; align-items: center; gap: 8px; padding: 10px 13px; border-bottom: 1px solid var(--line); }
.acx-acct { font-weight: 800; font-size: 13px; color: var(--ink); }
.acx-id { font-family: ui-monospace, monospace; font-size: 10.5px; color: var(--muted); }
.acx-cnt { margin-left: auto; font-size: 10.5px; font-weight: 800; color: var(--accent, #7c5cff); background: color-mix(in srgb, var(--accent, #7c5cff) 14%, transparent); border-radius: 999px; padding: 1px 9px; }
.acx-chips { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; }
.acx-chip { display: flex; align-items: center; gap: 7px; font-size: 12px; padding: 6px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper, rgba(127,127,127,.03)); cursor: default; transition: border-color .14s, background .14s; }
.acx-chip:hover { border-color: var(--pv, #7c5cff); background: color-mix(in srgb, var(--pv, #7c5cff) 8%, transparent); }
.acx-chip.pv-high { --pv: #e5484d; } .acx-chip.pv-med { --pv: #f5a524; } .acx-chip.pv-std { --pv: #7c5cff; } .acx-chip.pv-low { --pv: #2fbf71; }
.acx-who { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46%; }
.acx-arrow { color: var(--muted); flex: 0 0 auto; }
.acx-ps { font-weight: 800; color: var(--pv, #7c5cff); border: 1px solid var(--pv, #7c5cff); background: color-mix(in srgb, var(--pv) 12%, transparent); border-radius: 6px; padding: 1px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acx-lza { margin-left: auto; font-size: 9px; font-weight: 800; letter-spacing: .5px; color: var(--accent, #79b8ff); border: 1px solid var(--accent, #79b8ff); border-radius: 5px; padding: 0 5px; }
/* permission-set inventory rows get a privilege dot + level chip */
.acx-psrow { border-left: 3px solid var(--pv, #7c5cff); padding-left: 10px; }
.acx-lvl { font-size: 9.5px; font-weight: 800; color: var(--pv, #7c5cff); border: 1px solid var(--pv, #7c5cff); border-radius: 999px; padding: 0 8px; background: color-mix(in srgb, var(--pv) 12%, transparent); }
.acx-lvl.pv-high { --pv: #e5484d; } .acx-lvl.pv-low { --pv: #2fbf71; }
@media (max-width: 560px) { .acx-grid { grid-template-columns: 1fr; } }

/* ── JIT governed console access — the console front door ── */
.jit-req { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 6px; }
.jit-in { font: inherit; font-size: 13px; color: var(--text); background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; }
.jit-in:focus { outline: none; border-color: var(--accent, #79b8ff); }
.jit-reason { flex: 1; min-width: 220px; }
.jit-msg { font-size: 12.5px; margin: 6px 0 2px; padding: 8px 11px; border-radius: 8px; border: 1px solid transparent; }
.jit-msg.ok { color: #1f8a4c; border-color: #2fbf71; background: rgba(47,191,113,.08); }
.jit-msg.err { color: #c23b40; border-color: #e5484d; background: rgba(229,72,77,.08); }
.jit-open { font-weight: 700; color: var(--accent, #2563eb); text-decoration: none; margin: 0 4px; }
.jit-open:hover { text-decoration: underline; }
.jit-grants { display: grid; gap: 8px; margin-top: 10px; }
.jit-grant { border: 1px solid var(--border); border-left: 3px solid var(--st, #8a94a6); border-radius: 10px; padding: 9px 12px; background: var(--card); }
.jit-g-main { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.jit-g-acct { font-weight: 800; font-size: 13.5px; color: var(--text); }
.jit-g-id { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.jit-g-state { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--st, #8a94a6); border: 1px solid var(--st, #8a94a6); border-radius: 999px; padding: 0 8px; background: color-mix(in srgb, var(--st) 12%, transparent); }
.jit-exp { font-size: 11px; font-weight: 700; color: #b7791f; }
.jit-kill { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; border-radius: 999px; padding: 0 8px; }
.jit-kill.hard { color: #e5484d; border: 1px solid #e5484d; background: rgba(229,72,77,.10); }
.jit-kill.soft { color: var(--muted); border: 1px solid var(--border); }
.jit-recap-n { font-size: 10.5px; font-weight: 700; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 0 8px; }
.jit-g-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; font-size: 11.5px; color: var(--muted); }
.jit-dot { opacity: .5; }
.jit-reasontxt { max-width: 42ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jit-actions { margin-left: auto; display: flex; gap: 6px; }
.jit-mini { font: inherit; font-size: 11px; font-weight: 700; color: var(--text); background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 2px 9px; cursor: pointer; }
.jit-mini:hover { border-color: var(--accent, #79b8ff); }
.jit-mini.danger { color: #c23b40; border-color: #e5484d; }
.jit-recap { margin-top: 8px; border-top: 1px dashed var(--border); padding-top: 7px; display: grid; gap: 3px; }
.jit-recap-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; font-size: 11.5px; align-items: center; }
.jit-ev { font-weight: 700; color: var(--text); }
.jit-src { color: var(--muted); font-size: 10.5px; }
.jit-at { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 10.5px; }
@media (max-width: 640px) { .jit-req { flex-direction: column; align-items: stretch; } .jit-reason { min-width: 0; } .jit-actions { margin-left: 0; } }

/* ── Quota sentinel ── */
.qt-grid { display: grid; gap: 8px; margin-top: 10px; }
.qt-row { border: 1px solid var(--border); border-left: 3px solid var(--g, #8a94a6); border-radius: 10px; padding: 9px 12px; background: var(--card); }
.qt-top { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.qt-label { font-weight: 800; font-size: 13.5px; color: var(--text); }
.qt-scope { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; }
.qt-usage { margin-left: auto; font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.qt-pct { font-weight: 800; color: var(--g, #8a94a6); margin-left: 4px; }
.qt-meter { margin-top: 8px; height: 7px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 18%, transparent); overflow: hidden; }
.qt-fill { display: block; height: 100%; border-radius: 999px; transition: width .3s ease; }
.qt-note { margin-top: 7px; }
.qt-why { margin-left: 2px; }

/* ── Resilience — backup/DR coverage ── */
.bk-empty { padding: 8px 2px; }
.bk-empty-h { font-weight: 800; font-size: 15px; color: var(--text); margin-bottom: 6px; }
.bk-empty-inv { margin-top: 10px; font-size: 13px; font-weight: 700; color: #b7791f; }
.bk-top { display: flex; align-items: center; gap: 20px; }
.bk-donut { --pct: 0; --c: #2fbf71; width: 92px; height: 92px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--c) calc(var(--pct) * 1%), color-mix(in srgb, var(--muted) 20%, transparent) 0);
  display: grid; place-items: center; }
.bk-donut::after { content: ""; position: absolute; width: 66px; height: 66px; border-radius: 50%; background: var(--card); }
.bk-donut span { position: relative; z-index: 1; font-weight: 800; font-size: 21px; color: var(--text); }
.bk-donut span small { font-size: 11px; }
.bk-donut.none span { color: var(--muted); }
.bk-top-r { flex: 1; }
.bk-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.bk-stat { font-size: 12px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; }
.bk-stat b { color: var(--text); }
.bk-stat.warn { color: #b7791f; border-color: #f5a524; background: rgba(245,165,36,.08); }
.bk-stat.ok { color: #1f8a4c; border-color: #2fbf71; background: rgba(47,191,113,.06); }
.bk-types { display: grid; gap: 9px; margin-top: 8px; }
.bk-trow { display: grid; grid-template-columns: 90px 150px 1fr 48px; gap: 12px; align-items: center; }
.bk-t { font-weight: 800; font-size: 13px; color: var(--text); }
.bk-cnt { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bk-cnt b { color: var(--text); }
.bk-meter { height: 7px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 18%, transparent); overflow: hidden; }
.bk-meter span { display: block; height: 100%; border-radius: 999px; }
.bk-pctv { font-weight: 800; font-size: 12.5px; text-align: right; }
.bk-unp { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bk-chip { font-size: 11.5px; font-family: var(--mono, monospace); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; display: inline-flex; gap: 6px; align-items: center; }
.bk-chip-t { font-family: var(--su-sans, sans-serif); font-weight: 800; font-size: 9.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.bk-allgood { color: #1f8a4c; font-weight: 700; font-size: 13.5px; padding: 4px 2px; }
@media (max-width: 640px) { .bk-top { flex-direction: column; align-items: flex-start; } .bk-trow { grid-template-columns: 70px 1fr 44px; } .bk-trow .bk-cnt { display: none; } }

/* ── Org-wide resource search ── */
.fnd-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fnd-q { flex: 1 1 100%; min-width: 0; }
.fnd-scope { margin: 10px 2px 4px; }
.fnd-results { display: grid; gap: 6px; margin-top: 8px; }
.fnd-results:not(:empty) { max-height: 360px; overflow: auto; }
/* Find lives at the top of the Org Map — full-width search bar over the map */
.fnd-card { margin-bottom: 16px; }
.fnd-bar #fndType { flex: 0 0 auto; width: auto; min-width: 160px; }
.fnd-bar #fndBtn { flex: 0 0 auto; }
.fnd-row { border: 1px solid var(--border); border-radius: 9px; padding: 8px 12px; background: var(--card); }
.fnd-main { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.fnd-name { font-weight: 800; font-size: 13.5px; color: var(--text); }
.fnd-type { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--accent, #79b8ff); border: 1px solid color-mix(in srgb, var(--accent, #79b8ff) 50%, var(--border)); border-radius: 999px; padding: 1px 8px; }
.fnd-id { font-size: 11px; color: var(--muted); font-family: var(--mono, monospace); }
.fnd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.fnd-acct { font-variant-numeric: tabular-nums; }
.fnd-dot { opacity: .5; }
.fnd-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 6px; }
.fnd-tag { font-size: 10px; color: var(--muted); border: 1px solid var(--border); border-radius: 5px; padding: 0 6px; }
@media (max-width: 640px) { .fnd-bar { flex-direction: column; align-items: stretch; } .fnd-q { min-width: 0; } }

/* ── Product edition — commercial hides the government-authorization surface ── */
body.edition-commercial .gov-only { display: none !important; }

/* ── Package planes — hide the tracks the licensed package doesn't include ──
   (Operate = Professional+, Change Control = Command) plus gov features whose
   package floor isn't met (e.g. gov Essential has no ATO Now). */
body.plane-no-operate [data-track="operate"],
body.plane-no-change  [data-track="changes"],
body.feat-no-ato   .secx-navitem[data-secview="ato"],
body.feat-no-ato   .secx-view[data-secview="ato"],
body.feat-no-fr20x .secx-navitem[data-secview="fr20x"],
body.feat-no-fr20x .secx-view[data-secview="fr20x"] { display: none !important; }

/* ── Applications inventory ─────────────────────────────────────────────── */
.appx-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.appx-actions { display: flex; gap: 8px; }
.appx-section-h { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.appx-section-h:first-child { margin-top: 4px; }

/* Registered applications — management list */
.appx-apps { display: flex; flex-direction: column; gap: 8px; }
.appx-app { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 1.4fr) auto 28px; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.appx-app-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.appx-app-name { font-weight: 700; color: var(--ink); }
.appx-src { text-transform: capitalize; }
.appx-app-accts { display: flex; flex-wrap: wrap; gap: 5px; }
.appx-acct { font-size: 11.5px; font-weight: 600; color: var(--ink-2); background: rgba(121,184,255,0.10); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.appx-app-counts { text-align: right; white-space: nowrap; }
.appx-x { border: 1px solid var(--line); background: transparent; color: var(--dim); width: 26px; height: 26px; border-radius: 8px; cursor: pointer; font-size: 17px; line-height: 1; transition: color .12s ease, border-color .12s ease; }
.appx-x:hover { color: var(--crimson, #cf222e); border-color: var(--crimson, #cf222e); }

/* Criticality badges */
.appx-crit { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; border-radius: 6px; padding: 1px 7px; }
.appx-crit-low { color: var(--moss, #1a7f37); background: rgba(26,127,55,0.12); }
.appx-crit-medium { color: var(--amber, #9a6700); background: rgba(154,103,0,0.12); }
.appx-crit-high, .appx-crit-critical { color: var(--crimson, #cf222e); background: rgba(207,34,46,0.12); }

/* By-account grid — the at-a-glance boundary map */
.appx-accts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.appx-acct-card { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); padding: 12px 14px; }
.appx-acct-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.appx-acct-name { font-weight: 800; color: var(--ink); }
.appx-acct-meta { margin: 2px 0 10px; font-family: "JetBrains Mono", ui-monospace, monospace; }
.appx-acct-apps { display: flex; flex-wrap: wrap; gap: 6px; }
.appx-chip { font-size: 12px; color: var(--ink-2); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 4px 9px; }
.appx-chip b { color: var(--ink); font-weight: 700; }

/* Account-kind badges */
.appx-kind { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; border-radius: 6px; padding: 2px 7px; color: var(--muted); background: rgba(142,141,134,0.14); }
.appx-kind-management { color: var(--accent, #0969da); background: rgba(9,105,218,0.12); }
.appx-kind-audit { color: var(--amber, #9a6700); background: rgba(154,103,0,0.12); }
.appx-kind-log-archive { color: var(--moss, #1a7f37); background: rgba(26,127,55,0.12); }
.appx-kind-unmapped { color: var(--crimson, #cf222e); background: rgba(207,34,46,0.10); }

/* Discover — candidate cards */
.appx-discover { margin-bottom: 6px; }
.appx-cands { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.appx-cand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--bg-2); padding: 10px 12px; }
.appx-cand-main { display: flex; flex-direction: column; gap: 1px; margin-right: auto; }
.appx-cand-name { font-weight: 700; color: var(--ink); }
.appx-cand-sig { display: flex; flex-wrap: wrap; gap: 5px; }
.appx-sig { font-size: 11px; font-weight: 600; color: var(--muted); background: rgba(142,141,134,0.12); border-radius: 6px; padding: 2px 7px; }
.appx-reg { padding: 5px 14px; }

/* Applications — live health / traffic indicator */
.appx-app { grid-template-columns: auto minmax(150px, 1.2fr) minmax(140px, 1.4fr) auto auto 28px; }
.appx-live { display: inline-flex; align-items: center; }
.appx-live-track { position: relative; width: 46px; height: 12px; border-radius: 999px; overflow: hidden; background: rgba(142,141,134,0.14); }
.appx-live-dot { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--dim); }
.appx-live-dot.d1 { top: 1.5px; left: -6px; }
.appx-live-dot.d2 { bottom: 1.5px; left: 46px; }
.appx-live.good .appx-live-track { background: rgba(26,127,55,0.16); }
.appx-live.good .appx-live-dot { background: var(--moss, #1a7f37); box-shadow: 0 0 6px rgba(26,127,55,0.85); }
.appx-live.good .appx-live-dot.d1 { animation: appxFlowR 1.15s linear infinite; }
.appx-live.good .appx-live-dot.d2 { animation: appxFlowL 1.15s linear infinite; }
.appx-live.partial .appx-live-track { background: rgba(154,103,0,0.16); }
.appx-live.partial .appx-live-dot { background: var(--amber, #9a6700); }
.appx-live.partial .appx-live-dot.d1 { animation: appxFlowR 2.2s linear infinite; }
.appx-live.partial .appx-live-dot.d2 { animation: appxFlowL 2.2s linear infinite; }
.appx-live.bad .appx-live-track { background: rgba(207,34,46,0.16); }
.appx-live.bad .appx-live-dot { background: var(--crimson, #cf222e); animation: none; opacity: .85; }
.appx-live.bad .appx-live-dot.d1 { left: 15px; top: 3.5px; }
.appx-live.bad .appx-live-dot.d2 { left: 26px; top: 3.5px; }
.appx-live.unknown .appx-live-dot { animation: none; }
@keyframes appxFlowR { from { left: -6px; } to { left: 46px; } }
@keyframes appxFlowL { from { left: 46px; } to { left: -6px; } }

/* Applications — per-app FedRAMP posture scorecard */
.appx-app-wrap { display: flex; flex-direction: column; }
.appx-fr-toggle { justify-self: end; font: inherit; font-size: 11px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--indigo); background: rgba(43,58,140,0.07); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; cursor: pointer; white-space: nowrap; transition: background .12s ease, border-color .12s ease; }
.appx-fr-toggle:hover { background: rgba(43,58,140,0.13); border-color: var(--indigo); }
.appx-fr-caret { display: inline-block; margin-left: 3px; transition: transform .15s ease; }
.appx-fr-caret.open { transform: rotate(90deg); }
.appx-posture { margin: 2px 0 4px; }
.appx-fr { border: 1px solid var(--line); border-top: none; border-radius: 0 0 10px 10px; background: var(--bg); padding: 13px 14px 14px; margin-top: -4px; }
.appx-fr-load, .appx-fr-empty { padding: 6px 2px; }
.appx-fr-rc { color: var(--dim); }
.appx-fr-baseline { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; }
.appx-fr-baseline .muted { margin-right: 2px; }
.appx-fr-blvl { font: inherit; font-size: 11.5px; font-weight: 700; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; cursor: pointer; transition: all .12s ease; }
.appx-fr-blvl:hover { border-color: var(--line-strong); color: var(--ink-2); }
.appx-fr-blvl.active { color: #fff; background: var(--indigo); border-color: var(--indigo); }
.appx-fr-top { display: flex; align-items: center; gap: 18px; }
.appx-fr-ring { --pct: 0; position: relative; flex: 0 0 108px; width: 108px; height: 108px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(closest-side, var(--bg) 0 70%, transparent 71% 100%), conic-gradient(var(--ring-c, var(--moss)) calc(var(--pct) * 1%), rgba(142,141,134,0.18) 0); }
.appx-fr-ring.appx-fr-green { --ring-c: var(--moss, #1a7f37); }
.appx-fr-ring.appx-fr-amber { --ring-c: var(--amber, #b45309); }
.appx-fr-ring.appx-fr-red { --ring-c: var(--crimson, #cf222e); }
.appx-fr-pct { font-size: 17px; font-weight: 800; color: var(--ink); line-height: 1; }
.appx-fr-ringlbl { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 3px; }
.appx-fr-summary { flex: 1 1 auto; min-width: 0; }
.appx-fr-counts { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; font-size: 13px; }
.appx-fr-counts b { font-size: 15px; }
.appx-fr-pass b { color: var(--moss, #1a7f37); }
.appx-fr-fail b { color: var(--crimson, #cf222e); }
.appx-fr-sev { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.appx-fr-sevchip { font-size: 11px; font-weight: 700; border-radius: 6px; padding: 2px 8px; border: 1px solid transparent; }
.appx-fr-sevchip b { font-weight: 800; }
.appx-fr-sevchip.crit { color: #fff; background: var(--crimson, #cf222e); }
.appx-fr-sevchip.high { color: var(--crimson, #cf222e); background: rgba(207,34,46,0.12); border-color: rgba(207,34,46,0.3); }
.appx-fr-sevchip.med { color: var(--amber, #b45309); background: rgba(180,83,9,0.12); border-color: rgba(180,83,9,0.3); }
.appx-fr-sevchip.low { color: var(--muted); background: rgba(142,141,134,0.14); }
.appx-fr-sevchip.clean { color: var(--moss, #1a7f37); background: rgba(26,127,55,0.12); border-color: rgba(26,127,55,0.3); }
.appx-fr-fams-h { margin: 14px 0 7px; display: flex; gap: 8px; align-items: baseline; }
.appx-fr-fams { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 5px 16px; }
.appx-fr-fam { display: flex; align-items: center; gap: 8px; }
.appx-fr-famcode { flex: 0 0 26px; font-size: 11px; font-weight: 800; color: var(--ink-2); }
.appx-fr-bar { flex: 1 1 auto; height: 6px; border-radius: 999px; background: rgba(207,34,46,0.22); overflow: hidden; }
.appx-fr-bar-pass { display: block; height: 100%; background: var(--moss, #1a7f37); border-radius: 999px; }
.appx-fr-famct { flex: 0 0 auto; min-width: 30px; text-align: right; }
.appx-fr-src { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
@media (max-width: 620px) {
  .appx-fr-top { flex-direction: column; align-items: flex-start; gap: 12px; }
  .appx-fr-fams { grid-template-columns: 1fr; }
}

/* Authorization recommendation banner */
.appx-fr-authz { display: flex; align-items: flex-start; gap: 11px; padding: 11px 13px; border-radius: 9px; border: 1px solid var(--line); margin-bottom: 14px; }
.appx-fr-authz-ic { font-size: 18px; line-height: 1.3; flex: 0 0 auto; }
.appx-fr-authz-lbl { font-weight: 800; font-size: 13.5px; }
.appx-fr-authz-why { margin-top: 2px; line-height: 1.45; }
.appx-fr-authz.authz-authorize { background: rgba(26,127,55,0.10); border-color: rgba(26,127,55,0.35); }
.appx-fr-authz.authz-authorize .appx-fr-authz-ic, .appx-fr-authz.authz-authorize .appx-fr-authz-lbl { color: var(--moss, #1a7f37); }
.appx-fr-authz.authz-conditional { background: rgba(180,83,9,0.10); border-color: rgba(180,83,9,0.35); }
.appx-fr-authz.authz-conditional .appx-fr-authz-ic, .appx-fr-authz.authz-conditional .appx-fr-authz-lbl { color: var(--amber, #b45309); }
.appx-fr-authz.authz-not-ready { background: rgba(207,34,46,0.10); border-color: rgba(207,34,46,0.35); }
.appx-fr-authz.authz-not-ready .appx-fr-authz-ic, .appx-fr-authz.authz-not-ready .appx-fr-authz-lbl { color: var(--crimson, #cf222e); }

/* Control families become drill-in buttons */
.appx-fr-famhint { font-style: italic; opacity: .7; }
.appx-fr-fam { width: 100%; background: transparent; border: 1px solid transparent; border-radius: 7px; padding: 3px 6px; cursor: pointer; text-align: left; transition: background .12s ease, border-color .12s ease; }
.appx-fr-fam:hover { background: var(--paper-2); border-color: var(--line); }
.appx-fr-fam.active { background: rgba(43,58,140,0.10); border-color: var(--indigo); }

/* Control drilldown list */
.appx-fr-ctrls { margin-top: 14px; }
.appx-fr-ctrls-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; font-weight: 700; }
.appx-fr-clear { font: inherit; font-size: 11px; font-weight: 700; color: var(--indigo); background: none; border: none; cursor: pointer; padding: 0; }
.appx-fr-clear:hover { text-decoration: underline; }
.appx-fr-ctrl-list { display: flex; flex-direction: column; gap: 7px; }
.appx-fr-ctrl { display: flex; gap: 9px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); }
.appx-fr-ctrl-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; }
.appx-fr-ctrl-dot.pass { background: var(--moss, #1a7f37); }
.appx-fr-ctrl-dot.fail { background: var(--crimson, #cf222e); }
.appx-fr-ctrl-main { flex: 1 1 auto; min-width: 0; }
.appx-fr-ctrl-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.appx-fr-ctrl-id { font-weight: 800; font-size: 12.5px; color: var(--ink); }
.appx-fr-ctrl-title { font-size: 12.5px; color: var(--ink-2); }
.appx-fr-sevtag { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; border-radius: 5px; padding: 1px 6px; }
.appx-fr-sevtag.critical { color: #fff; background: var(--crimson, #cf222e); }
.appx-fr-sevtag.high { color: var(--crimson, #cf222e); background: rgba(207,34,46,0.13); }
.appx-fr-sevtag.medium { color: var(--amber, #b45309); background: rgba(180,83,9,0.13); }
.appx-fr-sevtag.low { color: var(--muted); background: rgba(142,141,134,0.16); }
.appx-fr-due { margin-left: auto; white-space: nowrap; }
.appx-fr-ctrl-res { margin-top: 3px; font-family: var(--mono, ui-monospace, monospace); font-size: 11px; word-break: break-all; }
.appx-fr-ctrl-rem { margin-top: 4px; line-height: 1.45; }
.appx-fr-ctrl-rem a { font-weight: 700; }

/* Package actions */
.appx-fr-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.appx-fr-btn { font: inherit; font-size: 12.5px; font-weight: 700; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--paper-2); color: var(--ink); cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.appx-fr-btn:hover { border-color: var(--indigo); }
.appx-fr-btn.primary { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.appx-fr-btn.primary:hover { background: var(--indigo-deep, #1e2a66); }

/* ══════════════════════════════════════════════════════════════════════════
   Mobile layer — TowerControls on a phone.
   The desktop app is a two-pane track shell: a fixed side rail (operate's
   #opSidebar at 230px; the shared .secx-nav at 196px) beside the content.
   On a phone those rails eat half the width and the content clips off-screen.
   Below 720px we collapse each shell to a single column, turn the side rails
   into horizontal scroll strips, and re-dock the assistant. Desktop/tablet
   (>720px) is untouched — this block only adds narrow-screen overrides.
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  /* ── Operate: drop the 230px+content grid; the nav becomes a capped card
        that stacks above the content instead of a fixed side rail. ── */
  body[data-screen="operate"] .shell { display: block; }
  body[data-screen="operate"] #opSidebar {
    position: static; grid-column: auto; grid-row: auto; align-self: auto;
    max-height: 46vh; margin: 0 0 16px;
  }

  /* ── Security / Changes / Reports / Setup / Help all share .secx-wrap.
        Stack it, and turn the left nav into a swipeable strip of tabs. ── */
  .secx-wrap { flex-direction: column; }
  .secx-nav {
    flex: 0 0 auto; width: 100%; position: static;
    flex-direction: row; overflow-x: auto; overflow-y: hidden;
    gap: 6px; padding: 0 0 9px; margin-bottom: 14px;
    border-right: none; border-bottom: 1px solid var(--line);
    -webkit-overflow-scrolling: touch; scrollbar-width: thin;
  }
  .secx-nav-grp { display: none; }               /* section labels don't belong in a horizontal strip */
  .secx-navitem { width: auto; flex: 0 0 auto; white-space: nowrap; padding: 8px 13px; }
  .secx-navitem.ato { margin-bottom: 0; }
  .secx-badge { margin-left: 7px; }
  .secx-main { padding-left: 0; min-width: 0; }

  /* ── Assistant dock: the full-height vertical tab overlaps content on a
        narrow screen, so re-dock it as a bottom-right pill (thumb-reachable). ── */
  .agent-tab {
    top: auto; bottom: 16px; transform: none;
    flex-direction: row; gap: 8px; padding: 11px 16px;
    border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-2);
  }
  .agent-tab-label { writing-mode: horizontal-tb; text-orientation: mixed; }

  /* ── Fixed multi-column grids/heroes → stack so nothing gets squeezed. ── */
  .sec-hero { grid-template-columns: 1fr; gap: 14px; }
  .ready-row { grid-template-columns: 56px 1fr; gap: 6px 10px; }
  .ready-row > :nth-child(3) { grid-column: 1 / -1; }
  .ato-hero { flex-wrap: wrap; gap: 14px 18px; }
  .modal-meta div { grid-template-columns: 1fr; gap: 2px; }
  .home-hero-title, .authl-name { font-size: 25px; }

  /* Modals: tighter chrome so more of the dialog is content on a small screen. */
  .modal { padding: 12px; }
  .modal-card { padding: 18px; }
}

/* ── First-run setup wizard ────────────────────────────────────────────────
   The card was built at 460px for a handful of fields, then the form became
   schema-driven and 58 settings arrived in it. .setf reserves a fixed 320px for
   its control, so at that width the label column computed to THIRTY-TWO pixels
   and every label wrapped one word per line. Nobody saw it because a configured
   install never shows this screen — and it is the first screen a customer sees.
   Palette follows the marketing site so the product looks like what they bought. */
#setupWizard {
  --su-void: #0b0e18; --su-panel: #12161e; --su-panel-2: #161b2c;
  --su-line: #212a44; --su-line-2: #2c3658;
  --su-ink: #eef1f7; --su-muted: #aeb6c8; --su-dim: #76809a;
  --su-accent: #7c5cff; --su-accent-deep: #5468ff; --su-green: #57d98a;
  background: radial-gradient(1200px 600px at 50% -10%, #1a1033 0%, var(--su-void) 60%);
  overflow: auto; place-items: start center; padding: 40px 20px;
}
/* Wide ONLY when the settings form is inside; the short variants stay compact. */
#setupWizard .su-card:has(.su-form-settings) { max-width: 900px; }
#setupWizard .su-card {
  background: var(--su-panel); border: 1px solid var(--su-line);
  border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.55);
  padding: 30px 32px 26px;
}
#setupWizard .su-head h1 {
  font-size: 27px; letter-spacing: -.02em; color: var(--su-ink);
  background: linear-gradient(92deg, #fff 30%, var(--su-accent) 120%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
#setupWizard .su-head p { color: var(--su-muted); font-size: 14px; max-width: 62ch; }
#setupWizard .su-chip {
  background: var(--su-panel-2); border: 1px solid var(--su-line-2);
  color: var(--su-muted); border-radius: 999px; padding: 4px 11px; font-size: 11.5px;
}
#setupWizard .su-chip::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--su-green); margin-right: 7px; vertical-align: middle;
}
#setupWizard .set-group {
  background: var(--su-panel-2); border: 1px solid var(--su-line);
  border-radius: 13px; padding: 4px 18px 10px; margin-bottom: 15px;
}
#setupWizard .set-group-h {
  color: var(--su-accent); font-size: 11.5px; letter-spacing: .10em;
  text-transform: uppercase; font-weight: 700; padding: 14px 0 8px;
}
/* The actual fix: the control column may SHRINK, and the whole row stacks rather
   than crushing the label when there is not room for both. */
#setupWizard .setf {
  grid-template-columns: minmax(220px, 1fr) minmax(240px, 340px);
  gap: 10px 22px; padding: 11px 0; border-top: 1px solid var(--su-line);
  align-items: center;
}
#setupWizard .setf-l label { color: var(--su-ink); font-size: 13.5px; }
#setupWizard .setf-help { color: var(--su-dim); font-size: 11.5px; max-width: 54ch; }
#setupWizard .setf-in {
  background: var(--su-void); border: 1px solid var(--su-line-2);
  color: var(--su-ink); border-radius: 9px; padding: 9px 12px; font-size: 13.5px;
}
#setupWizard .setf-in:focus {
  border-color: var(--su-accent); box-shadow: 0 0 0 3px rgba(124,92,255,.22);
}
#setupWizard .su-adv, #setupWizard .set-adv {
  border: 1px solid var(--su-line); border-radius: 11px; background: var(--su-panel-2);
  padding: 10px 16px; margin-top: 4px;
}
#setupWizard .su-btn, #setupWizard button[type="submit"] {
  background: linear-gradient(180deg, var(--su-accent) 0%, var(--su-accent-deep) 100%);
  border: 0; color: #fff; font-weight: 650; border-radius: 10px; padding: 12px 20px;
}
@media (max-width: 720px) {
  #setupWizard .setf { grid-template-columns: 1fr; gap: 6px; }
  #setupWizard .setf-c { justify-content: flex-start; }
  #setupWizard .su-card { padding: 22px 18px; }
}

/* ── Which install am I in? ───────────────────────────────────────────────
   Government and Commercial are the same product with a different surface, so two
   installs are indistinguishable at a glance. Naming the edition in the chrome and
   on the sign-in screen is what stops someone acting on the wrong one. Violet is
   the product accent and reads as the default; magenta marks Commercial as the
   newer, narrower surface — the same two hues as the sign-in mark. */
.edition-badge { display: none; }
.edition-badge.is-com, .edition-badge.is-gov {
  display: inline-block; margin-left: 9px; vertical-align: middle;
  font: 700 10.5px/1 var(--mono, ui-monospace, monospace);
  letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px; border: 1px solid;
}
.edition-badge.is-gov { color: #7c5cff; border-color: rgba(124,92,255,.45); background: rgba(124,92,255,.10); }
.edition-badge.is-com { color: #e879b8; border-color: rgba(160,43,110,.55); background: rgba(160,43,110,.14); }

.authl-edition {
  margin: -4px auto 14px; width: max-content;
  font: 700 10.5px/1 var(--mono, ui-monospace, monospace);
  letter-spacing: .14em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px; border: 1px solid;
}
.authl-edition.is-gov { color: #7c5cff; border-color: rgba(124,92,255,.45); background: rgba(124,92,255,.10); }
.authl-edition.is-com { color: #e879b8; border-color: rgba(160,43,110,.55); background: rgba(160,43,110,.14); }
