/* ============================================================
   Ruligent dashboard — dark theme
   ============================================================ */

:root {
  --bg: #0b0e14;            /* page plane */
  --surface: #11161f;       /* cards */
  --surface-2: #171e2a;     /* nested / hover */
  --border: #222b3a;
  --border-soft: #1a2230;
  --text: #e8ecf3;
  --text-dim: #9aa5b8;
  --muted: #7f8ba2;
  --accent: #f59e0b;        /* amber */
  --accent-soft: rgba(245, 158, 11, 0.14);
  --accent-text: #ffb52e;

  --green: #3fce7c;
  --red: #f0655f;
  --amber: #f5a623;
  --darkred: #e05252;
  --purple: #a78bfa;
  --blue: #5aa2f7;
  --gray: #9aa5b8;

  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, .btn:focus-visible, .tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code, pre { font-family: var(--mono); }

/* ---------- layout ---------- */

.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 220px;
  flex: 0 0 220px;
  background: #0d1119;
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.logo {
  font-size: 17px;
  font-weight: 700;
  padding: 18px 18px 14px;
  letter-spacing: 0.2px;
  border-bottom: 1px solid var(--border-soft);
}
.logo .torii { color: var(--accent); margin-right: 6px; }
.current-org {
  display: block;
  margin: 10px 8px 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  min-width: 0;
}
.current-org:hover, .current-org:focus-visible { border-color: var(--accent); text-decoration: none; }
.current-org-label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.current-org strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.current-org-meta { display: block; color: var(--text-dim); font-size: 11px; text-transform: capitalize; }
.sidebar nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin: 2px 0;
  border-radius: 8px;
  color: var(--text-dim);
  font-weight: 500;
  cursor: pointer;
}
.nav-item .glyph { width: 18px; text-align: center; opacity: 0.85; }
.nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--accent-soft); color: var(--accent-text); }
.sidebar-footer {
  border-top: 1px solid var(--border-soft);
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--text-dim);
}
.sidebar-footer .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 8px; }

.main {
  flex: 1;
  min-width: 0;
  padding: 26px 30px 60px;
  max-width: 1200px;
}
.page-title { font-size: 21px; font-weight: 700; margin: 0 0 4px; }
.page-sub { color: var(--text-dim); margin: 0 0 22px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- cards / sections ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
}
.card h3 { margin: 0 0 12px; font-size: 15px; font-weight: 650; }
.card .card-sub { color: var(--text-dim); font-size: 13px; margin: -8px 0 14px; }

.grid { display: grid; gap: 14px; margin-bottom: 18px; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.grid.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 1024px) {
  .grid.two { grid-template-columns: 1fr; }
  .main { padding: 20px 16px 50px; }
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.stat .label { color: var(--text-dim); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.stat .value { font-size: 24px; font-weight: 700; margin-top: 4px; }
.stat .value small { font-size: 13px; color: var(--muted); font-weight: 500; }

/* ---------- banner ---------- */

.banner-danger {
  background: rgba(224, 82, 82, 0.12);
  border: 1px solid rgba(224, 82, 82, 0.45);
  color: #ff9d99;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
}

/* ---------- badges ---------- */

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge.allow            { color: var(--green);  background: rgba(63, 206, 124, 0.12);  border-color: rgba(63, 206, 124, 0.3); }
.badge.block            { color: var(--red);    background: rgba(240, 101, 95, 0.12);  border-color: rgba(240, 101, 95, 0.3); }
.badge.require_approval { color: var(--amber);  background: rgba(245, 166, 35, 0.12);  border-color: rgba(245, 166, 35, 0.3); }
.badge.killed           { color: #ff8f8f;       background: rgba(150, 30, 30, 0.35);   border-color: rgba(224, 82, 82, 0.5); }
.badge.rate_limited     { color: var(--purple); background: rgba(167, 139, 250, 0.12); border-color: rgba(167, 139, 250, 0.3); }
.badge.spend_limited    { color: var(--blue);   background: rgba(90, 162, 247, 0.12);  border-color: rgba(90, 162, 247, 0.3); }

.badge.risk-low      { color: var(--gray);  background: rgba(154, 165, 184, 0.1);  border-color: rgba(154, 165, 184, 0.28); }
.badge.risk-medium   { color: var(--blue);  background: rgba(90, 162, 247, 0.12);  border-color: rgba(90, 162, 247, 0.3); }
.badge.risk-high     { color: var(--amber); background: rgba(245, 166, 35, 0.12);  border-color: rgba(245, 166, 35, 0.3); }
.badge.risk-critical { color: var(--red);   background: rgba(240, 101, 95, 0.12);  border-color: rgba(240, 101, 95, 0.3); }

.badge.neutral { color: var(--text-dim); background: var(--surface-2); border-color: var(--border); }
.badge.on  { color: var(--green); background: rgba(63, 206, 124, 0.12); border-color: rgba(63, 206, 124, 0.3); }
.badge.off { color: var(--muted); background: var(--surface-2); border-color: var(--border); }

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left;
  color: var(--muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }
.approval-row { cursor: pointer; }
.approval-row:hover td { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td .dim, .dim { color: var(--text-dim); }
td .mono, .mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }

/* ---------- buttons & forms ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.btn:hover { background: #1d2634; border-color: #2e3a4e; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #14100a; }
.btn.primary:hover { background: #ffb02e; }
.btn.danger { background: rgba(224, 82, 82, 0.14); border-color: rgba(224, 82, 82, 0.5); color: #ff9d99; }
.btn.danger:hover { background: rgba(224, 82, 82, 0.25); }
.btn.success { background: rgba(63, 206, 124, 0.14); border-color: rgba(63, 206, 124, 0.45); color: var(--green); }
.btn.success:hover { background: rgba(63, 206, 124, 0.25); }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn.ghost { background: transparent; }
.btn.oauth { width: 100%; justify-content: center; background: var(--surface-2); }
.btn.oauth + .btn.oauth { margin-top: 8px; }

/* "— or —" divider between OAuth buttons and the email/password form */
.divider { display: flex; align-items: center; text-align: center; color: var(--muted); font-size: 11px; margin: 16px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.divider span { padding: 0 12px; text-transform: uppercase; letter-spacing: 0.06em; }

/* Amber pill flagging task kinds that always route through human approval */
.external-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--amber);
  background: rgba(245, 166, 35, 0.12);
  border: 1px solid rgba(245, 166, 35, 0.3);
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 6px;
  white-space: nowrap;
}

label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-dim); margin-bottom: 4px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"], select, textarea {
  width: 100%;
  background: #0d1119;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 13.5px;
  font-family: var(--font);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
textarea { resize: vertical; min-height: 60px; }
.field { margin-bottom: 12px; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row .field { flex: 1; min-width: 140px; }
.checkbox-field { display: flex; align-items: center; gap: 8px; }
.checkbox-field input { width: auto; }
.checkbox-field label { margin: 0; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { margin-bottom: 0; }

/* ---------- filter bar / tabs ---------- */

.filter-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.filter-bar input, .filter-bar select { width: auto; min-width: 130px; }

.tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.tab {
  padding: 8px 14px;
  cursor: pointer;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 13px;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  font-family: var(--font);
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent-text); border-bottom-color: var(--accent); }
.tab .count { color: var(--muted); font-weight: 500; margin-left: 4px; }

/* ---------- decision breakdown ---------- */

.decision-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.decision-cell {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 10px 12px;
}
.decision-cell .n { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- usage bars ---------- */

.usage-row { margin-bottom: 14px; }
.usage-row .usage-label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.usage-bar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--border-soft); }
.usage-bar .fill { height: 100%; background: var(--accent); border-radius: 999px; min-width: 2px; }
.usage-bar .fill.warn { background: var(--red); }

/* ---------- plans ---------- */

.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
}
.plan-card.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan-card .plan-name { font-weight: 700; font-size: 15px; }
.plan-card .plan-price { font-size: 24px; font-weight: 750; margin: 6px 0 10px; }
.plan-card .plan-price small { font-size: 12px; color: var(--muted); font-weight: 500; }
.plan-card ul { list-style: none; margin: 0 0 14px; padding: 0; flex: 1; color: var(--text-dim); font-size: 13px; }
.plan-card li { padding: 3px 0; }
.plan-card li::before { content: "✓ "; color: var(--green); }
.plan-card li.no::before { content: "✕ "; color: var(--muted); }

/* ---------- kill switch ---------- */

.kill-hero {
  text-align: center;
  padding: 34px 20px;
}
.kill-hero .kill-state { font-size: 22px; font-weight: 750; margin-bottom: 6px; }
.kill-hero .kill-state.armed { color: #ff8f8f; }
.kill-hero .kill-state.safe { color: var(--green); }
.kill-hero p { color: var(--text-dim); max-width: 480px; margin: 0 auto 20px; }
.btn.kill-big { font-size: 15px; padding: 12px 26px; border-radius: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 6px 5px 12px;
  font-size: 13px;
  font-family: var(--mono);
}
.chip button {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font);
  padding: 2px 8px;
  border-radius: 999px;
}
.chip button:hover { background: rgba(224, 82, 82, 0.2); color: #ff9d99; }

/* ---------- code / secrets ---------- */

pre.code {
  background: #0d1119;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.55;
  color: #cdd6e4;
  margin: 0 0 8px;
}
.secret-row {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #0d1119;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 14px 0;
}
.secret-row code { flex: 1; word-break: break-all; font-size: 13px; color: var(--accent-text); }

/* ---------- auth ---------- */

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
}
.auth-logo { text-align: center; font-size: 22px; font-weight: 750; margin-bottom: 4px; }
.auth-logo .torii { color: var(--accent); }
.auth-tag { text-align: center; color: var(--text-dim); font-size: 13px; margin-bottom: 22px; }
.auth-switch { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-dim); }
.auth-switch a { cursor: pointer; }
.auth-assist { display: flex; justify-content: flex-end; margin: -4px 0 12px; font-size: 12.5px; }
.form-error { color: var(--red); font-size: 13px; margin: 10px 0 0; min-height: 1em; }
.form-message { font-size: 13px; margin: 10px 0 0; min-height: 1em; }
.form-message.success { color: var(--green); }

/* ---------- toasts ---------- */

#toasts {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
}
.toast {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--muted);
  color: var(--text);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 13.5px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  animation: toast-in 0.18s ease-out;
}
.toast.error { border-left-color: var(--red); }
.toast.success { border-left-color: var(--green); }
.toast.info { border-left-color: var(--blue); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 11, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  padding: 20px;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.modal h3 { margin: 0 0 8px; font-size: 17px; }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.modal.detail-modal { max-width: 780px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; }
.modal-head, .detail-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-head { margin-bottom: 16px; }
.modal-head h3, .detail-section-head h4 { margin: 0; }
.detail-summary { display: flex; gap: 8px; margin-bottom: 16px; }
.detail-modal h4 { margin: 18px 0 8px; font-size: 13px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--border-soft); border: 1px solid var(--border-soft); border-radius: 8px; overflow: hidden; }
.detail-item { min-width: 0; padding: 9px 11px; background: var(--surface-2); }
.detail-item dt { color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.detail-item dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.detail-item dd.mono { font-family: var(--mono); font-size: 12px; }
.detail-block { margin-top: 12px; }
.detail-block > span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.detail-block pre { margin: 0; padding: 10px 12px; max-height: 220px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: #0d1119; border: 1px solid var(--border); border-radius: 8px; color: var(--text-dim); font-size: 12px; }
.detail-actions { margin-top: 8px; }
.detail-actions .modal-actions { justify-content: flex-start; margin-top: 10px; }

/* ---------- misc ---------- */

.loading { color: var(--text-dim); padding: 30px 0; text-align: center; }
.loading::before { content: "⏳ "; }
.empty {
  color: var(--text-dim);
  text-align: center;
  padding: 28px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  font-size: 13.5px;
}
.section-title { font-size: 15px; font-weight: 650; margin: 26px 0 10px; }
.spacer { height: 8px; }
.hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; flex: none; height: auto; position: static; }
  .current-org { margin: 10px 12px 0; }
  .sidebar nav { display: flex; flex-wrap: wrap; }
  .sidebar-footer { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .main { padding-bottom: max(50px, env(safe-area-inset-bottom)); }
  .auth-wrap {
    padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  }
  .nav-item, .tab, .btn.sm { min-height: 44px; }
  input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"], select, textarea { font-size: 16px; }
  .detail-grid { grid-template-columns: 1fr; }
  .modal-backdrop {
    padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    align-items: flex-start;
  }
  .modal.detail-modal { max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); padding: 18px; }
  .detail-section-head { flex-direction: column; }
  .detail-actions .modal-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .detail-actions .btn { min-height: 44px; justify-content: center; }
}

/* ---------- onboarding checklist ---------- */

.onboarding { border-color: var(--accent); }
.onboard-list { list-style: none; padding: 0; margin: 0; }
.onboard-step {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border-soft);
  color: var(--text-dim);
}
.onboard-step:last-child { border-bottom: none; }
.onboard-step.done { color: var(--muted); text-decoration: line-through; }
.onboard-step.done .onboard-check { color: var(--green); text-decoration: none; }
.onboard-step .onboard-check { width: 18px; text-align: center; color: var(--muted); font-weight: 700; }
.onboard-step .btn { margin-left: auto; }

/* ---------- policy simulator ---------- */

.sim-outcome { padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; }

/* ---------- venture mode: projects ---------- */

.banner-warn {
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.4);
  color: #ffd48a;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
}

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: block;
  color: var(--text);
}
.project-card:hover { border-color: var(--accent); text-decoration: none; }
.project-card .name { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.project-card .meta { color: var(--text-dim); font-size: 12.5px; margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.suggest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-soft);
}
.suggest-row:last-child { border-bottom: none; }

.kind-row { padding: 9px 0; border-bottom: 1px solid var(--border-soft); }
.kind-row:last-of-type { border-bottom: none; }

.risk-list { list-style: none; margin: 0; padding: 0; }
.risk-list li { padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
.risk-list li:last-child { border-bottom: none; }

.level-pill {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.level-pill.green { color: var(--green); background: rgba(63, 206, 124, 0.12);  border-color: rgba(63, 206, 124, 0.3); }
.level-pill.amber { color: var(--amber); background: rgba(245, 166, 35, 0.12);  border-color: rgba(245, 166, 35, 0.3); }
.level-pill.blue  { color: var(--blue);  background: rgba(90, 162, 247, 0.12);  border-color: rgba(90, 162, 247, 0.3); }
.level-pill.red   { color: var(--red);   background: rgba(240, 101, 95, 0.12);  border-color: rgba(240, 101, 95, 0.3); }

.launch-hero { text-align: center; padding: 18px 16px 22px; }
td.launch-cat {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--muted);
  padding-top: 14px;
}

.signal-list { list-style: none; margin: 0 0 10px; padding: 0; columns: 2; }
.signal-list li { padding: 3px 0; break-inside: avoid; }

.autonomy-legend { list-style: none; margin: 4px 0 14px; padding: 10px 12px; color: var(--text-dim); font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 8px; }
.autonomy-legend li { padding: 2px 0; }

/* ---------- workflows / team roles ---------- */

/* Small pill marking a task as part of a workflow chain (chain #1, #2, …). */
.chain-pill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  font-family: var(--mono);
  letter-spacing: 0.02em;
  white-space: nowrap;
  vertical-align: 1px;
  color: var(--purple);
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.3);
}

/* Org role pill: admins get the accent, members reuse .badge.neutral. */
.badge.role-admin {
  color: var(--accent-text);
  background: var(--accent-soft);
  border-color: rgba(245, 158, 11, 0.4);
}

/* Inline "admin only" marker where a member would otherwise see an action button. */
.admin-only {
  font-size: 12px;
  font-style: italic;
  cursor: help;
  white-space: nowrap;
}
