/* ACIN Operator Console — cinematic green theme (zero-build) */
:root {
  --bg: #04070a;
  --bg-2: #081310;
  --bg-3: #0d1d17;
  --bg-4: #102a20;
  --line: #1a3329;
  --line-2: #234a3a;
  --txt: #d7f5e6;
  --txt-dim: #7fa896;
  --txt-mute: #547567;
  --accent: #25e07e;
  --accent-2: #0fb968;
  --accent-rgb: 37, 224, 126;
  --accent-2-rgb: 15, 185, 104;
  --accent-soft: rgba(var(--accent-rgb), 0.12);
  --ok: #2fe08a;
  --warn: #ffce5c;
  --err: #ff6b6b;
  --info: #4ad1ff;
  --purple: #b48bff;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { background: var(--bg); }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--txt);
  background:
    radial-gradient(1200px 700px at 82% -8%, rgba(var(--accent-rgb), 0.10), transparent 60%),
    radial-gradient(900px 600px at 8% 108%, rgba(var(--accent-2-rgb), 0.08), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.1px;
}
a { color: var(--accent); text-decoration: none; }
code {
  font-family: var(--mono);
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 12px;
  color: var(--accent);
}
/* Invisible scrollbars everywhere — scrolling still works */
::-webkit-scrollbar { width: 0; height: 0; background: transparent; }
::-webkit-scrollbar-thumb { background: transparent; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-corner { background: transparent; }
* { scrollbar-width: none; -ms-overflow-style: none; }

/* ---------- login ---------- */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 410px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 40px 36px 30px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(var(--accent-rgb), 0.05);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: "";
  position: absolute;
  inset: -2px -2px auto -2px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.7;
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.login-brand h1 { font-size: 19px; margin: 0; font-weight: 650; letter-spacing: 0.2px; }
.logo {
  font-size: 22px;
  color: var(--accent);
  filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.7));
}
.sub { color: var(--txt-dim); font-size: 13px; margin-bottom: 22px; }
.field { margin-bottom: 14px; }
.lbl { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--txt-mute); margin-bottom: 6px; }
input, select, textarea {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--txt);
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--sans);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { font-family: var(--mono); font-size: 12.5px; line-height: 1.5; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}
/* Visible keyboard focus for every other interactive element (mouse clicks stay clean). */
.btn:focus-visible, .nav-item:focus-visible, a:focus-visible, button:focus-visible,
[role="button"]:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
select { cursor: pointer; }
.btn {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #042013;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-weight: 650;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.08s, filter 0.15s, box-shadow 0.15s;
  box-shadow: 0 6px 18px rgba(var(--accent-rgb), 0.22);
}
.btn:hover { filter: brightness(1.06); box-shadow: 0 8px 22px rgba(var(--accent-rgb), 0.32); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--txt);
  box-shadow: none;
}
.btn.ghost:hover { background: var(--accent-soft); border-color: var(--accent-2); }
.btn.sm { padding: 6px 12px; font-size: 12.5px; }
.btn.danger { background: linear-gradient(180deg, #ff8585, #e25555); color: #2a0808; box-shadow: none; }
.login-btn { width: 100%; margin-top: 4px; }
.login-err { color: var(--err); font-size: 12.5px; min-height: 16px; margin-top: 10px; }
.login-hint { margin-top: 18px; color: var(--txt-mute); font-size: 12px; text-align: center; }

/* ---------- landing ---------- */
.landing { min-height: 100vh; display: flex; flex-direction: column; }
.lan-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px; position: sticky; top: 0; z-index: 30;
  background: rgba(5, 9, 12, 0.72); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.lan-brand { display: flex; align-items: center; gap: 11px; }
.lan-brand-name { font-weight: 750; font-size: 18px; letter-spacing: 1.5px; }
.lan-links { display: flex; align-items: center; gap: 24px; }
.lan-links a { color: var(--txt-dim); font-size: 13.5px; }
.lan-links a:hover { color: var(--txt); }
.lan-main { flex: 1; max-width: 1180px; width: 100%; margin: 0 auto; padding: 0 32px; }

.lan-hero {
  display: grid; grid-template-columns: 1fr 410px; gap: 52px; align-items: center;
  padding: 78px 0 66px;
}
.lan-eyebrow { font-size: 12px; letter-spacing: 2.5px; color: var(--accent); font-weight: 600; margin-bottom: 18px; }
.lan-h1 { font-size: 52px; line-height: 1.05; margin: 0 0 22px; font-weight: 760; letter-spacing: -0.6px; }
.lan-h1 .accentword { background: linear-gradient(90deg, var(--accent), var(--info)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lan-lede { font-size: 16.5px; line-height: 1.62; color: var(--txt-dim); margin: 0 0 30px; max-width: 560px; }
.lan-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 38px; }
.lan-cta .btn { padding: 12px 22px; font-size: 14.5px; }
.lan-stats { display: flex; gap: 38px; }
.lan-stat-n { font-size: 26px; font-weight: 730; color: var(--txt); }
.lan-stat-l { font-size: 11.5px; color: var(--txt-mute); text-transform: uppercase; letter-spacing: 0.6px; margin-top: 2px; }

.lan-section { padding: 56px 0; border-top: 1px solid var(--line); }
.lan-sec-head { text-align: center; max-width: 660px; margin: 0 auto 40px; }
.lan-sec-head h2 { font-size: 30px; margin: 0 0 12px; font-weight: 720; letter-spacing: -0.3px; }
.lan-sec-head p { color: var(--txt-dim); font-size: 15px; line-height: 1.55; margin: 0; }

.lan-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lan-feat {
  background: linear-gradient(180deg, rgba(13, 29, 23, 0.7), rgba(6, 14, 11, 0.6));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px;
  transition: border-color 0.15s, transform 0.15s;
}
.lan-feat:hover { border-color: var(--line-2); transform: translateY(-3px); }
.lan-feat-ic {
  width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 20px; margin-bottom: 16px;
}
.lan-feat h3 { font-size: 16px; margin: 0 0 8px; font-weight: 640; }
.lan-feat p { font-size: 13.5px; line-height: 1.55; color: var(--txt-dim); margin: 0; }

.lan-flow { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; }
.lan-flow-step {
  display: flex; align-items: center; gap: 10px; padding: 11px 17px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 999px; margin: 6px;
  font-size: 13.5px; color: var(--txt);
}
.lan-flow-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; }

.lan-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 32px; border-top: 1px solid var(--line); color: var(--txt-mute); font-size: 12.5px;
  max-width: 1180px; width: 100%; margin: 0 auto;
}

@media (max-width: 920px) {
  .lan-hero { grid-template-columns: 1fr; gap: 34px; padding: 46px 0 40px; }
  .lan-h1 { font-size: 38px; }
  .lan-features { grid-template-columns: 1fr; }
  .lan-links a { display: none; }
  .login-card { max-width: 100%; }
}

/* ==================================================================== */
/*  LOGIN / LANDING — high-impact cinematic layer                       */
/* ==================================================================== */
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* landing layers sit above the background */
.landing { position: relative; z-index: 1; overflow-x: hidden; }
.landing > * { position: relative; z-index: 1; }

/* staggered entrance for the hero + card */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.lan-hero-copy > * { animation: rise 0.7s both; }
.lan-hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.lan-hero-copy > *:nth-child(2) { animation-delay: 0.13s; }
.lan-hero-copy > *:nth-child(3) { animation-delay: 0.21s; }
.lan-hero-copy > *:nth-child(4) { animation-delay: 0.29s; }
.lan-hero-copy > *:nth-child(5) { animation-delay: 0.37s; }

/* eyebrow → glowing status pill */
.lan-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 15px; margin-bottom: 22px;
  border: 1px solid rgba(var(--accent-rgb), 0.32); border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.07); backdrop-filter: blur(6px);
}
.lan-eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px var(--accent);
  animation: livePulse 1.8s ease-out infinite;
}

/* bigger, animated gradient headline */
.lan-h1 { font-size: 58px; text-shadow: 0 2px 40px rgba(0, 0, 0, 0.4); }
.lan-h1 .accentword {
  background: linear-gradient(90deg, var(--accent), var(--info), var(--accent));
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: shimmerText 6s linear infinite;
}
@keyframes shimmerText { to { background-position: 200% center; } }

/* gradient stat numbers */
.lan-stat-n {
  font-size: 30px;
  background: linear-gradient(180deg, var(--txt), var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* logo breathing glow */
.lan-brand .logo, .login-brand .logo { animation: logoPulse 3s ease-in-out infinite; }
@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.6)); }
  50% { filter: drop-shadow(0 0 18px rgba(var(--accent-rgb), 0.95)); }
}

/* sign-in card — animated gradient border, rotating conic ring, breathing glow */
.login-card {
  animation: rise 0.8s 0.28s both, cardGlow 4.5s ease-in-out infinite 1s;
}
.login-card::after {
  content: ""; position: absolute; inset: 0; border-radius: 20px; padding: 1.5px;
  background: conic-gradient(from var(--ang),
    rgba(var(--accent-rgb), 0) 0deg,
    rgba(var(--accent-rgb), 0.9) 90deg,
    rgba(74, 209, 255, 0.55) 180deg,
    rgba(var(--accent-rgb), 0) 300deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: angspin 6s linear infinite; pointer-events: none;
}
@keyframes angspin { to { --ang: 360deg; } }
@keyframes cardGlow {
  0%, 100% { box-shadow: var(--shadow), 0 0 55px rgba(var(--accent-rgb), 0.10); }
  50% { box-shadow: var(--shadow), 0 0 90px rgba(var(--accent-rgb), 0.22); }
}

/* live pill inside the card */
.login-live {
  display: flex; align-items: center; gap: 9px; margin-bottom: 22px;
  color: var(--txt-dim); font-size: 12.5px;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  animation: livePulse 1.8s ease-out infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(var(--accent-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}

/* sign-in button — sweeping sheen */
.login-btn { position: relative; overflow: hidden; }
.login-btn::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-20deg); animation: sheen 3.4s ease-in-out infinite;
}
@keyframes sheen { 0% { left: -60%; } 55%, 100% { left: 140%; } }

/* feature cards — spotlight glow + icon lift */
.lan-feat { position: relative; overflow: hidden; }
.lan-feat::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(340px circle at 50% -10%, rgba(var(--accent-rgb), 0.12), transparent 70%);
}
.lan-feat:hover::before { opacity: 1; }
.lan-feat:hover {
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(var(--accent-rgb), 0.14);
}
.lan-feat-ic { transition: transform 0.2s, box-shadow 0.2s; }
.lan-feat:hover .lan-feat-ic { transform: scale(1.09); box-shadow: 0 0 26px rgba(var(--accent-rgb), 0.42); }

/* flow chips — hover lift + accent */
.lan-flow-step { transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; }
.lan-flow-step:hover {
  transform: translateY(-2px); border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

/* primary CTA glow pulse */
.lan-cta .btn:not(.ghost) { animation: cardGlow 4.5s ease-in-out infinite; }

@media (max-width: 920px) {
  .lan-h1 { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .lan-hero-copy > *, .login-card, .login-card::after, .login-btn::after,
  .lan-h1 .accentword, .lan-brand .logo, .login-brand .logo,
  .live-dot, .lan-eyebrow::before, .lan-cta .btn:not(.ghost) {
    animation: none !important;
  }
}

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); height: 100vh; width: 100%; max-width: 100vw; overflow-x: hidden; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 14, 11, 0.72);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 30;
}
.tb-left { display: flex; align-items: center; gap: 13px; min-width: 0; flex-shrink: 0; }
.tb-center { flex: 1 1 auto; display: flex; justify-content: center; align-items: center; min-width: 0; }
@media (max-width: 1200px) { .tb-center { display: none; } }
.nav-toggle {
  display: grid; place-items: center;
  width: 34px; height: 34px; padding: 0;
  border-radius: 9px; cursor: pointer;
  background: var(--bg-3); border: 1px solid var(--line); color: var(--txt-dim);
  font-size: 16px; line-height: 1; transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.nav-toggle:hover { background: var(--accent-soft); border-color: var(--accent-2); color: var(--txt); }
.nav-toggle.active { background: var(--accent-soft); border-color: var(--accent-2); color: var(--accent); }
.nav-toggle .ic { color: inherit; }
.nav-toggle svg { width: 18px; height: 18px; display: block; }
.tb-brand { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.tb-brand .t { font-weight: 650; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-brand .s { font-size: 11px; color: var(--txt-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

.health-pill {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0; white-space: nowrap;
  background: var(--bg-3); border: 1px solid var(--line);
  padding: 6px 14px; border-radius: 999px; font-size: 12.5px; color: var(--txt-dim);
}
.health-pill .live-lbl { font-weight: 700; font-size: 11px; letter-spacing: 1px; color: var(--txt-mute); }
.health-pill.up .live-lbl { color: var(--ok); }
.health-pill.deg .live-lbl { color: var(--warn); }
.health-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--txt-mute); }
.health-pill.up .dot { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.health-pill.deg .dot { background: var(--warn); box-shadow: 0 0 8px var(--warn); }

.tenant-switch { display: flex; align-items: center; gap: 8px; }
.tenant-switch label { font-size: 11px; color: var(--txt-mute); text-transform: uppercase; letter-spacing: 0.6px; }
.tenant-switch select { width: auto; min-width: 170px; max-width: 260px; padding: 7px 10px; font-size: 13px; }
.tenant-fixed { font-size: 13px; font-weight: 600; color: var(--txt); padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-3); }

/* ---------- accent colour picker ---------- */
.theme-picker { position: relative; display: flex; }
.theme-btn {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: var(--bg-3);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.theme-btn:hover { border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-soft); }
.theme-dot { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.25); }
.theme-pop {
  position: absolute; top: 44px; right: 0;
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  padding: 13px;
  width: 184px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 60;
}
.theme-picker.open .theme-pop { display: grid; }
.theme-swatch {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer; padding: 0;
  position: relative;
  transition: transform 0.1s;
}
.theme-swatch:hover { transform: scale(1.1); }
.theme-swatch.sel { box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 4px #fff; }
.theme-swatch.sel::after {
  content: "\2713";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: rgba(0, 0, 0, 0.78); font-size: 15px; font-weight: 800;
}

/* ---------- LLM model picker cards ---------- */
.provider-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.provider-tab {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--txt-dim);
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.provider-tab:hover { color: var(--txt); border-color: var(--line-2); }
.provider-tab.active {
  color: #042013;
  background: var(--accent);
  border-color: var(--accent);
}
.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.model-card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 15px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.08s, background 0.15s;
  position: relative;
}
.model-card:hover { border-color: var(--line-2); background: var(--bg-4); transform: translateY(-1px); }
.model-card.sel {
  border-color: var(--accent-2);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent-2), 0 8px 22px rgba(var(--accent-rgb), 0.16);
}
.model-card.sel::after {
  content: "✓";
  position: absolute; top: 12px; right: 13px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: #042013;
  font-size: 12px; font-weight: 800; line-height: 18px; text-align: center;
}
.mc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.mc-name { font-weight: 650; font-size: 14px; color: var(--txt); }
.mc-prov { font-size: 11px; text-transform: uppercase; letter-spacing: 0.7px; color: var(--txt-mute); margin-bottom: 7px; }
.mc-desc { font-size: 12.5px; line-height: 1.45; color: var(--txt-dim); }
.mc-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tag { font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--txt-dim); white-space: nowrap; }
.tag-open { color: var(--info); border-color: rgba(74, 209, 255, 0.4); background: rgba(74, 209, 255, 0.08); }
.tag-iso { color: var(--ok); border-color: rgba(47, 224, 138, 0.4); background: rgba(47, 224, 138, 0.08); }
.tag-clean { color: var(--ok); border-color: rgba(47, 224, 138, 0.3); }
.tag-cn { color: var(--warn); border-color: rgba(255, 206, 92, 0.45); background: rgba(255, 206, 92, 0.08); }
.provider-groups { display: flex; flex-direction: column; gap: 14px; }
.provider-group-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.pg-label { font-weight: 700; font-size: 13px; color: var(--txt); }
.pg-note { font-size: 11.5px; color: var(--txt-dim); }
.provider-tab.prov-cn { border-style: dashed; }
.prov-iso { margin-left: 6px; font-size: 9.5px; font-weight: 700; letter-spacing: 0.3px; color: var(--ok); border: 1px solid rgba(47, 224, 138, 0.4); background: rgba(47, 224, 138, 0.1); border-radius: 999px; padding: 0 5px; }
.gov-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gov-col { display: flex; flex-direction: column; }
.gov-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.gov-t { font-weight: 650; font-size: 13px; color: var(--txt); }
.iso-cell { text-align: center; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; background: var(--line-2); }
.dot-met { background: var(--ok); }
.dot-part { background: var(--warn); }
.dot-gap { background: var(--err); }
.iso-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.iso-legend .dot { margin-right: 4px; }
@media (max-width: 900px) { .gov-grid { grid-template-columns: 1fr; } }
.connect-bar {
  display: grid;
  grid-template-columns: 1fr 280px auto;
  gap: 16px;
  align-items: end;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.connect-bar .field, .connect-bar .form-row { margin-bottom: 0; }
.connect-bar .actions { margin-top: 0; align-items: center; }
.cred-fields { display: grid; gap: 10px; align-content: end; }
.cred-fields .form-row { margin-bottom: 0; }
.mc-selected { display: flex; flex-direction: column; gap: 3px; min-height: 38px; justify-content: center; }
.mc-sel-name { font-weight: 650; font-size: 14px; color: var(--txt); }
.mc-sel-meta { font-size: 12px; color: var(--txt-mute); word-break: break-all; }
@media (max-width: 720px) { .connect-bar { grid-template-columns: 1fr; } }

.usermenu { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #042013; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.um-meta { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.usermenu .uname { font-size: 13px; font-weight: 600; color: var(--txt); white-space: nowrap; }
.usermenu .urole { font-size: 10.5px; color: var(--txt-mute); white-space: nowrap; letter-spacing: 0.2px; }

.body { display: grid; grid-template-columns: 248px minmax(0, 1fr); overflow: hidden; }
.sidebar {
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(9, 18, 14, 0.85), rgba(4, 8, 7, 0.55));
  padding: 14px 12px;
  overflow-y: auto;
  min-height: 0;
  transition: padding 0.16s ease;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }
.sidebar:hover::-webkit-scrollbar-thumb { background: var(--txt-mute); }
.nav-group { font-size: 10px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--txt-mute); font-weight: 700; margin: 20px 10px 8px; white-space: nowrap; }
.nav-group:first-child { margin-top: 2px; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 11px; border-radius: 9px; cursor: pointer;
  color: var(--txt-dim); font-size: 12.5px; font-weight: 500;
  transition: background 0.14s ease, color 0.14s ease;
  margin-bottom: 1px;
  white-space: nowrap; overflow: hidden;
}
.nav-item:hover { background: rgba(var(--accent-rgb), 0.07); color: var(--txt); }
.nav-item.active {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--txt); font-weight: 600;
}
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--accent);
}
/* Plain line icons (no boxed chip) so the label breathes and the rail is airy. */
.nav-item .ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; flex: 0 0 auto;
  color: var(--txt-mute);
  transition: color 0.14s ease;
}
.nav-item:hover .ic { color: var(--accent); }
.nav-item.active .ic { color: var(--accent); }
.nav-item .ic svg { width: 18px; height: 18px; display: block; }
.nav-item .lbl { margin: 0; padding: 0; font-size: 12px; font-weight: 600; line-height: 1.15; letter-spacing: 0.3px; text-transform: uppercase; color: inherit; min-width: 0; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.nav-item .badge-count, .nav-item .nav-badge { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--accent); background: rgba(var(--accent-rgb), 0.14); border-radius: 999px; padding: 1px 8px; flex: 0 0 auto; }

/* ---------- collapsed (icon-only) sidebar ---------- */
.shell.nav-collapsed .body { grid-template-columns: 74px 1fr; }
.shell.nav-collapsed .sidebar { padding: 16px 10px; }
.shell.nav-collapsed .nav-item { justify-content: center; gap: 0; padding: 6px 0; }
.shell.nav-collapsed .nav-item .lbl,
.shell.nav-collapsed .nav-item .badge-count,
.shell.nav-collapsed .nav-item .nav-badge { display: none; }
.shell.nav-collapsed .nav-item.active::before { display: none; }
.shell.nav-collapsed .nav-group { font-size: 0; letter-spacing: 0; margin: 14px 8px 8px; height: 1px; background: var(--line); }
.shell.nav-collapsed .nav-group:first-child { margin-top: 2px; }

.main { min-width: 0; overflow-y: auto; overflow-x: hidden; padding: 22px 28px 40px; }
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 22px; margin: 0 0 4px; font-weight: 650; }
.page-head p { color: var(--txt-dim); font-size: 13.5px; margin: 0; max-width: 760px; }

/* ---------- cards / grid ---------- */
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }

.card {
  background: linear-gradient(180deg, rgba(13, 29, 23, 0.55), rgba(7, 16, 12, 0.55));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.main > .card, .main > .grid { margin-bottom: 18px; }
.main > .card:last-child, .main > .grid:last-child { margin-bottom: 0; }
.report > .card, .report > .grid, .report > .outcome { margin-bottom: 18px; }
.report > .card:last-child, .report > .grid:last-child { margin-bottom: 0; }
.card h2 { font-size: 15px; margin: 0 0 3px; font-weight: 620; }
.card h3 { font-size: 14px; margin: 0 0 8px; font-weight: 600; }
.card .desc { color: var(--txt-dim); font-size: 12.5px; margin: 0 0 14px; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }

/* metric / panel */
.panel {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, rgba(16, 42, 32, 0.6), rgba(7, 16, 12, 0.6));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
}
.panel::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.10), transparent 70%);
}
.panel .ptag { font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.panel .ptitle { font-size: 13px; color: var(--txt-dim); margin: 2px 0 12px; }
.panel .pbig { font-size: 30px; font-weight: 700; line-height: 1; }
.panel .pbig small { font-size: 14px; color: var(--txt-mute); font-weight: 500; }
.panel .prow { display: flex; justify-content: space-between; font-size: 12px; color: var(--txt-dim); padding: 4px 0; border-top: 1px dashed var(--line); }
.panel .prow:first-of-type { border-top: none; }
.panel .prow b { color: var(--txt); font-weight: 600; }
/* approvals inbox helpers */
.kvs { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.notice {
  background: rgba(var(--accent-rgb), 0.08); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 8px;
  padding: 10px 12px; font-size: 12.5px; color: var(--txt); margin: 8px 0;
}
.spark { display: flex; gap: 3px; align-items: flex-end; height: 26px; margin-top: 10px; }
.spark i { flex: 1; background: linear-gradient(180deg, var(--accent), var(--accent-2)); border-radius: 2px; opacity: 0.8; }

/* ---------- tables ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; color: var(--txt-mute); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid #12231b; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: var(--accent-soft); }
.tbl .muted { color: var(--txt-mute); }
.empty { color: var(--txt-mute); font-size: 13px; padding: 20px; text-align: center; }

/* ---------- badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--txt-dim); white-space: nowrap; }
.badge.ok { color: var(--ok); border-color: rgba(47, 224, 138, 0.4); background: rgba(47, 224, 138, 0.08); }
.badge.warn { color: var(--warn); border-color: rgba(255, 206, 92, 0.4); background: rgba(255, 206, 92, 0.08); }
.badge.err { color: var(--err); border-color: rgba(255, 107, 107, 0.4); background: rgba(255, 107, 107, 0.08); }
.badge.info { color: var(--info); border-color: rgba(74, 209, 255, 0.4); background: rgba(74, 209, 255, 0.08); }
.badge.purple { color: var(--purple); border-color: rgba(180, 139, 255, 0.4); background: rgba(180, 139, 255, 0.08); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 11.5px; padding: 3px 9px; border-radius: 7px; background: var(--bg-3); border: 1px solid var(--line); color: var(--txt-dim); cursor: default; }
.chip.sel { background: var(--accent-soft); border-color: var(--accent-2); color: var(--accent); }
.chip.pick { cursor: pointer; }
.chip.pick:hover { border-color: var(--accent-2); }

/* ---------- forms ---------- */
.form-grid { display: grid; gap: 13px; }
.form-row { display: grid; gap: 6px; }
.form-row .lbl { margin-bottom: 0; }
.form-row .hint { font-size: 11.5px; color: var(--txt-mute); }
.inline { display: flex; gap: 10px; align-items: center; }
.inline > * { flex: 1; }
.form-grid > .inline { align-items: flex-start; }
.form-grid > .inline > * { min-width: 0; }
.check { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; color: var(--txt); }
.check input { width: auto; }
.actions { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; }

/* ---------- timeline ---------- */
.tl { position: relative; margin: 4px 0 0; padding-left: 6px; }
.tl-step { display: flex; gap: 13px; padding: 3px 0; }
.tl-rail { display: flex; flex-direction: column; align-items: center; }
.tl-node { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; flex-shrink: 0; border: 1px solid var(--line-2); background: var(--bg-3); color: var(--txt-mute); margin-top: 2px; }
.tl-node.ok { background: rgba(47, 224, 138, 0.14); border-color: var(--ok); color: var(--ok); }
.tl-node.err { background: rgba(255, 107, 107, 0.14); border-color: var(--err); color: var(--err); }
.tl-line { width: 2px; flex: 1; background: var(--line); margin: 2px 0; min-height: 8px; }
.tl-body { padding-bottom: 12px; flex: 1; min-width: 0; }
.tl-title { font-size: 13.5px; font-weight: 550; }
.tl-meta { font-size: 11.5px; color: var(--txt-mute); font-family: var(--mono); margin-top: 2px; }
.tl-toggle { font-size: 11.5px; color: var(--accent); cursor: pointer; margin-top: 4px; display: inline-block; }
.tl-resp { margin-top: 7px; }

/* ---------- live execution view ---------- */
.run-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 4px 0 16px; }
.run-head-main h1 { margin: 0; }
.run-sub { margin: 5px 0 0; color: var(--txt-dim); font-size: 13px; display: flex; align-items: center; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; box-shadow: 0 0 8px var(--accent); animation: livePulse 1.2s ease-in-out infinite; }
.live-dot.settled { background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: none; }
.live-dot.dead { background: var(--err); box-shadow: 0 0 8px var(--err); animation: none; }
@keyframes livePulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.7); } }

.run-grid { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: 18px; align-items: start; }
.run-left { min-width: 0; }
.live-body { display: flex; flex-direction: column; gap: 14px; }
.run-right { position: sticky; top: 12px; }
.run-tl-title { margin-top: 0; }
.run-tl { max-height: calc(100vh - 230px); overflow-y: auto; padding-right: 4px; }
.run-tl .tl-step:last-child .tl-line { display: none; }
.run-left .live-gates { margin-top: 12px; }
@media (max-width: 1100px) {
  .run-grid { grid-template-columns: 1fr; }
  .run-right { position: static; }
  .run-tl { max-height: none; }
}

/* in-flight timeline node + entrance animation */
.tl-step { animation: tlIn 0.24s ease; }
@keyframes tlIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.tl-step.active .tl-title { color: var(--txt); }
.tl-node.run { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.spinner.sm { width: 11px; height: 11px; border-width: 2px; border-color: rgba(var(--accent-rgb), 0.3); border-top-color: var(--accent); }

/* outcome banner */
.outcome {
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px;
  border: 1px solid rgba(47, 224, 138, 0.4); background: linear-gradient(120deg, rgba(47, 224, 138, 0.12), transparent);
}
.outcome.fail { border-color: rgba(255, 107, 107, 0.4); background: linear-gradient(120deg, rgba(255, 107, 107, 0.12), transparent); }
.outcome .ol { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--txt-mute); }
.outcome .ov { font-size: 19px; font-weight: 680; margin: 3px 0; }
.outcome .os { font-size: 12.5px; color: var(--txt-dim); font-family: var(--mono); }

/* coalition lifecycle strip */
.lifecycle { display: flex; align-items: center; gap: 0; margin: 6px 0 4px; }
.lc-stage { flex: 1; text-align: center; position: relative; }
.lc-dot { width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 6px; display: grid; place-items: center; background: var(--bg-3); border: 2px solid var(--line-2); color: var(--txt-mute); font-size: 14px; position: relative; z-index: 2; }
.lc-stage.done .lc-dot { background: rgba(47, 224, 138, 0.16); border-color: var(--ok); color: var(--ok); box-shadow: 0 0 14px rgba(47, 224, 138, 0.3); }
.lc-stage .lc-label { font-size: 11.5px; color: var(--txt-dim); }
.lc-stage.done .lc-label { color: var(--txt); }
.lc-bar { position: absolute; top: 17px; left: 50%; width: 100%; height: 2px; background: var(--line); z-index: 1; }
.lc-stage.done .lc-bar { background: var(--ok); }
.lc-stage:last-child .lc-bar { display: none; }

/* json viewer */
pre.json { font-family: var(--mono); font-size: 12px; line-height: 1.55; background: #050d0a; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; overflow: auto; max-height: 320px; margin: 0; }
.j-key { color: #7fd8ff; } .j-str { color: var(--accent); } .j-num { color: #ffd27a; } .j-bool { color: var(--purple); } .j-null { color: var(--txt-mute); }

/* quick-start steps */
.qs { display: flex; flex-direction: column; gap: 8px; }
.qs-step { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color 0.12s, background 0.12s; }
.qs-step:hover { border-color: var(--accent-2); background: var(--accent-soft); }
.qs-num { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.qs-step .qt { flex: 1; font-size: 13.5px; }
.qs-step .qa { color: var(--accent); font-size: 16px; }

.kv { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--txt-mute); }
.kv .v { color: var(--txt); font-weight: 550; }

/* ---------- live reasoning stream (Copilot-style thinking transcript) ---------- */
.rsx { border: 1px solid var(--line-2); border-radius: var(--radius); background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.05), transparent 40%), var(--bg-2); margin-bottom: 16px; overflow: hidden; }
.rsx-head { display: flex; align-items: center; gap: 9px; padding: 12px 15px; border-bottom: 1px solid var(--line); }
.rsx-orb { width: 11px; height: 11px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #bffada, var(--accent)); box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.7); animation: rsxOrb 2.4s ease-in-out infinite; }
@keyframes rsxOrb { 0%, 100% { transform: scale(1); opacity: 0.9; } 50% { transform: scale(1.25); opacity: 1; } }
.rsx-title { font-weight: 650; font-size: 14px; letter-spacing: 0.2px; }
.rsx-live { margin-left: auto; display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--txt-dim); }
.rsx-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--err); box-shadow: 0 0 8px var(--err); animation: rsxBlink 1.3s steps(1) infinite; }
@keyframes rsxBlink { 50% { opacity: 0.25; } }
.rsx-empty { padding: 20px 16px; color: var(--txt-mute); font-size: 13px; font-style: italic; }
.rsx-log { max-height: 460px; overflow: auto; padding: 6px 4px; scroll-behavior: smooth; }
.rsx-e { display: flex; gap: 11px; padding: 11px 14px; animation: rsxIn 0.28s ease; }
@keyframes rsxIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.rsx-av { width: 28px; height: 28px; flex-shrink: 0; border-radius: 8px; display: grid; place-items: center; font-size: 14px; background: var(--bg-4); border: 1px solid var(--line-2); color: var(--accent); }
.rsx-av.pulse { animation: rsxPulse 1.1s ease-in-out infinite; }
@keyframes rsxPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.4); } 50% { box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0); } }
.rsx-e.vote .rsx-av { color: var(--info); }
.rsx-e.delib .rsx-av { color: var(--purple); }
.rsx-b { flex: 1; min-width: 0; font-size: 13px; line-height: 1.6; }
.rsx-who { font-weight: 600; color: var(--txt); margin-bottom: 4px; font-size: 12.5px; }
.rsx-think { display: flex; align-items: center; gap: 9px; color: var(--txt-dim); font-style: italic; padding-top: 4px; }
.rsx-dots { display: inline-flex; gap: 3px; }
.rsx-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: 0.4; animation: rsxDot 1.2s infinite; }
.rsx-dots i:nth-child(2) { animation-delay: 0.2s; } .rsx-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes rsxDot { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.rsx-thought { color: var(--txt-dim); padding: 2px 0 2px 12px; border-left: 2px solid var(--line-2); margin: 3px 0; }
.rsx-tool { font-family: var(--mono); font-size: 12px; margin: 4px 0; padding: 4px 0; }
.rsx-tool-k { color: var(--accent); }
.rsx-tool-arrow { color: var(--txt-mute); }
.rsx-tool-obs { color: var(--txt-dim); }
.rsx-live-line { border-right: 2px solid var(--accent); animation: rsxCaret 0.9s steps(1) infinite; padding-right: 2px; }
@keyframes rsxCaret { 50% { border-color: transparent; } }
.rsx-verdict { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.rsx-badge { display: inline-block; padding: 2px 9px; border-radius: 6px; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.5px; background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(var(--accent-rgb), 0.35); }
.rsx-badge.sm { font-size: 10px; padding: 1px 7px; }
.rsx-rat { color: var(--txt); }
.rsx-vote-head { display: flex; align-items: center; gap: 8px; }
.rsx-vote-who { font-weight: 600; font-size: 12.5px; color: var(--txt); }
.rsx-vote-rat { color: var(--txt-dim); margin-top: 3px; font-size: 12.5px; }

.section-title { font-size: 13px; font-weight: 620; margin: 22px 0 10px; color: var(--txt); display: flex; align-items: center; gap: 8px; }
.section-title .ic { display: inline-flex; align-items: center; justify-content: center; line-height: 1; font-style: normal; color: var(--accent); }

/* toast */
.toast-wrap { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 999; }
.toast { background: var(--bg-4); border: 1px solid var(--line-2); border-left: 3px solid var(--accent); padding: 11px 16px; border-radius: 9px; font-size: 13px; box-shadow: var(--shadow); transition: opacity 0.25s; max-width: 360px; }
.toast.err { border-left-color: var(--err); }
.toast.ok { border-left-color: var(--ok); }

.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(4, 32, 19, 0.4); border-top-color: #042013; border-radius: 50%; animation: spin 0.7s linear infinite; }
.spinner.lg { width: 26px; height: 26px; border-width: 3px; border-color: rgba(var(--accent-rgb), 0.25); border-top-color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-wrap { display: grid; place-items: center; padding: 50px; }

.divider { height: 1px; background: var(--line); margin: 18px 0; }
.tiny { font-size: 11.5px; color: var(--txt-mute); }
.right { margin-left: auto; }
.flex { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.mono { font-family: var(--mono); font-size: 12px; }
.crumb { color: var(--txt-mute); font-size: 12.5px; cursor: pointer; margin-bottom: 10px; display: inline-block; }
.crumb:hover { color: var(--accent); }

/* ---- Clickable mesh panels + fabric detail popup ---- */
.fab-panel { cursor: pointer; transition: border-color .15s ease, transform .05s ease, box-shadow .15s ease; }
.fab-panel:hover { border-color: rgba(var(--accent-rgb), 0.55); box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.14); }
.fab-panel:active { transform: translateY(1px); }
.fab-more { color: var(--accent); opacity: 0; transition: opacity .15s ease; }
.fab-panel:hover .fab-more { opacity: 1; }

.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(2, 6, 4, 0.66); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: modalFade .12s ease;
}
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 14px;
  width: 100%; max-width: 640px; max-height: 84vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(var(--accent-rgb), 0.06);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.modal-head strong { font-size: 16px; color: var(--txt); }
.modal-body { padding: 18px 20px; overflow: auto; }
.modal-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.modal-summary { color: var(--txt); font-size: 13.5px; line-height: 1.55; margin: 0 0 6px; }
.modal-h { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--txt-dim); margin: 16px 0 8px; }
.modal-list { margin: 0; padding-left: 18px; }
.modal-list li { color: var(--txt); font-size: 13px; line-height: 1.5; margin-bottom: 6px; }
.modal-eps { display: flex; flex-direction: column; gap: 6px; }
.modal-ep { font-family: var(--mono); font-size: 12px; color: var(--accent); background: rgba(var(--accent-rgb), 0.08); border: 1px solid var(--line); border-radius: 7px; padding: 6px 10px; }

/* ================================================================
   UX REFRESH — page headers with a primary action, modern form
   controls, roomier cards & tables, and the slide-over drawer that
   now hosts every create/author form (lists stay clean by default).
   ================================================================ */

/* --- page header: title/description left, primary action right --- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-head .ph-txt { min-width: 0; }
.page-head h1 { margin: 0 0 7px; font-size: 26px; letter-spacing: -0.4px; }
.page-head p { margin: 0; max-width: 74ch; color: var(--txt-dim); font-size: 14px; line-height: 1.6; }
.ph-action { flex-shrink: 0; white-space: nowrap; align-self: center; box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.28); }

/* --- form controls (scoped to form rows / drawer so header stays intact) --- */
.form-row { margin-bottom: 17px; }
.form-row:last-child { margin-bottom: 0; }
.form-row .lbl, .lbl { display: block; font-size: 11px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--txt-mute); margin-bottom: 7px; font-weight: 650; }
.form-row .hint, .hint { font-size: 11.5px; color: var(--txt-mute); margin-top: 6px; line-height: 1.5; }
.form-row input, .form-row select, .form-row textarea,
.drawer-body input, .drawer-body select, .drawer-body textarea {
  width: 100%; padding: 11px 13px; border-radius: 11px; background: var(--bg-3);
  border: 1px solid var(--line); color: var(--txt); font-size: 14px;
  transition: border-color .14s, box-shadow .14s, background .14s;
}
.form-row input:hover, .form-row select:hover, .form-row textarea:hover,
.drawer-body input:hover, .drawer-body select:hover, .drawer-body textarea:hover { border-color: var(--line-2); }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus,
.drawer-body input:focus, .drawer-body select:focus, .drawer-body textarea:focus {
  outline: none; border-color: var(--accent-2); background: var(--bg-2);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.14);
}
.form-row textarea, .drawer-body textarea { font-family: var(--mono); font-size: 12.5px; line-height: 1.55; resize: vertical; min-height: 90px; }
.form-grid { display: flex; flex-direction: column; gap: 0; }
.inline { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.check { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 2px; cursor: pointer; font-size: 13.5px; color: var(--txt); }
.check input { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--accent); }

/* --- buttons: bigger, clearer --- */
.btn { padding: 11px 18px; border-radius: 11px; font-size: 13.5px; font-weight: 650; letter-spacing: 0.1px; }
.btn.sm { padding: 7px 12px; font-size: 12px; border-radius: 9px; }
.btn.ghost { background: transparent; border: 1px solid var(--line-2); color: var(--txt); box-shadow: none; }
.btn.ghost:hover { border-color: var(--accent-2); color: var(--accent); background: var(--accent-soft); filter: none; box-shadow: none; }

/* --- cards & tables: more air --- */
.card { padding: 24px; border-radius: 18px; }
.card > h2 { margin: 0 0 4px; font-size: 15.5px; letter-spacing: -0.1px; }
.card > .desc { margin-bottom: 18px; color: var(--txt-dim); font-size: 13px; line-height: 1.55; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--txt-mute); padding: 11px 14px; border-bottom: 1px solid var(--line); font-weight: 650; }
.tbl td { padding: 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; vertical-align: middle; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover td { background: rgba(var(--accent-rgb), 0.045); }
.tbl tbody tr:last-child td { border-bottom: none; }

/* --- slide-over drawer --- */
.drawer-wrap { position: fixed; inset: 0; z-index: 140; }
.drawer-back { position: absolute; inset: 0; background: rgba(2, 6, 4, 0.6); opacity: 0; transition: opacity .22s ease; backdrop-filter: blur(3px); }
.drawer-back.in { opacity: 1; }
.drawer { position: absolute; top: 0; right: 0; height: 100%; width: min(580px, 48vw); background: var(--bg-2);
  border-left: 1px solid var(--line-2); box-shadow: -30px 0 70px rgba(0, 0, 0, 0.55);
  transform: translateX(100%); transition: transform .28s cubic-bezier(.4, 0, .2, 1); display: flex; flex-direction: column; }
.drawer.in { transform: none; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 26px 20px; border-bottom: 1px solid var(--line); }
.drawer-htxt { min-width: 0; }
.drawer-head h2 { margin: 0 0 5px; font-size: 18px; letter-spacing: -0.2px; }
.drawer-sub { font-size: 12.5px; color: var(--txt-dim); max-width: 48ch; line-height: 1.5; }
.drawer-x { background: var(--bg-4); border: 1px solid var(--line-2); color: var(--txt-dim); width: 34px; height: 34px; border-radius: 9px; cursor: pointer; font-size: 15px; flex-shrink: 0; transition: color .12s, border-color .12s; }
.drawer-x:hover { color: var(--txt); border-color: var(--accent-2); }
.drawer-body { padding: 24px 26px 40px; overflow: auto; flex: 1; }
/* flatten the embedded create card so the form fills the drawer cleanly */
.drawer-body > .card { padding: 0; border: none; background: none; box-shadow: none; border-radius: 0; }
.drawer-body > .card > h2 { display: none; }
.drawer-body > .card > .desc { margin: -4px 0 20px; }
.drawer-body .actions { margin-top: 26px; }
.drawer-body .actions .btn { flex: 1; justify-content: center; }

/* --- use-case wizard --- */
.wiz { display: grid; grid-template-columns: 310px 1fr; gap: 24px; align-items: start; }
.wiz-rail { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 20px; }
.wiz-progress { margin-bottom: 12px; }
.wiz-pbar { height: 6px; border-radius: 4px; background: var(--bg-4); overflow: hidden; margin-bottom: 7px; }
.wiz-pfill { height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .3s ease; }
.wiz-step { display: flex; gap: 12px; padding: 12px 13px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; transition: background .12s, border-color .12s; }
.wiz-step:hover { background: var(--bg-3); }
.wiz-step.active { background: var(--bg-3); border-color: var(--line-2); }
.wiz-dot { width: 27px; height: 27px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--bg-4); color: var(--txt-dim); border: 1px solid var(--line-2); transition: all .14s; }
.wiz-step.active .wiz-dot { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-2); }
.wiz-step.done .wiz-dot { background: var(--accent); color: #042013; border-color: var(--accent); }
.wiz-stxt { min-width: 0; }
.wiz-stitle { font-size: 13.5px; font-weight: 600; color: var(--txt); }
.wiz-sdesc { font-size: 11.5px; color: var(--txt-mute); line-height: 1.4; margin-top: 2px; }
.wiz-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; padding: 26px 28px; }
.wiz-h { display: flex; gap: 15px; align-items: flex-start; margin-bottom: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.wiz-h-ic { width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; font-size: 19px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-2); }
.wiz-h-txt h2 { margin: 0 0 4px; font-size: 18px; letter-spacing: -0.2px; }
.wiz-h-txt p { margin: 0; color: var(--txt-dim); font-size: 13px; line-height: 1.5; }
.wiz-nav { display: flex; align-items: center; gap: 10px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.wiz-nav .btn:last-child { min-width: 170px; justify-content: center; }
.wiz-added { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; }
.wiz-chip { display: flex; align-items: center; gap: 9px; padding: 9px 13px; border-radius: 10px; background: var(--bg-3); border: 1px solid var(--line); font-size: 13px; }
.wiz-chip-k { font-weight: 600; color: var(--txt); font-family: var(--mono); font-size: 12.5px; }
/* live APL infographic preview in the governance wizard step */
.wiz-preview-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--txt-2); margin: 14px 0 7px; font-weight: 600; }
.wiz-rule-preview { display: flex; flex-direction: column; gap: 9px; }
.wiz-rule-preview .gv-rule, .wiz-added .gv-rule { margin: 0; }
/* reuse-an-existing-connector panel (LLM / MCP wizard steps) */
.wiz-reuse { background: var(--bg-3); border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px; display: flex; flex-direction: column; gap: 8px; }
.wiz-reuse-h { display: flex; align-items: center; gap: 9px; }
.wiz-reuse-t { font-size: 13.5px; font-weight: 650; color: var(--txt); }
.wiz-reuse-row { display: flex; gap: 10px; align-items: center; margin-top: 3px; }
.wiz-reuse-row select { flex: 1; min-width: 0; }
.wiz-reuse-row .btn { flex-shrink: 0; }
.wiz-reuse-info { min-height: 15px; }
.wiz-model-hint { min-height: 15px; margin-top: -4px; }
.wiz-or { display: flex; align-items: center; text-align: center; color: var(--txt-mute); font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; gap: 12px; margin: 4px 0; }
.wiz-or::before, .wiz-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@media (max-width: 940px) { .wiz { grid-template-columns: 1fr; } .wiz-rail { position: static; flex-direction: row; overflow-x: auto; } .wiz-sdesc { display: none; } }

/* ================================================================
   LIGHT THEME — palette overrides. The accent (--accent*) is set
   separately by the accent picker, so light mode keeps the chosen
   accent and only recolours surfaces, lines and text.
   ================================================================ */
:root { color-scheme: dark; }
html[data-theme="light"] {
  color-scheme: light;
  --bg: #eef2f0;
  --bg-2: #ffffff;
  --bg-3: #f4f7f5;
  --bg-4: #e8efeb;
  --line: #dde5e0;
  --line-2: #c6d4cc;
  --txt: #11251b;
  --txt-dim: #3b564a;
  --txt-mute: #5f766b;
  --ok: #10a35c;
  --warn: #b7791f;
  --err: #d64545;
  --info: #1f8fbf;
  --purple: #7c5cff;
  --shadow: 0 16px 40px rgba(20, 45, 32, 0.12);
}
/* JSON/code viewers follow the theme: light surface + dark text in light mode */
html[data-theme="light"] pre.json { background: var(--bg-3); border-color: var(--line-2); }
html[data-theme="light"] .toast { box-shadow: 0 12px 30px rgba(20, 45, 32, 0.14); }
html[data-theme="light"] .drawer { box-shadow: -30px 0 70px rgba(20, 45, 32, 0.18); }
html[data-theme="light"] .drawer-back { background: rgba(20, 45, 32, 0.35); }

/* surfaces that hardcode a dark gradient/tint need explicit light backgrounds */
html[data-theme="light"] .topbar { background: rgba(255, 255, 255, 0.82); }
html[data-theme="light"] .lan-nav { background: rgba(255, 255, 255, 0.82); }
html[data-theme="light"] .sidebar { background: var(--bg-2); }
html[data-theme="light"] .card { background: var(--bg-2); }
html[data-theme="light"] .panel { background: var(--bg-2); }
html[data-theme="light"] .lan-feat { background: var(--bg-2); }
html[data-theme="light"] .health-pill,
html[data-theme="light"] .nav-toggle,
html[data-theme="light"] .theme-btn,
html[data-theme="light"] .tenant-fixed { background: var(--bg-3); }

/* audit chain — light theme legibility: the JSON evidence viewer is a light
   surface so its text must be dark; the category tags + hash chips use
   dark-tuned pastel text, so darken them for contrast on the light surface. */
html[data-theme="light"] pre.json { color: var(--txt); }
html[data-theme="light"] .ac-cat.cat-po { color: #0b6d8f; background: rgba(74, 209, 255, 0.16); }
html[data-theme="light"] .ac-cat.cat-gv { color: #8a6300; background: rgba(255, 206, 92, 0.22); }
html[data-theme="light"] .ac-cat.cat-hu { color: #5b3fb0; background: rgba(180, 139, 255, 0.18); }
html[data-theme="light"] .ac-cat.cat-rs { color: var(--accent-2); }
html[data-theme="light"] .ac-cat.cat-ev { color: #0a7d63; background: rgba(111, 224, 196, 0.2); }
html[data-theme="light"] .ac-cat.cat-en { color: #b0560d; background: rgba(255, 158, 100, 0.2); }
html[data-theme="light"] .ac-cat.cat-au { color: #345fb0; background: rgba(138, 180, 255, 0.2); }
html[data-theme="light"] .ac-id-chip.hash { background: rgba(138, 180, 255, 0.14); border-color: rgba(138, 180, 255, 0.4); }
html[data-theme="light"] .ac-id-chip.hash .ac-id-v { color: #345fb0; }
html[data-theme="light"] .ac-ev-fab,
html[data-theme="light"] .erp-w-doc { color: var(--accent-2); }

/* theme toggle button (reuses .theme-btn sizing) */
.theme-toggle { font-size: 16px; line-height: 1; color: var(--txt-dim); }
.theme-toggle:hover { color: var(--accent); }

/* ---------- approval notification bell ---------- */
.notif-wrap { position: relative; display: flex; }
.notif-btn { position: relative; color: var(--txt-dim); }
.notif-btn:hover { color: var(--accent); }
.notif-btn.has { color: var(--accent); }
.notif-btn svg { width: 18px; height: 18px; display: block; }
.notif-btn.has svg { animation: notifRing 2.6s ease-in-out infinite; transform-origin: top center; }
@keyframes notifRing { 0%, 88%, 100% { transform: rotate(0); } 90% { transform: rotate(13deg); } 93% { transform: rotate(-11deg); } 96% { transform: rotate(7deg); } 98% { transform: rotate(-4deg); } }
.notif-badge { position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--err); color: #fff; font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--bg-3); }
.notif-pop { position: absolute; top: 44px; right: 0; width: 328px; max-height: 440px; overflow: auto; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; display: none; z-index: 60; }
.notif-wrap.open .notif-pop { display: block; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.notif-empty { padding: 24px 12px; text-align: center; color: var(--txt-mute); font-size: 13px; }
.notif-item { padding: 10px 11px; border-radius: 10px; cursor: pointer; transition: background .12s; }
.notif-item:hover { background: var(--bg-3); }
.notif-title { font-size: 13px; font-weight: 600; color: var(--txt); line-height: 1.35; }
.notif-sub { font-size: 11.5px; color: var(--txt-mute); margin-top: 3px; }
.notif-foot { padding: 10px 11px; margin-top: 4px; border-top: 1px solid var(--line); color: var(--accent); font-size: 12.5px; font-weight: 650; cursor: pointer; text-align: center; }
.notif-foot:hover { background: var(--accent-soft); border-radius: 8px; }


/* placeholder marker for S30 design system */

/* ====================================================================== */
/*  SPRINT 30 DESIGN SYSTEM — master-detail, stat strip, SVG primitives,   */
/*  Mission Control + Audit Ledger, sidebar status, footer chrome.         */
/* ====================================================================== */

/* --- page head with actions --- */
.page-head .ph-actions { display: flex; align-items: center; gap: 12px; }
.range-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-2); background: var(--bg-3); color: var(--txt-dim);
  border-radius: var(--radius-sm); padding: 9px 14px; font-size: 13px; font-weight: 600;
}
.btn.primary {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  color: #ffffff; border: none; font-weight: 700;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 6px 18px rgba(37, 99, 235, 0.28);
}
.btn.primary:hover { background: linear-gradient(180deg, #4f8ef7, #2f6bff); filter: brightness(1.05); }

/* --- stat strip --- */
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 14px; margin: 4px 0 18px; }
.au-strip { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 15px 14px; min-width: 0;
}
.sc-top { display: flex; align-items: center; gap: 9px; color: var(--txt-mute); margin-bottom: 12px; }
.sc-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.sc-ic svg { width: 18px; height: 18px; }
/* per-metric colored icon tones (applied to stat cards, fleet + status rows) */
.tone-accent { background: rgba(var(--accent-rgb), 0.14); color: var(--accent); }
.tone-blue { background: rgba(58, 160, 255, 0.16); color: #5aa8ff; }
.tone-amber { background: rgba(255, 194, 58, 0.16); color: #ffc23a; }
.tone-red { background: rgba(255, 107, 107, 0.16); color: #ff7a7a; }
.tone-green { background: rgba(47, 224, 138, 0.16); color: var(--ok); }
.tone-violet { background: rgba(154, 107, 255, 0.16); color: #a78bff; }
.tone-slate { background: rgba(127, 168, 150, 0.14); color: var(--txt-dim); }

/* --- Compliance frameworks dashboard --- */
.cf-wrap { display: flex; flex-direction: column; }
.cf-fw { display: flex; align-items: center; gap: 10px; }
.cf-fw-ic { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.cf-fw-ic svg { width: 16px; height: 16px; }
.cf-score-cell { display: flex; flex-direction: column; gap: 5px; min-width: 116px; }
.cf-score { font-weight: 700; font-size: 13px; }
.cf-score.ok { color: var(--ok); } .cf-score.warn { color: var(--warn); } .cf-score.err { color: var(--err); } .cf-score.muted { color: var(--txt-mute); }
.cf-bar { height: 6px; border-radius: 999px; background: var(--bg-4); overflow: hidden; }
.cf-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.cf-bar-fill.ok { background: var(--ok); } .cf-bar-fill.warn { background: var(--warn); } .cf-bar-fill.err { background: var(--err); } .cf-bar-fill.muted { background: var(--line-2); }
.tbl tbody tr.sel td { background: rgba(var(--accent-rgb), 0.09); }
.cf-detail { display: flex; flex-direction: column; gap: 14px; }
.cf-dh { display: flex; align-items: center; gap: 12px; }
.cf-dh-ic { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.cf-dh-ic svg { width: 20px; height: 20px; }
.cf-dh-txt { flex: 1; min-width: 0; }
.cf-dh-txt h3 { margin: 0; font-size: 16px; }
.cf-desc { color: var(--txt-dim); font-size: 13px; margin: -4px 0 2px; }
.cf-ov-wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.cf-ov { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 20px; }
.cf-kv-k { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--txt-mute); }
.cf-kv-v { font-size: 13.5px; font-weight: 600; }
.cf-donut { width: 170px; flex: 0 0 auto; }
.cf-sec-h { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--txt-mute); font-weight: 650; margin-top: 4px; }
.cf-ctrls { display: flex; flex-direction: column; }
.cf-ctrl { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cf-ctrl:last-child { border-bottom: none; }
.cf-ctrl-name { display: flex; align-items: center; gap: 8px; }
.cf-ctrl-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.cf-ctrl-dot.ok { background: var(--ok); } .cf-ctrl-dot.warn { background: var(--warn); } .cf-ctrl-dot.muted { background: var(--line-2); }
.cf-ctrl-meta { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.cf-ev { display: flex; gap: 8px; align-items: center; color: var(--txt-dim); font-size: 12.5px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.cf-ev-ic svg { width: 15px; height: 15px; }

/* --- Compliance dashboard: toolbar, table cells, detail, groups --- */
.cf-pane { display: flex; flex-direction: column; gap: 14px; }
.cf-toolbar { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; justify-content: space-between; margin-top: 4px; }
.cf-search-wrap { position: relative; flex: 1; min-width: 220px; }
.cf-search-ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--txt-mute); pointer-events: none; display: inline-flex; }
.cf-search-ic svg { width: 15px; height: 15px; }
.cf-search { width: 100%; padding: 9px 12px 9px 32px; border-radius: 9px; background: var(--bg-3); border: 1px solid var(--line); color: var(--txt); font-size: 13px; }
.cf-search:focus { outline: none; border-color: rgba(var(--accent-rgb), 0.5); }
.cf-filters { display: flex; gap: 10px; align-items: flex-end; }
/* field() emits .form-row; kill its stacked-form margins so all controls share the toolbar baseline */
.cf-filters .field, .cf-filters .form-row { margin: 0; }
.cf-filters select { min-width: 132px; }
.cf-owner { display: flex; align-items: center; gap: 8px; }
.cf-owner-role { font-size: 10px; color: var(--txt-mute); }
.cf-spark { display: inline-block; width: 74px; height: 34px; color: var(--ok); }
.cf-spark svg { width: 100%; height: 100%; }
.cf-detail-wrap { display: flex; flex-direction: column; gap: 12px; }
.cf-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); margin-top: 4px; }
.cf-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
.cf-actions .btn svg { width: 14px; height: 14px; }
.cf-line { background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.cf-cats { display: flex; flex-direction: column; gap: 10px; }
.cf-cat-h { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; }
.cf-cat-pct { font-weight: 700; }
.cf-cat-pct.ok { color: var(--ok); } .cf-cat-pct.warn { color: var(--warn); } .cf-cat-pct.err { color: var(--err); }
.cf-cat .cf-bar { height: 7px; }
.cf-groups { display: flex; flex-direction: column; gap: 18px; }
.cf-grp { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg-3); }
.cf-grp-h { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--bg-4); border-bottom: 1px solid var(--line); }
.cf-grp-t { flex: 1; min-width: 0; }
.cf-grp .cf-ctrls { padding: 4px 14px; }
.pc-grp-h { border: 1px solid var(--line); border-radius: 10px; margin: 16px 0 10px; background: var(--bg-3); }
.chart-host { width: 100%; min-width: 0; }
.sc-label { font-size: 11px; font-weight: 600; color: var(--txt-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.2px; }
.sc-value { font-size: 32px; font-weight: 800; line-height: 1; color: var(--txt); }
.sc-value.accent { color: var(--accent); }
.sc-value small { font-size: 14px; font-weight: 600; color: var(--txt-mute); }
.sc-delta { margin-top: 9px; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.sc-delta .sc-arrow { font-size: 10px; }
.sc-delta.up, .sc-delta.down-good { color: var(--ok); }
.sc-delta.down, .sc-delta.up-bad { color: var(--err); }
.sc-delta.flat { color: var(--txt-mute); }

/* --- pills --- */
.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .3px; border: 1px solid transparent; white-space: nowrap; }
.pill.ok { background: rgba(47,224,138,.14); color: var(--ok); border-color: rgba(47,224,138,.3); }
.pill.err { background: rgba(255,107,107,.14); color: var(--err); border-color: rgba(255,107,107,.3); }
.pill.warn { background: rgba(255,206,92,.14); color: var(--warn); border-color: rgba(255,206,92,.3); }
.pill.muted { background: var(--bg-4); color: var(--txt-dim); border-color: var(--line-2); }
.pill.neutral { background: var(--bg-3); color: var(--txt-dim); border-color: var(--line-2); }

/* --- avatars --- */
.avatar-c { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  color: #fff; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.avatar-c.sm { width: 26px; height: 26px; font-size: 10px; }
.row-avatars { display: inline-flex; }

/* --- tabs --- */
.tabs .tab-bar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; flex-wrap: wrap; }
.tab-btn { background: none; border: none; color: var(--txt-mute); padding: 8px 12px; font-size: 13px;
  font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* --- master detail --- */
.md { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.md-list { min-width: 0; overflow: hidden; }
.md-detail { min-width: 0; }
@media (max-width: 1200px) { .md { grid-template-columns: 1fr; } }
.cf-tbl-scroll { overflow-x: auto; }
.cf-tbl-scroll .tbl { min-width: 860px; }
.cf-owner { max-width: 180px; }
.cf-owner > div { min-width: 0; }
.cf-owner .tiny, .cf-owner-role { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Dense 10-column frameworks table needs more room; stack detail below it sooner. */
@media (max-width: 1500px) { .cf-pane .md { grid-template-columns: 1fr; } }

/* --- mission control rows/panels --- */
.mc-row { display: grid; gap: 16px; margin-bottom: 16px; }
.mc-row-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.mc-row-4 { grid-template-columns: repeat(auto-fit, minmax(244px, 1fr)); }
.mc-panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.mc-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mc-panel-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.panel-link { background: none; border: none; color: var(--accent); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.mc-empty { color: var(--txt-mute); font-size: 13px; padding: 18px 4px; text-align: center; }

/* deliberation rows */
.delib-row, .dec-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.delib-row:last-child, .dec-row:last-child { border-bottom: none; }
.dr-ic { width: 32px; height: 32px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.dr-ic svg { width: 16px; height: 16px; }
.dr-body { flex: 1; min-width: 0; }
.dr-title { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-sub { font-size: 11.5px; color: var(--txt-mute); }
.dr-meta { text-align: right; }
.dr-status { font-size: 11.5px; font-weight: 700; color: var(--accent); }

/* recent decisions */
.dec-ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; flex-shrink: 0; }
.dec-ic.ok { background: rgba(47,224,138,.16); color: var(--ok); }
.dec-ic.err { background: rgba(255,107,107,.16); color: var(--err); }
.dec-body { flex: 1; min-width: 0; }
.dec-title { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dec-sub { font-size: 11px; color: var(--txt-mute); }
.dec-meta { text-align: right; }

/* --- heatmap --- */
.heat-layout { display: grid; grid-template-columns: 1fr 150px; gap: 16px; align-items: center; }
@media (max-width: 900px) { .heat-layout { grid-template-columns: 1fr; } }
.heat-wrap { min-width: 0; }
.heat-body { display: flex; align-items: stretch; gap: 6px; }
.heat-yaxis { writing-mode: vertical-rl; transform: rotate(180deg); display: grid; place-items: center; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--txt-mute); }
.heat { flex: 1; display: grid; grid-template-columns: 78px repeat(5, minmax(0, 1fr)); grid-auto-rows: 42px; gap: 5px; min-width: 0; }
.heat-cell { display: grid; place-items: center; border-radius: 6px; font-size: 14px; font-weight: 800; color: #06140d; }
.heat-cell.zero { color: var(--txt-mute); font-weight: 600; }
.heat-rl { display: grid; place-items: center end; font-size: 10.5px; color: var(--txt-dim); padding-right: 8px; white-space: nowrap; }
.heat-corner { }
.heat-cl { font-size: 9.5px; color: var(--txt-mute); text-align: center; padding-top: 5px; line-height: 1.2; }
.heat-axis { text-align: center; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--txt-mute); margin-top: 9px; padding-left: 78px; }
.heat-side { border-left: 1px solid var(--line); padding-left: 14px; }
.hs-row { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); }
.hs-lbl { font-size: 12px; color: var(--txt-dim); }
.hs-val { font-size: 18px; font-weight: 800; }
.hs-val.err { color: var(--err); } .hs-val.warn { color: var(--warn); } .hs-val.ok { color: var(--ok); }

/* --- donut / approvals --- */
.donut { display: grid; place-items: center; }
.donut-num { fill: var(--txt); font-size: 24px; font-weight: 800; }
.donut-sub { fill: var(--txt-mute); font-size: 10px; }
.appr-wrap { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: center; }
.donut-legend { min-width: 0; }
.dl-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 12px; }
.dl-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.dl-lbl { flex: 1; color: var(--txt-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-val { font-weight: 700; }
.appr-foot { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.appr-foot strong { font-size: 18px; }

/* --- agent fleet --- */
.fleet-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.fleet-row:last-child { border-bottom: none; }
.fleet-lbl { flex: 1; font-size: 13px; color: var(--txt-dim); }
.fleet-val { font-weight: 700; font-size: 15px; }
.fleet-pct { width: 42px; text-align: right; font-size: 12px; font-weight: 600; color: var(--txt-mute); }
.fleet-pct.ok { color: var(--ok); } .fleet-pct.warn { color: var(--warn); } .fleet-pct.err { color: var(--err); }
.fleet-ic { width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; flex-shrink: 0; }
.fleet-ic svg { width: 15px; height: 15px; }

/* --- system status --- */
.sys-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sys-row:last-child { border-bottom: none; }
.sys-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sys-dot.ok { background: var(--ok); box-shadow: 0 0 6px var(--ok); } .sys-dot.err { background: var(--err); }
.sys-ic { width: 24px; height: 24px; border-radius: 7px; display: inline-grid; place-items: center; flex-shrink: 0; }
.sys-ic svg { width: 15px; height: 15px; }
.sys-ic.ok { color: var(--ok); background: rgba(47, 224, 138, 0.14); }
.sys-ic.err { color: var(--err); background: rgba(255, 107, 107, 0.14); }
.sys-name { flex: 1; font-size: 13px; }
.sys-stat { font-size: 12px; font-weight: 600; }
.sys-stat.ok { color: var(--ok); } .sys-stat.err { color: var(--err); }

/* --- sidebar nav badges --- */
.nav-badge { margin-left: auto; background: var(--accent-soft); color: var(--accent); font-size: 11px;
  font-weight: 700; padding: 1px 8px; border-radius: 999px; }

/* --- footer chrome --- */
.app-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 9px 20px; border-top: 1px solid var(--line); background: var(--bg-2);
  font-size: 12px; color: var(--txt-mute); flex-wrap: wrap; }
.af-left, .af-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.af-ver { font-weight: 700; color: var(--txt-dim); }
.af-pill { color: var(--ok); font-weight: 600; }
.af-chain { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); }
.af-lock { display: inline-flex; }
.af-audit { font-family: var(--mono); }
.af-enc { display: inline-flex; align-items: center; gap: 4px; }

/* --- audit ledger --- */
.au-modebar { display: flex; gap: 6px; margin: 6px 0 14px; }
.au-mode { background: var(--bg-3); border: 1px solid var(--line-2); color: var(--txt-mute);
  padding: 8px 15px; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; }
.au-mode:hover { color: var(--txt); }
.au-mode.active { background: var(--accent); color: #04121a; border-color: transparent; }
.au-explorer { margin-bottom: 18px; }
.au3d-loading, .au3d-fallback { padding: 40px 0; text-align: center; }
.au3d-wrap { position: relative; width: 100%; height: 480px; border: 1px solid var(--line-2);
  border-radius: 14px; overflow: hidden;
  background: radial-gradient(circle at 50% 42%, rgba(38, 74, 96, 0.4), var(--bg-2) 72%); }
.au3d-canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.au3d-canvas:active { cursor: grabbing; }
.au3d-hud { position: absolute; top: 13px; left: 15px; pointer-events: none; }
.au3d-hud-t { font-weight: 700; font-size: 14px; color: var(--txt); }
.au3d-hud-s { color: var(--txt-mute); }
.au3d-legend { position: absolute; top: 13px; right: 15px; display: flex; flex-direction: column; gap: 6px;
  background: rgba(0, 0, 0, 0.3); padding: 9px 11px; border-radius: 10px; pointer-events: none; }
.au3d-lg { display: flex; align-items: center; gap: 7px; }
.au3d-sw { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.au3d-ctl { position: absolute; bottom: 13px; right: 15px; display: flex; gap: 6px; }
.au3d-btn { background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line-2); color: var(--txt-dim);
  padding: 6px 11px; border-radius: 8px; font-size: 12px; cursor: pointer; }
.au3d-btn:hover { color: var(--txt); }
.au3d-hint { position: absolute; bottom: 15px; left: 15px; color: var(--txt-mute); pointer-events: none; }
.au3d-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--bg-4);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 11px; min-width: 150px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45); }
.au3d-tip-t { font-weight: 700; font-size: 12.5px; color: var(--txt); margin-bottom: 2px; }
.blk-events { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow-y: auto; }
.blk-ev { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 9px; background: var(--bg-3); cursor: pointer; }
.blk-ev:hover { border-color: var(--line-2); background: var(--bg-4); }
.blk-ev.hot { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.blk-ev-seq { color: var(--txt-mute); min-width: 46px; }
.blk-ev-main { flex: 1; min-width: 0; }
.blk-ev-t { font-size: 13px; font-weight: 600; color: var(--txt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.au-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 12px; flex-wrap: wrap; }
.au-tab { background: none; border: none; color: var(--txt-mute); padding: 8px 12px; font-size: 13px;
  font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; }
.au-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.au-filters { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.au-search { flex: 1; min-width: 220px; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 9px 12px; color: var(--txt); font-size: 13px; }
.au-f-right { display: flex; align-items: center; gap: 8px; }
.au-list { padding: 6px 10px 10px; }
.au-row { cursor: pointer; }
.au-row:hover { background: var(--bg-3); }
.au-row.sel { background: var(--accent-soft); }
.au-ev-t { font-weight: 600; font-size: 13px; }
.au-actor { display: flex; align-items: center; gap: 8px; }
.nowrap { white-space: nowrap; }
.au-pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 4px 4px; }
.au-pnav { display: flex; gap: 8px; }

.au-detail-empty { background: var(--bg-2); border: 1px dashed var(--line-2); border-radius: var(--radius);
  padding: 40px 20px; text-align: center; }
.ade-ic { width: 44px; height: 44px; margin: 0 auto 12px; color: var(--txt-mute); }
.au-detail { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; position: sticky; top: 12px; }
.ad-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.ad-head h3 { margin: 0 0 3px; font-size: 15px; }
.ad-title-row { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--bg-3); border-radius: 10px; margin-bottom: 12px; }
.ad-ic { width: 34px; height: 34px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.ad-ic svg { width: 17px; height: 17px; }
.ad-t { font-weight: 700; font-size: 13.5px; }
.ad-title-row > div { flex: 1; min-width: 0; }
.ad-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.ad-f { min-width: 0; }
.ad-fk { font-size: 10.5px; color: var(--txt-mute); text-transform: uppercase; letter-spacing: .4px; }
.ad-fv { font-size: 13px; word-break: break-word; }
.ad-fv.mono { font-family: var(--mono); font-size: 11.5px; }
.ad-chain .cp-row { margin-bottom: 8px; }
.ad-actions { display: flex; gap: 8px; margin-top: 14px; }
.icon-btn { background: none; border: 1px solid var(--line-2); border-radius: 6px; color: var(--txt-mute);
  cursor: pointer; width: 26px; height: 26px; display: inline-grid; place-items: center; flex-shrink: 0; }
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }

/* cryptographic proof */
.crypto-proof { margin-top: 14px; padding: 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-3); }
.cp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cp-title { font-weight: 700; font-size: 13px; }
.cp-verified { font-size: 11.5px; font-weight: 700; }
.cp-verified.ok { color: var(--ok); } .cp-verified.err { color: var(--err); }
.cp-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cp-k { width: 130px; font-size: 11px; color: var(--txt-mute); flex-shrink: 0; }
.cp-v { flex: 1; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-note { margin-top: 8px; }

/* hub cards */
.hub-card { cursor: pointer; transition: border-color .15s; }
.hub-card:hover { border-color: var(--accent); }

/* --- deliberations list tabs + detail --- */
.au-tab .tab-count { margin-left: 7px; font-size: 10px; font-weight: 700; background: var(--bg-4); color: var(--txt-dim); border-radius: 999px; padding: 1px 7px; }
.au-tab.active .tab-count { background: rgba(var(--accent-rgb), 0.16); color: var(--accent); }
.stk-avatars { display: inline-flex; }
.stk-avatars .avatar-c { margin-left: -6px; border: 2px solid var(--bg-2); }
.stk-avatars .avatar-c:first-child { margin-left: 0; }
.views-row { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; }
.views-sel { background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 7px 11px; color: var(--txt); font-size: 12.5px; min-width: 150px; }

/* ---------- Deliberations screen (prototype-fidelity) ---------- */
.del-tabrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); margin: 4px 0 14px; flex-wrap: wrap; }
.del-tabrow .au-tabs { border-bottom: none; margin: 0; flex: 1; }
.del-tabctl { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; }
.del-tabctl .views-sel { min-width: 130px; padding: 8px 11px; border-radius: var(--radius-sm); }
.del-filter-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.del-filter-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.del-dl { font-size: 15px; line-height: 1; padding: 8px 11px; }

.del-filters { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.del-filters.del-hidden { display: none; }
.del-search-wrap { position: relative; flex: 1 1 240px; min-width: 200px; }
.del-search-ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; opacity: 0.6; pointer-events: none; }
.del-search { width: 100%; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 10px 12px 10px 32px; color: var(--txt); font-size: 13px; }
.del-search:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-soft); }
.del-ff { display: flex; flex-direction: column; gap: 5px; min-width: 120px; }
.del-ff > label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; color: var(--txt-mute); }
.del-fsel { background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 9px 11px; color: var(--txt); font-size: 13px; min-width: 120px; }
.del-daterange { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 9px 11px; font-size: 13px; min-width: 150px; }

.del-list { padding: 0; overflow: hidden; }
.del-table { width: 100%; }
.del-table thead th { font-size: 10.5px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--txt-mute); font-weight: 600; padding: 12px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.del-table tbody td { padding: 12px 12px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
.del-table tbody tr:last-child td { border-bottom: none; }
.del-row { cursor: pointer; transition: background 0.12s ease; }
.del-row:hover { background: rgba(var(--accent-rgb), 0.05); }
.del-cbcell { width: 34px; }
.del-cb { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
.del-id { font-family: var(--mono); font-size: 12px; color: #5aa8ff; font-weight: 600; white-space: nowrap; }
.del-uc-t { font-weight: 600; color: var(--txt); font-size: 13px; }
.del-uc-s { font-size: 11.5px; color: var(--txt-mute); margin-top: 2px; }
.del-impact { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--txt); white-space: nowrap; text-align: right; }
.del-2l-a { font-weight: 600; color: var(--txt); font-size: 12.5px; white-space: nowrap; }
.del-2l-b { font-size: 11.5px; color: var(--txt-mute); margin-top: 2px; white-space: nowrap; }
.stk-more { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: -6px; padding: 0 5px; border-radius: 50%; background: var(--bg-4); border: 2px solid var(--bg-2); color: var(--txt-dim); font-size: 10px; font-weight: 700; }
.del-menucell { width: 40px; text-align: center; }
.del-rowmenu { background: none; border: none; color: var(--txt-mute); font-size: 18px; line-height: 1; cursor: pointer; padding: 4px 8px; border-radius: 7px; }
.del-rowmenu:hover { background: var(--bg-4); color: var(--txt); }
.pill.has-dot { gap: 6px; }
.pill .st-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; animation: stPulse 1.6s ease-in-out infinite; }
@keyframes stPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.del-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 2px 6px; flex-wrap: wrap; }
.del-foot-l { font-size: 12.5px; color: var(--txt-mute); }
.del-foot-r { display: flex; align-items: center; gap: 8px; }
.del-pp { background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 6px 10px; color: var(--txt); font-size: 12.5px; }
.del-pg { background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--radius-sm); width: 30px; height: 30px; color: var(--txt-dim); cursor: pointer; font-size: 15px; line-height: 1; }
.del-pg:hover { border-color: var(--accent-2); color: var(--txt); }
.del-pgn { min-width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; }

.del-legendbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px 2px; border-top: 1px solid var(--line); margin-top: 8px; flex-wrap: wrap; }
.del-legend { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--txt-dim); }
.del-legend .dl-item { display: inline-flex; align-items: center; gap: 6px; }
.dl-mk { font-size: 9px; }
.dl-mk.err { color: var(--err); } .dl-mk.warn { color: var(--warn); } .dl-mk.ok { color: var(--ok); }
.del-legend-r { display: flex; align-items: center; gap: 16px; font-size: 12px; }
.del-autorefresh { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 600; }
.del-autorefresh .ar-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); }

.det-crumb { margin-bottom: 8px; }
.det-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.det-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.det-title h1 { margin: 0; font-size: 22px; font-weight: 650; }
.det-actions { display: flex; gap: 8px; }
.det-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.det-meta-c { background: var(--bg-2); padding: 13px 16px; }
.dm-k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--txt-mute); margin-bottom: 4px; }
.dm-v { font-size: 14px; font-weight: 600; }
.det-body { display: grid; grid-template-columns: 300px minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 1300px) { .det-body { grid-template-columns: 1fr; } }
.det-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.coal-member { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.coal-member:last-child { margin-bottom: 0; }
.cm-top { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.cm-id { flex: 1; min-width: 0; }
.cm-name { font-weight: 600; font-size: 13px; }
.cm-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cm-lbl { font-size: 9.5px; letter-spacing: .5px; color: var(--txt-mute); }
.cm-val { font-size: 15px; font-weight: 700; }

.delib-reason { font-size: 13px; line-height: 1.7; }
.dr-line { margin-bottom: 4px; }
.dr-agent { color: var(--accent); font-weight: 600; }
.dr-text { color: var(--txt-dim); }
.dr-synth { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--ok); }
.prop-foot { display: flex; gap: 24px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.prop-foot strong { color: var(--accent); font-size: 15px; }

/* agent proposal cards (replaces the cramped proposals table) */
.prop-list { display: flex; flex-direction: column; gap: 10px; }
.prop-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--bg-2); }
.prop-card.lead { border-color: rgba(var(--accent-rgb), 0.4); background: rgba(var(--accent-rgb), 0.05); }
.prop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.prop-agent { display: flex; align-items: center; gap: 8px; min-width: 0; }
.prop-name { font-weight: 600; font-size: 13px; color: var(--txt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prop-tags { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.prop-conf { font-size: 12px; font-weight: 700; color: var(--txt-dim); font-variant-numeric: tabular-nums; }
.prop-rat { margin-top: 8px; font-size: 12.5px; color: var(--txt-dim); line-height: 1.55;
  white-space: pre-wrap; overflow-wrap: anywhere; }

.prop-report-btn { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 6px 11px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-3); color: var(--accent);
  cursor: pointer; transition: background .15s, border-color .15s; }
.prop-report-btn:hover { background: var(--bg-4); border-color: var(--accent); }

/* supporting report — generative UI (markdown + echarts) rendered in the drawer */
.rep-doc { font-size: 13.5px; line-height: 1.65; color: var(--txt-dim); }
.rep-doc .rep-h { color: var(--txt); line-height: 1.3; margin: 18px 0 8px; font-weight: 700; }
.rep-doc h1.rep-h { font-size: 20px; margin-top: 2px; }
.rep-doc h2.rep-h { font-size: 15.5px; padding-top: 12px; border-top: 1px solid var(--line); }
.rep-doc h3.rep-h { font-size: 14px; }
.rep-doc .rep-p { margin: 8px 0; }
.rep-doc strong { color: var(--txt); font-weight: 700; }
.rep-doc em { color: var(--txt-dim); }
.rep-doc code { font-family: var(--mono); font-size: 12px; background: var(--bg-4); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; color: var(--accent); }
.rep-doc a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(var(--accent-rgb), 0.4); }
.rep-doc .rep-quote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--accent); background: rgba(var(--accent-rgb), 0.06); border-radius: 0 8px 8px 0; color: var(--txt); }
.rep-doc .rep-hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.rep-doc .rep-list { margin: 8px 0 8px 4px; padding-left: 18px; }
.rep-doc .rep-list li { margin: 4px 0; }
.rep-doc .rep-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 12.5px; }
.rep-doc .rep-table th { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line-2); color: var(--txt-mute); font-weight: 600; }
.rep-doc .rep-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); color: var(--txt-dim); vertical-align: top; }
.rep-doc .rep-table tr:last-child td { border-bottom: 0; }
.rep-doc .rep-code { background: var(--bg-3); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow: auto; font-size: 12px; color: var(--txt-dim); }
.rep-doc .rep-chart { width: 100%; height: 240px; margin: 10px 0 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 6px; box-sizing: border-box; }

.chk-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.chk-row:last-child { border-bottom: none; }
.chk-ic { width: 24px; height: 24px; border-radius: 7px; display: inline-grid; place-items: center; flex-shrink: 0; }
.chk-ic svg { width: 14px; height: 14px; }
.chk-ic.ok { color: var(--ok); background: rgba(47,224,138,0.14); }
.chk-ic.err { color: var(--err); background: rgba(255,107,107,0.14); }
.chk-name { flex: 1; font-size: 13px; }
.chk-stat { font-size: 11px; font-weight: 700; }
.chk-stat.ok { color: var(--ok); } .chk-stat.err { color: var(--err); }
.appr-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.appr-item:last-child { border-bottom: none; }
.ai-body { flex: 1; min-width: 0; }
.ai-name { font-weight: 600; font-size: 13px; }
/* inline approve/reject on the deliberation detail page */
.appr-role { padding: 4px 0; border-bottom: 1px solid var(--line); }
.appr-role:last-child { border-bottom: none; }
.appr-role .appr-item { border-bottom: none; }
.appr-notes { width: 100%; margin: 4px 0 8px; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 8px; color: var(--txt); padding: 7px 9px; font: inherit; font-size: 12.5px; resize: vertical; }
.appr-actions { display: flex; gap: 8px; margin-bottom: 8px; }
.appr-actions .btn.sm { padding: 6px 14px; font-size: 12.5px; }
.dec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.dec-c .dm-v { font-size: 13px; }
.metric-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.metric-row:last-child { border-bottom: none; }
.metric-lbl { flex: 0 0 210px; font-size: 12.5px; color: var(--txt-dim); }
.metric-bar { flex: 1; height: 8px; background: var(--bg-4); border-radius: 999px; overflow: hidden; }
.metric-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 999px; }
.metric-val { flex: 0 0 42px; text-align: right; font-weight: 700; font-size: 14px; }


/* --- audit ledger table polish (full-width) + icon avatars + drawer detail --- */
.au-list { padding: 4px 6px 8px; }
.au-list table { table-layout: fixed; width: 100%; }
.au-list th, .au-list td { overflow: hidden; text-overflow: ellipsis; }
.au-list th { white-space: nowrap; }
.au-list td { vertical-align: middle; }
.au-list th:nth-child(1), .au-list td:nth-child(1) { width: 152px; }

/* ======================================================================
   AGENTS PAGE (agp-) — rich master-detail directory
   ====================================================================== */
.ph-actions { display: flex; gap: 10px; align-items: center; }
.agp-hbtn { display: inline-flex; align-items: center; gap: 7px; }
.agp-hbtn svg { width: 16px; height: 16px; }
.agp-hbtn span { line-height: 1; }

/* 5-up stat strip on wide screens */
@media (min-width: 1080px) { .agp-strip { grid-template-columns: repeat(5, 1fr); } }

/* tabs row with right-aligned tools */
.agp-tabs .agp-tabbar { align-items: center; }
.agp-tabtools { margin-left: auto; display: flex; gap: 8px; }
.agp-tabtools .btn.sm { padding: 6px 11px; }

/* filter row */
.agp-listcard { padding: 14px; }
/* let the wide agent table scroll horizontally instead of clipping at narrow widths */
.agp-table-wrap { min-width: 0; overflow-x: auto; }
.agp-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.agp-search-wrap { position: relative; flex: 1 1 240px; min-width: 200px; }
.agp-search-ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--txt-mute); pointer-events: none; }
.agp-search-ic svg { width: 15px; height: 15px; }
.agp-search { width: 100%; padding-left: 32px; }
.agp-sel-wrap { flex: 0 0 auto; }
.agp-sel { min-width: 0; }

/* table */
.agp-table th, .agp-table td { vertical-align: middle; }
.agp-table tr.sel td { background: var(--accent-soft); }
.agp-agent { display: flex; gap: 11px; align-items: center; }
.agp-ic { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.agp-ic svg { width: 18px; height: 18px; }
.agp-agent-txt { min-width: 0; }
.agp-agent-name { font-weight: 650; font-size: 13.5px; color: var(--txt); }
.agp-agent-id { font-family: var(--mono); font-size: 11px; color: var(--txt-mute); margin-top: 1px; }
.agp-agent-desc { font-size: 11.5px; color: var(--txt-dim); margin-top: 2px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agp-more { background: var(--accent-soft); border-color: var(--accent-2); color: var(--accent); }
.agp-model { font-family: var(--mono); font-size: 12px; color: var(--txt-dim); }
.agp-trust { display: flex; flex-direction: column; gap: 5px; min-width: 92px; }
.agp-trust-top { display: flex; align-items: baseline; gap: 7px; }
.agp-trust-val { font-weight: 750; font-size: 14px; color: var(--txt); }
.agp-trust-lvl { font-size: 11px; color: var(--txt-mute); }
.agp-bar { display: block; width: 92px; height: 5px; border-radius: 3px; background: var(--bg-4); overflow: hidden; }
.agp-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.agp-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; display: inline-block; }
.agp-when { font-size: 12px; color: var(--txt-dim); }
.agp-when-d { font-size: 11px; color: var(--txt-mute); margin-top: 1px; }
.agp-owner { display: flex; align-items: center; gap: 9px; }
.agp-owner-n { font-size: 12.5px; font-weight: 600; color: var(--txt); }
.agp-owner-r { font-size: 11px; color: var(--txt-mute); }
.agp-dots { background: none; border: none; color: var(--txt-mute); cursor: pointer; font-size: 18px; line-height: 1; padding: 4px 8px; border-radius: 7px; }
.agp-dots:hover { background: var(--bg-3); color: var(--txt); }

/* footer / pagination */
.agp-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 13px; margin-top: 6px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.agp-foot-l { font-size: 12.5px; color: var(--txt-dim); }
.agp-foot-r { display: flex; align-items: center; gap: 12px; }
.agp-pages { display: flex; gap: 4px; align-items: center; }
.agp-page { min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--line-2); background: var(--bg-3); border-radius: 8px; color: var(--txt-dim); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.agp-page:hover:not(:disabled) { border-color: var(--accent-2); color: var(--accent); }
.agp-page.active { background: var(--accent-soft); border-color: var(--accent-2); color: var(--accent); }
.agp-page:disabled { opacity: 0.4; cursor: default; }
.agp-gap { color: var(--txt-mute); padding: 0 2px; }

/* detail panel */
.agp-detail-host { position: sticky; top: 12px; min-width: 0; }
.agp-empty { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 46px 22px; text-align: center; color: var(--txt-mute); font-size: 13px; }
.agp-empty-ic { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--bg-3); color: var(--txt-dim); margin-bottom: 12px; }
.agp-empty-ic svg { width: 24px; height: 24px; }
.agp-detail { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.agp-dh { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.agp-dh-ic { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }
.agp-dh-ic svg { width: 22px; height: 22px; }
.agp-dh-txt { min-width: 0; flex: 1; }
.agp-dh-name { font-size: 16px; font-weight: 750; color: var(--txt); }
.agp-dh-id { font-family: var(--mono); font-size: 11.5px; color: var(--txt-mute); margin-top: 2px; }
.agp-dh-badge { margin-top: 3px; }
.agp-dh-close { background: none; border: none; color: var(--txt-mute); cursor: pointer; padding: 4px; border-radius: 7px; flex-shrink: 0; }
.agp-dh-close svg { width: 16px; height: 16px; }
.agp-dh-close:hover { background: var(--bg-3); color: var(--txt); }
.agp-dh-tabs { padding: 4px 14px 10px; }
.agp-dh-tabs .tab-bar { margin-bottom: 6px; flex-wrap: wrap; }
.agp-sec { padding: 13px 2px; border-top: 1px solid var(--line); }
.agp-sec:first-child { border-top: none; }
.agp-sec h4 { margin: 0 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--txt-mute); font-weight: 700; }
.agp-summary { margin: 0; font-size: 13px; color: var(--txt-dim); line-height: 1.5; }
.agp-persona { white-space: pre-wrap; word-break: break-word; background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.agp-persona.muted { color: var(--txt-mute); font-style: italic; }
.agp-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.agp-metric { min-width: 0; background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; }
.agp-metric .lab { font-size: 10px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--txt-mute); }
.agp-metric .val { font-size: 19px; font-weight: 750; color: var(--txt); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; }
.agp-metric .val.ok { color: var(--accent); }
.agp-metric .sub { font-size: 10.5px; color: var(--txt-dim); margin-top: 2px; }
.agp-kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.agp-kv-item { min-width: 0; }
.agp-kv-l { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--txt-mute); }
.agp-kv-v { font-size: 13px; font-weight: 600; color: var(--txt); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; }
.agp-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.agp-tool { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--txt-dim); background: var(--bg-3); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.agp-tool-ic { color: var(--txt-mute); display: inline-grid; place-items: center; }
.agp-tool-ic svg { width: 15px; height: 15px; }
.agp-tool-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agp-tool-st { font-size: 10.5px; font-weight: 700; color: var(--accent); }
.agp-detail-actions { display: flex; gap: 10px; padding: 14px 2px 2px; border-top: 1px solid var(--line); margin-top: 4px; }
.agp-detail-actions .btn { flex: 1; justify-content: center; }
@media (max-width: 1200px) { .agp-detail-host { position: static; } }

/* ======================================================================
   POLICY CENTER — governance rules as plain-language infographic (gv-)
   ====================================================================== */
.gv-rules { display: grid; gap: 12px; }
.gv-rule { background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px; padding: 14px 15px; }
.gv-rule-head { display: flex; align-items: center; gap: 12px; }
.gv-rule-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.gv-rule-ic svg { width: 19px; height: 19px; }
.gv-rule-tt { flex: 1; min-width: 0; }
.gv-rule-name { font-weight: 700; font-size: 14px; color: var(--txt); }
.gv-rule-sub { font-size: 11.5px; color: var(--txt-mute); margin-top: 2px; font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; }
.gv-rule-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; }
.gv-flow { display: flex; align-items: stretch; gap: 12px; margin-top: 14px; }
.gv-when, .gv-then { flex: 1 1 240px; min-width: 0; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; }
.gv-then { border-color: rgba(var(--accent-rgb), 0.32); background: rgba(var(--accent-rgb), 0.05); }
.gv-flow-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--txt-mute); font-weight: 700; margin-bottom: 9px; }
.gv-cond, .gv-reqs { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.gv-cond-item { display: inline-flex; align-items: center; gap: 7px; }
.gv-join { font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--txt-mute); font-weight: 700; }
.gv-chip { display: inline-flex; align-items: center; font-family: var(--mono); font-size: 12px; padding: 4px 10px; border-radius: 7px;
  background: rgba(255, 206, 92, 0.10); border: 1px solid rgba(255, 206, 92, 0.32); color: var(--warn); }
.gv-always { font-size: 12.5px; color: var(--txt-dim); font-style: italic; }
.gv-arrow { display: grid; place-items: center; font-size: 22px; color: var(--txt-mute); flex: 0 0 auto; align-self: center; }
.gv-req { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 650; padding: 5px 11px; border-radius: 8px;
  background: var(--accent-soft); border: 1px solid var(--accent-2); color: var(--accent); }
.gv-req-ic { display: inline-grid; place-items: center; }
.gv-req-ic svg { width: 14px; height: 14px; }
.gv-req-none { background: var(--bg-4); border-color: var(--line-2); color: var(--txt-dim); font-weight: 500; }
.gv-req-role, .gv-req-trust { background: rgba(74, 209, 255, 0.10); border-color: rgba(74, 209, 255, 0.34); color: var(--info); }
.gv-req-quorum { background: rgba(180, 139, 255, 0.10); border-color: rgba(180, 139, 255, 0.34); color: var(--purple); }
.gv-logic { margin-top: 12px; display: flex; align-items: baseline; gap: 9px; font-size: 11.5px; color: var(--txt-mute); }
.gv-logic-lbl { text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; flex: 0 0 auto; }
.gv-logic code { font-family: var(--mono); color: var(--txt-dim); background: var(--bg); padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); overflow-wrap: anywhere; }
@media (max-width: 760px) { .gv-flow { flex-direction: column; } .gv-arrow { transform: rotate(90deg); } .gv-rule-head { flex-wrap: wrap; } .gv-rule-badges { justify-content: flex-start; } }

/* ======================================================================
   RUNBOOK VISUALIZATION — authored runbook spec as a plain-language
   infographic (rb-), mirroring the Policy Center aesthetic.
   ====================================================================== */
.rb-viz-wrap { display: block; }
.rb-viz { display: grid; gap: 20px; }
.rb-viz-err { padding: 14px 16px; border: 1px solid rgba(255, 107, 107, 0.4); background: rgba(255, 107, 107, 0.08);
  border-radius: 12px; color: var(--err); font-size: 13px; }

/* hero */
.rb-hero { display: flex; gap: 16px; padding: 18px 20px; border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--accent-soft), transparent 70%), var(--bg-3); }
.rb-hero-ic { width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--bg-2)); }
.rb-hero-ic svg { width: 23px; height: 23px; }
.rb-hero-tx { min-width: 0; flex: 1; }
.rb-hero-t { font-size: 19px; font-weight: 800; color: var(--txt); line-height: 1.25; }
.rb-hero-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.rb-hero-sum { margin-top: 11px; font-size: 13.5px; color: var(--txt-dim); line-height: 1.6; }
.rb-task { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; padding: 11px 13px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--line); }
.rb-task-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; font-weight: 800; color: var(--accent); }
.rb-task-tx { font-size: 12.5px; color: var(--txt-dim); line-height: 1.6; font-style: italic; }

/* section wrapper */
.rb-sec { display: grid; gap: 12px; }
.rb-sec-h { display: flex; align-items: baseline; gap: 11px; flex-wrap: wrap; }
.rb-sec-t { font-size: 12px; text-transform: uppercase; letter-spacing: 0.7px; font-weight: 800; color: var(--txt); }
.rb-sec-s { font-size: 12px; color: var(--txt-mute); }

/* pipeline connector → capabilities → agents */
.rb-pipe { display: flex; align-items: stretch; gap: 10px; }
.rb-node { flex: 1 1 0; min-width: 0; background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; }
.rb-node-h { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.rb-node-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0;
  color: var(--accent); background: var(--accent-soft); }
.rb-node-ic svg { width: 15px; height: 15px; }
.rb-node-k { font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; font-weight: 800; color: var(--txt-mute); }
.rb-node-name { font-size: 14px; font-weight: 700; color: var(--txt); font-family: var(--mono); overflow-wrap: anywhere; }
.rb-node-sub { font-size: 11.5px; color: var(--txt-mute); font-family: var(--mono); margin-top: 3px; overflow-wrap: anywhere; }
.rb-pipe-arrow { align-self: center; flex: 0 0 auto; font-size: 20px; color: var(--txt-mute); }
.rb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rb-chip { display: inline-flex; align-items: center; font-family: var(--mono); font-size: 11.5px; padding: 3px 9px; border-radius: 7px;
  background: var(--accent-soft); border: 1px solid var(--accent-2); color: var(--accent); }
.rb-agents { display: flex; flex-direction: column; gap: 7px; }
.rb-agent { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rb-agent-n { font-size: 13px; font-weight: 650; color: var(--txt); }

/* lifecycle flow */
.rb-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 6px 2px; }
.rb-stage { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 999px;
  background: var(--bg-3); border: 1px solid var(--line); }
.rb-stage-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--txt-mute); flex-shrink: 0; }
.rb-stage-n { font-size: 12.5px; font-weight: 700; color: var(--txt); font-family: var(--mono); }
.rb-stage-tag { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 800; padding: 2px 7px; border-radius: 999px; }
.rb-stage-start { border-color: rgba(var(--accent-rgb), 0.4); background: var(--accent-soft); }
.rb-stage-start .rb-stage-dot { background: var(--accent); }
.rb-stage-start .rb-stage-tag { background: var(--accent-soft); color: var(--accent); }
.rb-stage-end { border-color: rgba(74, 209, 255, 0.34); background: rgba(74, 209, 255, 0.08); }
.rb-stage-end .rb-stage-dot { background: var(--info); }
.rb-stage-end .rb-stage-tag { background: rgba(74, 209, 255, 0.14); color: var(--info); }
.rb-stage-gate { border-color: rgba(180, 139, 255, 0.42); background: rgba(180, 139, 255, 0.10); }
.rb-stage-gate .rb-stage-dot { background: #b48bff; }
.rb-stage-gate .rb-stage-tag { background: rgba(180, 139, 255, 0.16); color: #c4a6ff; }
.rb-flow-arrow { font-size: 16px; color: var(--txt-mute); flex: 0 0 auto; }
/* a decision's mutually-exclusive branches, rendered as a fan (no arrows between them) */
.rb-branch { display: inline-flex; flex-direction: column; gap: 6px; padding: 8px 10px;
  border: 1px dashed var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.02); }
.rb-branch-lbl { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.6px; font-weight: 800; color: var(--txt-mute); }
.rb-branch-list { display: flex; flex-direction: column; flex-wrap: wrap; align-content: flex-start; gap: 6px; max-height: 190px; }
.rb-stage-sm { padding: 5px 11px; }
.rb-stage-sm .rb-stage-n { font-size: 11.5px; }

/* inputs */
.rb-inputs { display: flex; flex-wrap: wrap; gap: 10px; }
.rb-input { display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; border-radius: 10px;
  background: var(--bg-3); border: 1px solid var(--line); min-width: 120px; }
.rb-input-l { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; color: var(--txt-mute); }
.rb-input-v { font-size: 16px; font-weight: 800; color: var(--txt); font-family: var(--mono); }

/* decision rules (extends gv-) */
.rb-rule .rb-guard { display: flex; align-items: center; gap: 7px; margin-top: 9px; }
.rb-path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rb-path-item { display: inline-flex; align-items: center; gap: 6px; }
.rb-path-n { font-family: var(--mono); font-size: 12px; padding: 3px 9px; border-radius: 7px; color: var(--txt-dim);
  background: var(--bg); border: 1px solid var(--line); }
.rb-path-arrow { color: var(--txt-mute); font-size: 13px; }
.rb-outcome { display: flex; align-items: center; gap: 8px; margin-top: 11px; font-size: 12.5px; font-weight: 650; color: var(--accent); }
.rb-outcome-ic { display: inline-grid; place-items: center; color: var(--accent); }
.rb-outcome-ic svg { width: 15px; height: 15px; }

/* advanced JSON disclosure */
.rb-adv { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-3); padding: 4px 14px; }
.rb-adv[open] { padding-bottom: 14px; }
.rb-adv-sum { cursor: pointer; padding: 11px 2px; font-size: 12.5px; font-weight: 700; color: var(--txt-dim); list-style: none; }
.rb-adv-sum::-webkit-details-marker { display: none; }
.rb-adv-sum::before { content: "\25B8"; display: inline-block; margin-right: 8px; color: var(--txt-mute); transition: transform .15s ease; }
.rb-adv[open] .rb-adv-sum::before { transform: rotate(90deg); }
.rb-adv-sum:hover { color: var(--txt); }

@media (max-width: 760px) {
  .rb-pipe { flex-direction: column; }
  .rb-pipe-arrow { transform: rotate(90deg); align-self: center; }
}

/* ---- landing: industry coordination use cases (grouped by discipline) ---- */
.lan-disc-wrap { display: flex; flex-direction: column; gap: 34px; }
.lan-disc { border-left: 3px solid var(--uc, var(--accent)); padding-left: 18px; }
.lan-disc-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.lan-disc-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  color: var(--uc, var(--accent)); background: var(--bg-3); background: color-mix(in srgb, var(--uc, var(--accent)) 16%, var(--bg-3)); }
.lan-disc-ic svg { width: 24px; height: 24px; }
.lan-disc-tt { flex: 1; min-width: 0; }
.lan-disc-tt h3 { margin: 0; font-size: 20px; color: var(--txt); }
.lan-disc-tt p { margin: 3px 0 0; font-size: 13px; color: var(--txt-dim); }
.lan-disc-count { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px; white-space: nowrap;
  color: var(--uc, var(--accent)); background: color-mix(in srgb, var(--uc, var(--accent)) 14%, transparent);
  padding: 5px 11px; border-radius: 999px; }
.lan-uc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.lan-uc2 { display: flex; gap: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 15px; transition: border-color .15s ease, transform .15s ease; }
.lan-uc2:hover { border-color: var(--uc, var(--accent)); transform: translateY(-2px); }
.lan-uc2-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0;
  color: var(--uc, var(--accent)); background: var(--bg-3); background: color-mix(in srgb, var(--uc, var(--accent)) 15%, var(--bg-3)); }
.lan-uc2-ic svg { width: 18px; height: 18px; }
.lan-uc2-b { min-width: 0; }
.lan-uc2-b h4 { margin: 0 0 7px; font-size: 13.5px; color: var(--txt); }
.lan-uc2-l { margin: 0 0 6px; font-size: 12px; color: var(--txt-dim); line-height: 1.5; }
.lan-uc2-l:last-child { margin-bottom: 0; }
.lan-uc2-l b { color: var(--uc, var(--accent)); font-weight: 700; }
.lan-uc2-more { margin-top: 9px; background: none; border: none; padding: 0; font-size: 12px; font-weight: 700;
  color: var(--uc, var(--accent)); cursor: pointer; }
.lan-uc2-more:hover { text-decoration: underline; }

/* use-case full-analysis modal */
.uc-modal-ov { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 24px; animation: ucfade .15s ease; }
@keyframes ucfade { from { opacity: 0; } to { opacity: 1; } }
.uc-modal { width: min(780px, 100%); max-height: 86vh; overflow-y: auto; background: var(--bg-2);
  border: 1px solid var(--line); border-top: 3px solid var(--uc, var(--accent)); border-radius: 16px; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6); }
.uc-modal-head { display: flex; align-items: center; gap: 12px; padding: 17px 20px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--bg-2); z-index: 1; }
.uc-modal-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
  color: var(--uc, var(--accent)); background: color-mix(in srgb, var(--uc, var(--accent)) 16%, var(--bg-3)); }
.uc-modal-ic svg { width: 20px; height: 20px; }
.uc-modal-head h3 { margin: 0; flex: 1; font-size: 18px; color: var(--txt); }
.uc-modal-x { background: none; border: none; color: var(--txt-mute); cursor: pointer; padding: 6px; border-radius: 8px; flex-shrink: 0; }
.uc-modal-x svg { width: 18px; height: 18px; }
.uc-modal-x:hover { background: var(--bg-3); color: var(--txt); }
.uc-modal-body { padding: 18px 24px 26px; }
.uc-modal-body h4 { margin: 20px 0 9px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--uc, var(--accent)); font-weight: 800; }
.uc-modal-body h4:first-child { margin-top: 0; }
.uc-modal-body p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.72; color: var(--txt-dim); }
.au-list th:nth-child(4), .au-list td:nth-child(4) { width: 116px; }
.au-list th:nth-child(6), .au-list td:nth-child(6) { width: 104px; }
.au-list th:nth-child(7), .au-list td:nth-child(7) { width: 120px; }
.au-row td { padding-top: 11px; padding-bottom: 11px; }
.au-actor-txt { min-width: 0; }
.au-actor-txt .tiny { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.avatar-c.icon-av { background: var(--bg-4); color: var(--accent); }
.avatar-c.icon-av svg { width: 15px; height: 15px; }
.avatar-c.icon-av.sm svg { width: 13px; height: 13px; }
.ad-title-txt { flex: 1; min-width: 0; }
.drawer-body .ad-title-row { margin-top: -4px; }
.drawer-body .crypto-proof { margin-top: 16px; }
.drawer-body .ad-actions .btn { flex: 1; justify-content: center; }

/* ====================================================================== */
/*  AUDIT CHAIN — deliberation detail: compliant/governed/secure/          */
/*  auditable/explainable full record + cryptographic ledger.             */
/* ====================================================================== */
.audit-chain { margin-top: 22px; }
.asr-note { margin: -2px 0 14px; }
/* assurance pillars */
.asr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 20px; }
.asr { display: flex; align-items: flex-start; gap: 11px; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-3); opacity: 0.75; }
.asr.on { opacity: 1; border-color: rgba(var(--accent-rgb), 0.4); background: linear-gradient(180deg, var(--accent-soft), transparent); }
.asr.bad { border-color: rgba(255, 107, 107, 0.5); background: rgba(255, 107, 107, 0.08); }
.asr-ic { color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.asr-ic svg { width: 18px; height: 18px; display: block; }
.asr.bad .asr-ic { color: var(--err); }
.asr-tx { min-width: 0; flex: 1; }
.asr-t { font-size: 13.5px; font-weight: 700; color: var(--txt); }
.asr-d { font-size: 11px; color: var(--txt-mute); line-height: 1.4; margin-top: 2px; }
.asr-chk { font-size: 15px; font-weight: 800; color: var(--accent); flex-shrink: 0; }
.asr:not(.on) .asr-chk { color: var(--txt-mute); }
.asr.bad .asr-chk { color: var(--err); }

/* per-pillar distinct colour (icon + check + tint when active) */
.asr.asr-blue   .asr-ic, .asr.asr-blue.on   .asr-chk { color: #4ad1ff; }
.asr.asr-amber  .asr-ic, .asr.asr-amber.on  .asr-chk { color: #ffce5c; }
.asr.asr-purple .asr-ic, .asr.asr-purple.on .asr-chk { color: #b48bff; }
.asr.asr-teal   .asr-ic, .asr.asr-teal.on   .asr-chk { color: #2fe0c2; }
.asr.asr-pink   .asr-ic, .asr.asr-pink.on   .asr-chk { color: #ff7eb6; }
.asr.asr-blue.on   { border-color: rgba(74,209,255,.42);  background: linear-gradient(180deg, rgba(74,209,255,.12), transparent); }
.asr.asr-amber.on  { border-color: rgba(255,206,92,.42);  background: linear-gradient(180deg, rgba(255,206,92,.12), transparent); }
.asr.asr-purple.on { border-color: rgba(180,139,255,.42); background: linear-gradient(180deg, rgba(180,139,255,.12), transparent); }
.asr.asr-teal.on   { border-color: rgba(47,224,194,.42);  background: linear-gradient(180deg, rgba(47,224,194,.12), transparent); }
.asr.asr-pink.on   { border-color: rgba(255,126,182,.42); background: linear-gradient(180deg, rgba(255,126,182,.12), transparent); }

.ac-section-t { font-size: 12px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: var(--txt-dim); margin: 18px 0 10px; }

/* governed action chain timeline */
.ac-timeline { position: relative; padding-left: 6px; }
.ac-node { position: relative; padding: 11px 12px 12px 20px; border-left: 2px solid var(--line-2); margin-left: 8px; }
.ac-node::before { content: ""; position: absolute; left: -6px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--txt-mute); box-shadow: 0 0 0 3px var(--bg-2); }
.ac-node.cat-po::before { background: #4ad1ff; } .ac-node.cat-po { border-left-color: rgba(74, 209, 255, 0.4); }
.ac-node.cat-gv::before { background: var(--warn); } .ac-node.cat-gv { border-left-color: rgba(255, 206, 92, 0.4); }
.ac-node.cat-hu::before { background: var(--purple); } .ac-node.cat-hu { border-left-color: rgba(180, 139, 255, 0.4); }
.ac-node.cat-rs::before { background: var(--accent); } .ac-node.cat-rs { border-left-color: rgba(var(--accent-rgb), 0.4); }
.ac-node.cat-ev::before { background: #6fe0c4; }
.ac-node.cat-en::before { background: #ff9e64; }
.ac-node.cat-au::before { background: #8ab4ff; }
.ac-node:last-child { border-left-color: transparent; }
.ac-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.ac-seq { font-size: 11px; font-weight: 800; color: var(--txt-mute); min-width: 18px; }
.ac-cat { font-size: 10px; font-weight: 800; letter-spacing: 0.3px; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: var(--bg-4); color: var(--txt-dim); }
.ac-cat.cat-po { background: rgba(74, 209, 255, 0.14); color: #7fdcff; }
.ac-cat.cat-gv { background: rgba(255, 206, 92, 0.16); color: #ffd97a; }
.ac-cat.cat-hu { background: rgba(180, 139, 255, 0.16); color: #cbb2ff; }
.ac-cat.cat-rs { background: var(--accent-soft); color: var(--accent); }
.ac-cat.cat-ev { background: rgba(111, 224, 196, 0.14); color: #9bead6; }
.ac-cat.cat-en { background: rgba(255, 158, 100, 0.15); color: #ffb98a; }
.ac-cat.cat-au { background: rgba(138, 180, 255, 0.15); color: #aecbff; }
.ac-title { font-size: 13.5px; font-weight: 600; color: var(--txt); flex: 1; min-width: 0; }

/* ==================================================================
   RUNBOOK FLOW — React Flow (@xyflow) themed to the cinematic green UI
   ================================================================== */
.rf-host { position: relative; }
.rf-loading { padding: 48px 20px; text-align: center; color: var(--txt-dim); }
.rf-fallback { padding: 14px 16px; color: var(--warn); }
.rf-canvas {
  height: 60vh; min-height: 420px; margin-bottom: 18px;
  border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden;
  background:
    radial-gradient(900px 500px at 78% -10%, rgba(var(--accent-rgb), 0.08), transparent 60%),
    linear-gradient(180deg, #050b09, #04070a);
}
.rf-canvas .react-flow { background: transparent; }
.rf-canvas .react-flow__attribution { display: none; }

/* Fullscreen popup toggle + expanded canvas */
.rf-fs-btn {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 6; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; font: 600 12px/1 var(--sans); letter-spacing: .2px;
  color: var(--txt); background: rgba(6, 14, 11, .82); backdrop-filter: blur(6px);
  border: 1px solid var(--line-2); border-radius: 8px; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35); transition: border-color .12s, color .12s, background .12s;
}
.rf-fs-btn:hover { color: #fff; border-color: var(--accent-2); background: rgba(10, 22, 17, .92); }
/* When the host goes fullscreen (native API or fallback), fill the viewport */
.rf-host:fullscreen { background: #04070a; padding: 0; }
.rf-host:fullscreen .rf-canvas,
.rf-host.rf-fs-fallback .rf-canvas { height: 100vh; min-height: 100vh; margin: 0; border-radius: 0; border: none; }
.rf-host.rf-fs-fallback {
  position: fixed; inset: 0; z-index: 300; background: #04070a; margin: 0; padding: 0;
}

/* nodes */
.rf-node {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 16px; min-width: 118px;
  border-radius: 12px; background: var(--bg-3); border: 1px solid var(--line-2);
  color: var(--txt); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45); text-align: center;
}
.rf-node-tag { font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--txt-mute); }
.rf-node-name { font-weight: 600; font-size: 13px; }
.rf-node.rf-start { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.6), 0 12px 30px rgba(var(--accent-rgb), 0.22); }
.rf-node.rf-start .rf-node-tag { color: var(--accent); }
.rf-node.rf-gate { border-color: var(--purple); background: linear-gradient(180deg, #17122b, #0d1d17); }
.rf-node.rf-gate .rf-node-tag { color: var(--purple); }
.rf-node.rf-end { border-color: var(--info); }
.rf-node.rf-end .rf-node-tag { color: var(--info); }
.rf-node .react-flow__handle { width: 7px; height: 7px; min-width: 7px; min-height: 7px; background: var(--accent-2); border: none; }

/* edges */
.react-flow__edge.rf-edge .react-flow__edge-path { stroke: var(--line-2); stroke-width: 1.5; }
.react-flow__edge.rf-edge-gate .react-flow__edge-path { stroke: var(--accent); stroke-width: 1.8; }
.react-flow__edge.animated .react-flow__edge-path { stroke-dasharray: 5; }
/* pipeline (connector → capability → agent → lifecycle) edges are muted */
.react-flow__edge.rf-edge-pipe .react-flow__edge-path { stroke: var(--line-2); stroke-width: 1.2; opacity: .55; }
.react-flow__edge.rf-edge-feed .react-flow__edge-path { stroke: var(--info); stroke-width: 1.2; opacity: .35; stroke-dasharray: 3 4; }

/* pipeline node kinds — connector / capability / agent */
.rf-node.rf-connector { border-color: #ffd479; }
.rf-node.rf-connector .rf-node-tag { color: #ffce5c; }
.rf-node.rf-capability { min-width: 92px; padding: 8px 13px; border-color: #f5a97f; }
.rf-node.rf-capability .rf-node-tag { color: #f5a97f; }
.rf-node.rf-capability .rf-node-name { font-size: 11.5px; font-weight: 600; }
.rf-node.rf-agent { min-width: 162px; border-color: #86e0c0; }
.rf-node.rf-agent .rf-node-tag { color: #6fd6b2; }
.rf-node-sub { font-family: var(--mono); font-size: 9.5px; color: var(--txt-mute); margin-top: 1px; letter-spacing: .02em; }
.rf-node-pill { font-family: var(--mono); font-size: 8.5px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-2); color: var(--txt-dim); margin-top: 3px; letter-spacing: .04em; }

/* richer node cards — header row, status dot, governance shield, property pills */
.rf-node { min-width: 152px; max-width: 216px; }
.rf-node-name { line-height: 1.2; word-break: break-word; }
.rf-node-sub { line-height: 1.3; }
.rf-node-head { align-self: stretch; display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 12px; }
.rf-node-status { width: 7px; height: 7px; border-radius: 50%; background: var(--txt-mute); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06); flex-shrink: 0; }
.rf-st-active { background: #25e07e; box-shadow: 0 0 6px rgba(37, 224, 126, 0.7); }
.rf-st-pending { background: #ffce5c; }
.rf-st-suspended, .rf-st-inactive, .rf-st-retired, .rf-st-revoked { background: #ff6b6b; }
.rf-node-shield { font-size: 11px; line-height: 1; color: #ff8a8a; flex-shrink: 0; }
.rf-governed-soft .rf-node-shield { color: #ffce5c; }
.rf-governed-advisory .rf-node-shield { color: #6fd0ff; }
.rf-node.rf-governed { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 107, 107, 0.55); }
.rf-node.rf-governed-soft { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 206, 92, 0.55); }
.rf-node.rf-governed-advisory { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(111, 208, 255, 0.55); }
.rf-node-pills { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 5px; }
.rf-node-pills .rf-node-pill { margin-top: 0; }
.rf-pill-model { border-color: rgba(180, 139, 255, 0.5); color: #c3a6ff; }
.rf-pill-trust { border-color: rgba(37, 224, 126, 0.5); color: #6fe0a8; }
.rf-pill-weight { border-color: rgba(134, 224, 192, 0.5); color: #86e0c0; }
.rf-pill-trigger { border-color: rgba(111, 208, 255, 0.45); color: #6fd0ff; text-transform: none; }
.rf-pill-action { border-color: rgba(245, 169, 127, 0.5); color: #f5a97f; }

/* constraint-fabric nodes — every active constraint, coloured by enforcement */
.rf-node.rf-constraint { min-width: 162px; border-color: #ff9db0; background: linear-gradient(180deg, #241017, #0d1d17); }
.rf-node.rf-constraint.rf-enf-hard { border-color: #ff6b6b; }
.rf-node.rf-constraint.rf-enf-soft { border-color: #ffce5c; background: linear-gradient(180deg, #241d0f, #0d1d17); }
.rf-node.rf-constraint.rf-enf-advisory { border-color: #6fd0ff; background: linear-gradient(180deg, #0f1f24, #0d1d17); }
.rf-node.rf-constraint .rf-node-tag { color: #ff8a8a; }
.rf-node.rf-constraint.rf-enf-soft .rf-node-tag { color: #ffce5c; }
.rf-node.rf-constraint.rf-enf-advisory .rf-node-tag { color: #6fd0ff; }
.rf-node.rf-constraint .rf-node-sub { color: var(--txt-dim); }
.rf-enf-pill { border-color: rgba(255, 138, 138, 0.5) !important; color: #ff9db0 !important; }
.rf-node.rf-constraint.rf-enf-soft .rf-enf-pill { border-color: rgba(255, 206, 92, 0.5) !important; color: #ffce5c !important; }

/* click-to-focus: highlight the selected node + neighbours, dim the rest */
.rf-node.rf-hl { box-shadow: 0 0 0 2px var(--accent), 0 14px 34px rgba(0, 0, 0, 0.55); }
.rf-node.rf-dim { opacity: 0.26; filter: saturate(0.5); }

/* governance tethers — a dotted, animated edge from each governed state to the
   constraint that gates it, coloured by enforcement (red HARD / amber SOFT). */
.react-flow__edge.rf-edge-gov .react-flow__edge-path { stroke: #ff6b6b; stroke-width: 1.4; stroke-dasharray: 4 4; opacity: 0.85; }
.react-flow__edge.rf-edge-gov-soft .react-flow__edge-path { stroke: #ffce5c; }
.react-flow__edge.rf-edge-gov-adv .react-flow__edge-path { stroke: #6fd0ff; }
.react-flow__edge.rf-e-hl .react-flow__edge-path { stroke-width: 2.6; opacity: 1; }
.react-flow__edge.rf-e-dim { opacity: 0.1; }

/* focus / constraint-band toggles on the title panel */
.rf-toggle { margin-top: 10px; font-size: 10px; background: transparent; border: 1px solid var(--line-2); color: var(--txt-dim); border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.rf-toggle:hover { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.5); }
.rf-hint { font-size: 9.5px; color: var(--txt-mute); margin-top: 8px; }
.rf-gov-nm { font-weight: 700; font-size: 11.5px; margin-bottom: 2px; }
.rf-gov-item { cursor: pointer; transition: background .15s, border-color .15s; }
.rf-gov-item.active { border-left-color: var(--accent); box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.4); }
.rf-gov-scroll { max-height: 62vh; overflow-y: auto; }
.rf-gov-sec + .rf-gov-sec { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.rf-gov-sub { font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--txt-mute); margin-bottom: 7px; }


/* controls + minimap */
.react-flow__controls { border-radius: 9px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.react-flow__controls-button { background: var(--bg-3); border-bottom: 1px solid var(--line); color: var(--txt); fill: var(--txt); width: 26px; height: 26px; }
.react-flow__controls-button:hover { background: var(--bg-4); }
.react-flow__controls-button svg { fill: var(--txt-dim); }
.react-flow__minimap { border-radius: 9px; border: 1px solid var(--line); background: var(--bg-2) !important; }

/* overlay panels */
.rf-panel {
  background: rgba(8, 19, 16, 0.86); -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
  border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px;
  color: var(--txt); box-shadow: var(--shadow); max-width: 320px;
}
.rf-title-t { font-weight: 700; font-size: 14px; }
.rf-title-b { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.rf-in-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--txt-mute); }
.rf-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 9px; }
.rf-input { display: flex; flex-direction: column; gap: 1px; background: var(--accent-soft); border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; }
.rf-input-l { font-size: 8.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--txt-mute); }
.rf-input-v { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--txt); }
.rf-badge { font-size: 10px; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--line-2); color: var(--txt-dim); }
.rf-badge.rf-badge-ac { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.5); }
.rf-gov-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--txt-mute); margin-bottom: 9px; }
.rf-gov-x { font-size: 10px; background: transparent; border: 1px solid var(--line-2); color: var(--txt-dim); border-radius: 6px; padding: 3px 9px; cursor: pointer; }
.rf-gov-x:hover { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.5); }
.rf-gov-list { display: grid; gap: 8px; max-height: 42vh; overflow: auto; }
.rf-gov-item { border-left: 2px solid var(--accent); padding: 7px 11px; background: rgba(var(--accent-rgb), 0.06); border-radius: 0 8px 8px 0; }
.rf-gov-item.reject { border-left-color: var(--err); background: rgba(255, 107, 107, 0.07); }
.rf-gov-when { font-family: var(--mono); font-size: 10px; color: var(--txt-dim); }
.rf-gov-then { font-size: 12px; font-weight: 600; margin-top: 1px; }
.rf-gov-out { font-size: 11px; color: var(--txt-mute); margin-top: 1px; }
.rf-legend { display: flex; gap: 16px; flex-wrap: wrap; }
.rf-legend .item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--txt-dim); }
.rf-legend .swatch { width: 12px; height: 12px; border-radius: 4px; }

/* --- LIGHT THEME overrides for the React Flow canvas --- */
html[data-theme="light"] .rf-canvas {
  background:
    radial-gradient(900px 500px at 78% -10%, rgba(var(--accent-rgb), 0.06), transparent 60%),
    linear-gradient(180deg, #ffffff, #f3f7f4);
}
html[data-theme="light"] .rf-fs-btn { color: var(--txt); background: rgba(255, 255, 255, .9); box-shadow: 0 6px 18px rgba(20, 45, 32, .12); }
html[data-theme="light"] .rf-fs-btn:hover { color: var(--accent-2); background: #fff; }
html[data-theme="light"] .rf-host:fullscreen,
html[data-theme="light"] .rf-host.rf-fs-fallback { background: #f3f7f4; }
html[data-theme="light"] .rf-node { box-shadow: 0 8px 22px rgba(20, 45, 32, 0.12); }
html[data-theme="light"] .rf-node.rf-gate { background: linear-gradient(180deg, #f3edff, #eef4f0); }
html[data-theme="light"] .rf-node.rf-constraint { background: linear-gradient(180deg, #fdeef0, #f4f8f5); }
html[data-theme="light"] .rf-node.rf-constraint.rf-enf-soft { background: linear-gradient(180deg, #fdf6e6, #f4f8f5); }
html[data-theme="light"] .rf-node.rf-constraint.rf-enf-advisory { background: linear-gradient(180deg, #e9f6fd, #f4f8f5); }
html[data-theme="light"] .rf-node-pill { background: rgba(20, 45, 32, 0.05); }
html[data-theme="light"] .rf-panel { background: rgba(255, 255, 255, 0.92); box-shadow: 0 12px 34px rgba(20, 45, 32, 0.14); }


.ac-explain { font-size: 12.5px; color: var(--txt-dim); line-height: 1.5; margin: 5px 0 0; }
.ac-meta { font-size: 10.5px; color: var(--txt-mute); margin-top: 5px; word-break: break-all; }
/* per-node identity + hash-chain chips */
.ac-ids { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.ac-id-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--bg-3); font-size: 10.5px; cursor: pointer; max-width: 100%; transition: border-color .12s; }
.ac-id-chip:hover { border-color: var(--accent-2); }
.ac-id-chip.hash { border-color: rgba(138, 180, 255, 0.35); background: rgba(138, 180, 255, 0.08); }
.ac-id-k { color: var(--txt-mute); text-transform: uppercase; letter-spacing: .3px; font-size: 9px; font-weight: 700; }
.ac-id-v { color: var(--txt-dim); }
.ac-id-chip.hash .ac-id-v { color: #aecbff; }
.ac-more { background: none; border: 1px solid var(--line-2); color: var(--txt-dim); font-size: 11px; padding: 3px 9px; border-radius: 7px; cursor: pointer; margin-top: 7px; }
.ac-more:hover { color: var(--accent); border-color: var(--accent-2); }
.ac-raw { margin-top: 8px; max-height: 260px; overflow: auto; font-size: 11px; }

/* cryptographic ledger */
.ac-crypto { margin-top: 4px; }
.ac-crypto-banner { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid rgba(var(--accent-rgb), 0.35); background: var(--accent-soft); border-radius: var(--radius-sm); font-size: 12.5px; color: var(--txt); margin-bottom: 10px; }
.ac-crypto-banner .chk-ic { display: inline-flex; color: var(--accent); }
.ac-crypto-banner .chk-ic svg { width: 16px; height: 16px; }
.ac-ev { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 6px; cursor: pointer; transition: border-color .12s, background .12s; flex-wrap: wrap; }
.ac-ev:hover { border-color: var(--accent-2); background: var(--bg-3); }
.ac-ev-seq { font-size: 11px; color: var(--txt-mute); min-width: 42px; }
.ac-ev-fab { font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.3px; }
.ac-ev-type { font-size: 12.5px; color: var(--txt); flex: 1; min-width: 90px; }
.ac-ev-hash { font-size: 10.5px; color: var(--txt-mute); }
.ac-ev-blk { font-size: 10.5px; color: var(--txt-dim); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; }
.ac-ev-blk.muted { color: var(--txt-mute); }

/* ERP write-back (what was written to the system of record) */
.erp-writes { display: grid; gap: 8px; }
.erp-write { border: 1px solid var(--line-2); border-left: 3px solid var(--accent); border-radius: 9px; padding: 11px 13px; background: var(--bg-3); }
.erp-write.fail { border-left-color: var(--err); }
.erp-w-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.erp-w-target { font-size: 13px; font-weight: 700; color: var(--txt); }
.erp-w-doc { font-size: 12px; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(var(--accent-rgb), 0.3); border-radius: 6px; padding: 2px 8px; }
.erp-w-eff { font-size: 12.5px; color: var(--txt-dim); line-height: 1.5; margin-top: 6px; }
.erp-w-tool { font-size: 10.5px; color: var(--txt-mute); margin-top: 4px; }

/* Constraint ledger — Constraint 1✓ 2✓ 3✗ → BLOCKED (fail-closed) */
.cg-card { margin-top: 10px; }
.cg-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.cg-seq { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--txt-mute); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 7px; }
.cg-title { font-size: 12.5px; font-weight: 700; color: var(--txt); flex: 1 1 auto; min-width: 0; }
.cg-count { margin: 7px 0 8px; }
.cg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cg-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; border-radius: 7px; padding: 3px 9px; border: 1px solid var(--line-2); background: var(--bg-3); color: var(--txt-dim); }
.cg-chip.ok { border-color: rgba(74, 222, 128, .35); background: rgba(74, 222, 128, .08); color: #86efac; }
.cg-chip.bad { border-color: rgba(248, 113, 113, .45); background: rgba(248, 113, 113, .1); color: #fca5a5; font-weight: 600; }
.cg-tick { font-weight: 900; }
.cg-verdict { margin-top: 11px; font-size: 12.5px; line-height: 1.5; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-2); }
.cg-verdict.ok { border-color: rgba(74, 222, 128, .4); background: rgba(74, 222, 128, .07); }
.cg-verdict.warn { border-color: rgba(255, 206, 92, .4); background: rgba(255, 206, 92, .07); }
.cg-verdict.err { border-color: rgba(248, 113, 113, .5); background: rgba(248, 113, 113, .09); }
.cg-verdict .cg-arrow { font-weight: 900; color: var(--txt-mute); }
.cg-verdict.err .cg-arrow { color: #fca5a5; }
.cg-sub { color: var(--txt-dim); }

/* Fineract before → after strip */
.ba-strip { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 12px; }
.ba-col { border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 13px; background: var(--bg-3); }
.ba-col-t { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--txt-mute); margin-bottom: 9px; }
.ba-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ba-chip { display: inline-flex; flex-direction: column; gap: 1px; border: 1px solid var(--line-2); border-radius: 7px; padding: 4px 9px; background: var(--bg-2); }
.ba-k { font-size: 10px; color: var(--txt-mute); text-transform: uppercase; letter-spacing: .04em; }
.ba-v { font-size: 12.5px; font-weight: 700; color: var(--txt); }
.ba-flow { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--txt-mute); }
.ba-arrow { font-size: 18px; font-weight: 900; color: var(--accent); }
.ba-mid { color: var(--txt-mute); }
.ba-after { display: flex; flex-direction: column; gap: 6px; }
.ba-eff { font-size: 12px; color: var(--txt-dim); line-height: 1.5; }
.ba-doc { font-size: 11.5px; color: var(--accent); }
.ba-after.held .ba-eff { color: var(--warn); }
@media (max-width: 720px) { .ba-strip { grid-template-columns: 1fr; } .ba-flow { flex-direction: row; } }

/* Replay Decision */
.ac-replay-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 18px; }
.ac-replay-btn { white-space: nowrap; }
.ac-replay-note { flex: 1 1 240px; min-width: 0; }
.ac-node { transition: background .25s ease, box-shadow .25s ease; }
.ac-node.ac-replay-on { background: rgba(var(--accent-rgb), .1); box-shadow: inset 3px 0 0 var(--accent); border-radius: 8px; }
.ac-node.ac-replay-past { opacity: .55; }

/* Coordination-not-cognition framing */
.coord-note { margin: 4px 0 8px; padding: 7px 10px; border-radius: 7px; border: 1px solid rgba(var(--accent-rgb), .3); background: rgba(var(--accent-rgb), .06); color: var(--txt-dim); line-height: 1.5; }
.coord-note strong { color: var(--accent); }

/* ===================================================================== */
/*  ASSISTANT — grounded, tool-using chat (Markdown + ECharts answers)   */
/* ===================================================================== */
.asst-shell { display: flex; gap: 16px; height: calc(100vh - 132px); min-height: 460px; }
.asst-side { flex: 0 0 246px; display: flex; flex-direction: column; gap: 10px; border-right: 1px solid var(--line); padding-right: 14px; min-width: 0; }
.asst-new { width: 100%; }
.asst-conv-list { flex: 1 1 auto; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.asst-conv { display: flex; align-items: center; gap: 6px; padding: 9px 10px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; color: var(--txt-dim); font-size: 13px; }
.asst-conv:hover { background: var(--bg-2); }
.asst-conv.active { background: var(--accent-soft); border-color: rgba(var(--accent-rgb), 0.3); color: var(--txt); }
.asst-conv-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asst-conv-del { flex: 0 0 auto; opacity: 0; background: none; border: 0; color: var(--txt-mute); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 2px; }
.asst-conv:hover .asst-conv-del, .asst-conv.active .asst-conv-del { opacity: 1; }
.asst-conv-del:hover { color: var(--err); }
.asst-conv-empty { font-size: 12px; color: var(--txt-mute); padding: 8px 4px; }
.asst-main { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.asst-head { margin-bottom: 10px; }
.asst-title { font-size: 22px; font-weight: 700; color: var(--txt); margin: 0; }
.asst-sub { font-size: 13px; color: var(--txt-mute); margin: 4px 0 0; max-width: 760px; line-height: 1.5; }
.asst-log { flex: 1 1 auto; overflow-y: auto; padding: 12px 4px 16px; display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 920px; margin: 0 auto; }
.asst-msg { display: flex; }
.asst-msg.asst-user { justify-content: flex-end; }
.asst-msg.asst-bot { justify-content: flex-start; }
.asst-bubble { max-width: 88%; border-radius: var(--radius); padding: 12px 15px; box-sizing: border-box; }
.asst-user .asst-bubble { background: var(--accent-soft); border: 1px solid rgba(var(--accent-rgb), 0.28); color: var(--txt); white-space: pre-wrap; word-break: break-word; }
.asst-bot .asst-bubble { background: var(--bg-2); border: 1px solid var(--line); }
/* Answer bubbles take a DEFINITE width so a width:100% ECharts chart inside them
   resolves against a real box (a shrink-to-fit flex item collapses charts to ~0). */
.asst-bot .asst-answer.rep-doc { width: 100%; max-width: 100%; min-width: 0; }
.asst-answer.rep-doc .rep-table { display: block; overflow-x: auto; }
.asst-chart { width: 100%; height: 320px; margin: 12px 0 4px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; padding: 8px 6px; box-sizing: border-box; }
.asst-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.asst-tools-lbl { font-size: 11px; color: var(--txt-mute); }
.asst-tool { font-family: var(--mono); font-size: 10.5px; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(var(--accent-rgb), 0.3); border-radius: 6px; padding: 2px 8px; }
.asst-thinking { display: inline-flex; gap: 5px; align-items: center; }
.asst-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: 0.35; animation: asstBlink 1.2s infinite ease-in-out; }
.asst-dot:nth-child(2) { animation-delay: 0.2s; }
.asst-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes asstBlink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.asst-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.asst-chip { font-size: 12px; color: var(--txt-dim); background: var(--bg-3); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; transition: border-color .15s, color .15s; }
.asst-chip:hover { border-color: var(--accent); color: var(--txt); }
.asst-form { display: flex; gap: 10px; align-items: flex-end; padding-top: 12px; border-top: 1px solid var(--line); width: 100%; max-width: 920px; margin: 0 auto; }
.asst-input { flex: 1 1 auto; resize: none; min-height: 44px; max-height: 160px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); color: var(--txt); font-size: 14px; font-family: inherit; line-height: 1.5; padding: 11px 14px; box-sizing: border-box; }
.asst-input:focus { outline: none; border-color: var(--accent); }
.asst-send { flex: 0 0 auto; height: 44px; }
.asst-send:disabled { opacity: 0.5; cursor: default; }



/* ===== COMMERCE tier (S39-UX) ===== */
.ent-row { padding: 10px 0; border-bottom: 1px solid var(--line-1, rgba(255,255,255,.06)); }
.ent-code { font-weight: 600; }
.ent-meta { font-size: 12px; color: var(--txt-3, #8aa); margin: 2px 0 6px; }
.ent-bar-host { max-width: 420px; }
.ent-bar { position: relative; height: 10px; border-radius: 6px; background: var(--bg-3, rgba(255,255,255,.07)); overflow: hidden; }
.ent-bar-fill { height: 100%; border-radius: 6px; background: var(--ok, #25e07e); transition: width .3s; }
.ent-bar-fill.amber { background: var(--warn, #e0b325); }
.ent-bar-fill.red { background: var(--err, #e04e4e); }
.ent-bar-lbl { position: absolute; right: 6px; top: -2px; font-size: 10px; color: var(--txt-2, #cde); }
.usage-row { display: flex; gap: 18px; align-items: center; justify-content: space-between; min-width: 0; }
.usage-spark { flex: 0 0 180px; min-width: 0; }
.warn-txt { color: var(--warn, #e0b325); }
.ok-txt { color: var(--ok, #25e07e); }
.err-txt { color: var(--err, #e04e4e); font-weight: 600; }
.comm-detail { min-width: 0; }
.tbl-wrap { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tbl-wrap::-webkit-scrollbar { display: none; }
.diff-wrap { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.diff-pane { min-width: 0; }
.diff-title { font-size: 12px; color: var(--txt-3, #8aa); margin-bottom: 4px; }
.diff-pane pre { overflow-x: auto; scrollbar-width: none; }
.diff-pane pre::-webkit-scrollbar { display: none; }
.diff-del { background: rgba(224,78,78,.16); }
.diff-add { background: rgba(37,224,126,.14); }
.row-degraded td { background: rgba(224,179,37,.10); }
.chip.off { opacity: .5; text-decoration: line-through; }
.mono.sm, .json.sm { font-size: 11px; }
.explain-body { font-size: 13px; line-height: 1.5; }
.chip.st-paid, .chip.st-issued, .chip.st-invoiced, .chip.st-allow { border-color: var(--ok, #25e07e); }
.chip.st-overdue, .chip.st-deny, .chip.st-uncollectible { border-color: var(--err, #e04e4e); }
.chip.st-draft, .chip.st-observe, .chip.st-pending_approval { border-color: var(--warn, #e0b325); }
