/* AI Discovery (Orpheus > AI Discovery). Plain CSS with its own theme tokens:
   the layout remaps Tailwind text/background classes in light mode with
   !important, so these pages use ai-* classes instead of those utilities. */

:root {
  --ai-t1: #f1f5f9;
  --ai-t2: #cbd5e1;
  --ai-t3: #94a3b8;
  --ai-t4: #64748b;
  --ai-surface: rgba(30, 41, 59, 0.42);
  --ai-head: rgba(15, 23, 42, 0.25);
  --ai-field: rgba(15, 23, 42, 0.55);
  --ai-border: rgba(51, 65, 85, 0.7);
  --ai-border-strong: #334155;
  --ai-divider: rgba(51, 65, 85, 0.45);
  --ai-hover: rgba(51, 65, 85, 0.28);
  --ai-meter: rgba(148, 163, 184, 0.16);
  --ai-meter-fill: rgba(148, 163, 184, 0.62);
  --ai-good: #34d399;
  --ai-warn: #fbbf24;
  --ai-high: #fb923c;
  --ai-bad: #f87171;
  --ai-accent: #22d3ee;
  --ai-pop: #111827;
}
[data-theme="light"] {
  --ai-t1: #0f172a;
  --ai-t2: #334155;
  --ai-t3: #64748b;
  --ai-t4: #94a3b8;
  --ai-surface: #ffffff;
  --ai-head: #f8fafc;
  --ai-field: #ffffff;
  --ai-border: #e2e8f0;
  --ai-border-strong: #cbd5e1;
  --ai-divider: #eef2f6;
  --ai-hover: #f8fafc;
  --ai-meter: #eef2f6;
  --ai-meter-fill: #94a3b8;
  --ai-good: #059669;
  --ai-warn: #d97706;
  --ai-high: #ea580c;
  --ai-bad: #dc2626;
  --ai-accent: #0891b2;
  --ai-pop: #ffffff;
}

/* Text tones */
.ai-t1 { color: var(--ai-t1); }
.ai-t2 { color: var(--ai-t2); }
.ai-t3 { color: var(--ai-t3); }
.ai-t4 { color: var(--ai-t4); }
.ai-good { color: var(--ai-good); }
.ai-bad { color: var(--ai-bad); }
.ai-warn { color: var(--ai-warn); }
.ai-num { font-variant-numeric: tabular-nums; }
.ai-link { color: var(--ai-t1); transition: color 0.12s ease; }
.ai-link:hover { color: var(--ai-accent); }
.ai-link--quiet { color: var(--ai-t3); }
.ai-link--bad { color: var(--ai-bad); }
.ai-label { font-size: 12px; font-weight: 500; color: var(--ai-t3); }
.ai-h2 { font-size: 14px; font-weight: 600; color: var(--ai-t1); }
.ai-h2 small { margin-left: 6px; font-size: 13px; font-weight: 400; color: var(--ai-t4); }

/* Surfaces */
.ai-panel {
  background: var(--ai-surface);
  border: 1px solid var(--ai-border);
  border-radius: 10px;
}
[data-theme="light"] .ai-panel { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }

/* A panel split into equal cells with hairline dividers between them. */
.ai-split {
  display: grid;
  overflow: hidden;
  grid-template-columns: repeat(var(--ai-cols-sm, 1), minmax(0, 1fr));
}
@media (min-width: 640px) { .ai-split { grid-template-columns: repeat(var(--ai-cols-md, 2), minmax(0, 1fr)); } }
@media (min-width: 1280px) { .ai-split { grid-template-columns: repeat(var(--ai-cols-lg, 4), minmax(0, 1fr)); } }
.ai-split > * { box-shadow: -1px 0 0 var(--ai-divider), 0 -1px 0 var(--ai-divider); }
@media (min-width: 1280px) { .ai-span-2-lg { grid-column: span 2 / span 2; } }

/* Summary strip */
.ai-stat { position: relative; display: block; padding: 14px 16px 15px; transition: background-color 0.12s ease; }
.ai-stat__icon {
  --tone: var(--ai-t3);
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--tone);
  background: color-mix(in srgb, var(--tone) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 22%, transparent);
}
.ai-stat__icon--accent { --tone: var(--ai-accent); }
.ai-stat__icon--good { --tone: var(--ai-good); }
.ai-stat__icon--warn { --tone: var(--ai-warn); }
.ai-stat__icon--bad { --tone: var(--ai-bad); }
a.ai-stat:hover .ai-stat__icon { background: color-mix(in srgb, var(--tone) 18%, transparent); }
a.ai-stat:hover { background: var(--ai-hover); }
.ai-stat__label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ai-t3); }
.ai-stat__value {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ai-t1);
  font-variant-numeric: tabular-nums;
}
.ai-stat__sub { margin-top: 4px; font-size: 12px; color: var(--ai-t4); }

/* Status: a dot plus a word, instead of a colored pill. */
.ai-dot { display: inline-block; flex-shrink: 0; width: 6px; height: 6px; border-radius: 9999px; background: var(--ai-t4); }
.ai-dot--good { background: var(--ai-good); }
.ai-dot--warn { background: var(--ai-warn); }
.ai-dot--high { background: var(--ai-high); }
.ai-dot--bad  { background: var(--ai-bad); }
.ai-dot--live { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ai-good) 22%, transparent); }
.ai-status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ai-t2); white-space: nowrap; }

/* Small level tag, used for privilege facts. */
.ai-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
  white-space: nowrap;
  background: rgba(148, 163, 184, 0.12);
  color: var(--ai-t3);
}
.ai-badge--critical { background: rgba(239, 68, 68, 0.13); color: var(--ai-bad); }
.ai-badge--high     { background: rgba(249, 115, 22, 0.12); color: var(--ai-high); }
.ai-badge--medium   { background: rgba(245, 158, 11, 0.12); color: var(--ai-warn); }
.ai-badge--good     { background: rgba(16, 185, 129, 0.12); color: var(--ai-good); }
.ai-badge-col { flex-shrink: 0; width: 58px; padding-top: 1px; }
.ai-badge-col .ai-badge { display: block; text-align: center; }
[data-theme="light"] .ai-badge          { background: #f1f5f9; }
[data-theme="light"] .ai-badge--critical { background: #fef2f2; }
[data-theme="light"] .ai-badge--high     { background: #fff7ed; }
[data-theme="light"] .ai-badge--medium   { background: #fffbeb; }
[data-theme="light"] .ai-badge--good     { background: #ecfdf5; }

/* Buttons: quiet by default, intent color on hover. */
.ai-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--ai-border-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--ai-t2);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.ai-btn:hover { background: var(--ai-hover); color: var(--ai-t1); }
.ai-btn--allow:hover { color: var(--ai-good); border-color: color-mix(in srgb, var(--ai-good) 55%, transparent); background: color-mix(in srgb, var(--ai-good) 9%, transparent); }
.ai-btn--block:hover { color: var(--ai-bad); border-color: color-mix(in srgb, var(--ai-bad) 55%, transparent); background: color-mix(in srgb, var(--ai-bad) 9%, transparent); }
.ai-btn--icon { width: 28px; padding: 0; }
.ai-btn--primary { border-color: transparent; background: #0891b2; color: #ffffff; }
.ai-btn--primary:hover { background: #0e7490; color: #ffffff; }
.ai-form-inline { display: contents; }

/* Segmented Allow / Block control on the item page. */
.ai-seg { display: inline-flex; overflow: hidden; border: 1px solid var(--ai-border-strong); border-radius: 8px; }
/* Disabled buttons swallow hover in some browsers; the wrapper carries the tooltip. */
.ai-enterprise-only { display: inline-flex; cursor: not-allowed; }
.ai-enterprise-only button { pointer-events: none; opacity: 0.45; }
.ai-seg button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  background: transparent;
  color: var(--ai-t2);
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.ai-seg button + button { border-left: 1px solid var(--ai-border-strong); }
.ai-seg button:hover { background: var(--ai-hover); color: var(--ai-t1); }
.ai-seg button[aria-pressed="true"] { cursor: default; }
.ai-seg button[aria-pressed="true"].ai-seg--allow { background: color-mix(in srgb, var(--ai-good) 14%, transparent); color: var(--ai-good); }
.ai-seg button[aria-pressed="true"].ai-seg--block { background: color-mix(in srgb, var(--ai-bad) 14%, transparent); color: var(--ai-bad); }

/* Form fields */
.ai-field, .ai-select {
  height: 32px;
  border: 1px solid var(--ai-border-strong);
  border-radius: 8px;
  background-color: var(--ai-field);
  color: var(--ai-t1);
  font-size: 13px;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.ai-field { padding: 0 10px; }
.ai-field::placeholder { color: var(--ai-t4); }
textarea.ai-field { height: auto; padding: 8px 10px; line-height: 1.45; resize: vertical; }
.ai-select {
  appearance: none;
  padding: 0 30px 0 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394a3b8'%3E%3Cpath d='M5.23 7.21a.75.75 0 0 1 1.06.02L10 11.17l3.71-3.94a.75.75 0 1 1 1.08 1.04l-4.25 4.5a.75.75 0 0 1-1.08 0l-4.25-4.5a.75.75 0 0 1 .02-1.06Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
}
.ai-field:focus, .ai-select:focus { border-color: var(--ai-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ai-accent) 18%, transparent); }
.ai-select--set { border-color: color-mix(in srgb, var(--ai-accent) 60%, transparent); color: var(--ai-t1); }
.ai-search { position: relative; display: inline-flex; align-items: center; }
.ai-search svg { position: absolute; left: 10px; color: var(--ai-t4); pointer-events: none; }
.ai-search .ai-field { padding-left: 32px; }

/* Tabs */
.ai-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--ai-border); }
.ai-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: -1px;
  padding: 10px 0;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--ai-t3);
  transition: color 0.12s ease, border-color 0.12s ease;
}
.ai-tab:hover { color: var(--ai-t1); }
.ai-tab--active, .ai-tab--active:hover { color: var(--ai-t1); border-bottom-color: var(--ai-accent); }
.ai-tab-count {
  padding: 0 6px;
  border-radius: 9999px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--ai-t3);
  font-size: 11px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
}
[data-theme="light"] .ai-tab-count { background: #f1f5f9; }

/* Tables */
.ai-table { width: 100%; border-collapse: collapse; font-size: 13px; color: var(--ai-t2); }
.ai-table th {
  padding: 9px 12px;
  border-bottom: 1px solid var(--ai-border);
  background: var(--ai-head);
  color: var(--ai-t3);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}
.ai-table th.text-right { text-align: right; }
.ai-table td { padding: 12px; border-top: 1px solid var(--ai-divider); vertical-align: middle; }
.ai-table tbody tr:first-child td { border-top: 0; }
.ai-table th:first-child, .ai-table td:first-child { padding-left: 16px; }
.ai-table th:last-child, .ai-table td:last-child { padding-right: 16px; }
.ai-table .ai-sub { margin-top: 2px; font-size: 12px; color: var(--ai-t4); }
.ai-row { transition: background-color 0.12s ease; }
.ai-row:hover { background: var(--ai-hover); }
.ai-row--blocked { box-shadow: inset 2px 0 0 var(--ai-bad); }
.ai-row-detail { background: var(--ai-head); }

/* Row actions appear on hover; rows that still need a decision always show them. */
.ai-row-actions { display: inline-flex; gap: 4px; opacity: 0; transition: opacity 0.12s ease; }
.ai-row:hover .ai-row-actions, .ai-row-actions:focus-within, .ai-row-actions--always { opacity: 1; }
@media (hover: none) { .ai-row-actions { opacity: 1; } }

/* A trailing cell whose value is replaced by actions while the row is hovered or focused. */
.ai-swap { position: relative; flex-shrink: 0; min-width: 96px; text-align: right; }
.ai-swap__rest { transition: opacity 0.12s ease; white-space: nowrap; }
.ai-swap__hover {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  display: inline-flex; gap: 4px; opacity: 0; pointer-events: none; transition: opacity 0.12s ease;
}
.ai-row:hover .ai-swap__hover, .ai-swap:focus-within .ai-swap__hover { opacity: 1; pointer-events: auto; }
.ai-row:hover .ai-swap__rest, .ai-swap:focus-within .ai-swap__rest { opacity: 0; }
@media (hover: none) {
  .ai-swap { display: flex; align-items: center; gap: 10px; }
  .ai-swap__hover { position: static; transform: none; opacity: 1; pointer-events: auto; }
  .ai-swap__rest { opacity: 1 !important; }
}

/* Breakdown meters */
.ai-bar { height: 3px; border-radius: 9999px; background: var(--ai-meter); overflow: hidden; }
.ai-bar > span { display: block; height: 100%; border-radius: 9999px; background: var(--ai-meter-fill); }
.ai-bar--good { height: 4px; }
.ai-bar--good > span { background: var(--ai-good); }

/* Coding agents and Orpheus Verification */
.ai-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 13px 16px 12px;
  border-bottom: 1px solid var(--ai-divider);
}
.ai-agent { padding: 14px 16px 15px; display: flex; flex-direction: column; }
.ai-agent__risks { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.ai-agent__risks li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ai-agent__gap { width: 88px; flex-shrink: 0; text-align: right; font-size: 12px; }
.ai-agent__activity { margin-top: auto; padding-top: 14px; font-size: 12px; color: var(--ai-t3); }
.ai-pitch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 14px 16px;
  border-top: 1px solid var(--ai-divider);
  background: color-mix(in srgb, var(--ai-accent) 6%, transparent);
}
.ai-pitch > .min-w-0 { flex: 1 1 28rem; }
.ai-pitch--standalone { border: 1px solid color-mix(in srgb, var(--ai-accent) 30%, var(--ai-border)); border-radius: 10px; }

/* Orpheus Discovery governance pages are view-only; the server refuses the
   writes too (OrpheusEditionGate), this just stops offering them. */
[data-view-only] form:not([method="get" i]) :is(button, input[type="submit"], input[type="checkbox"], select),
[data-view-only] a[data-turbo-method]:not([data-turbo-method="get" i]),
[data-view-only] a[href$="/new"],
[data-view-only] a[href*="/edit"] { pointer-events: none; opacity: 0.45; }
.ai-risk { display: flex; gap: 12px; }
.ai-risk + .ai-risk { margin-top: 14px; }
.ai-risk .ai-dot { margin-top: 6px; }
.ai-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ai-figures dt { font-size: 12px; color: var(--ai-t4); }
.ai-figures dd { margin-top: 2px; font-size: 18px; font-weight: 600; color: var(--ai-t1); font-variant-numeric: tabular-nums; }
.ai-figures dd.ai-bad { color: var(--ai-bad); }
.ai-feed li { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 12.5px; }
.ai-feed li + li { border-top: 1px solid var(--ai-divider); }

/* Share donuts (Tools tab). Categorical colors, not the risk tones. */
.ai-share--0 { --ai-share: #22d3ee; }
.ai-share--1 { --ai-share: #a78bfa; }
.ai-share--2 { --ai-share: #a3e635; }
.ai-share--3 { --ai-share: #f472b6; }
.ai-share--4 { --ai-share: #60a5fa; }
.ai-share--5 { --ai-share: #2dd4bf; }
.ai-share--6 { --ai-share: #facc15; }
.ai-share--other { --ai-share: rgba(148, 163, 184, 0.4); }
[data-theme="light"] .ai-share--0 { --ai-share: #0891b2; }
[data-theme="light"] .ai-share--1 { --ai-share: #7c3aed; }
[data-theme="light"] .ai-share--2 { --ai-share: #65a30d; }
[data-theme="light"] .ai-share--3 { --ai-share: #db2777; }
[data-theme="light"] .ai-share--4 { --ai-share: #2563eb; }
[data-theme="light"] .ai-share--5 { --ai-share: #0d9488; }
[data-theme="light"] .ai-share--6 { --ai-share: #ca8a04; }
[data-theme="light"] .ai-share--other { --ai-share: #cbd5e1; }
.ai-donut-wrap { position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.ai-donut { display: block; width: 100%; height: 100%; }
.ai-donut__slice { fill: none; stroke: var(--ai-share); stroke-width: 6; transition: stroke-width 0.12s ease; }
.ai-donut__arc { outline: none; transition: opacity 0.12s ease; }
.ai-donut__arc.is-active .ai-donut__slice { stroke-width: 7.5; }
[data-active] .ai-donut__arc:not(.is-active) { opacity: 0.3; }
[data-active] .ai-legend__item:not(.is-active) { opacity: 0.45; }
.ai-legend__item.is-active { background: var(--ai-hover); }
.ai-donut__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.ai-donut__value { font-size: 20px; font-weight: 600; line-height: 1.1; color: var(--ai-t1); }
.ai-donut__caption { font-size: 11px; color: var(--ai-t4); }
.ai-legend { display: flex; flex-direction: column; gap: 1px; }
.ai-legend__item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 -6px;
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 13px;
  transition: background-color 0.12s ease;
}
a.ai-legend__item:hover { background: var(--ai-hover); }
a.ai-legend__item:hover .ai-t2 { color: var(--ai-accent); }
.ai-swatch { width: 8px; height: 8px; flex-shrink: 0; border-radius: 2px; background: var(--ai-share); }
.ai-share-tip {
  position: fixed;
  z-index: 60;
  width: 256px;
  padding: 12px 14px;
  border: 1px solid var(--ai-border-strong);
  border-radius: 10px;
  background: var(--ai-pop);
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.5);
  color: var(--ai-t3);
  font-size: 12px;
  line-height: 1.4;
  pointer-events: none;
}
[data-theme="light"] .ai-share-tip { box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14); }
.ai-share-tip[hidden] { display: none; }
.ai-share-tip__head { display: flex; align-items: center; gap: 8px; }
.ai-share-tip__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--ai-t1); }
.ai-share-tip__rank { margin-left: auto; padding-left: 6px; color: var(--ai-t4); }
.ai-share-tip__sub { margin-top: 2px; color: var(--ai-t4); }
.ai-share-tip__stats { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 10px; }
.ai-share-tip__value { font-size: 20px; font-weight: 600; line-height: 1; color: var(--ai-t1); }
.ai-share-tip__bar { margin-top: 8px; height: 4px; }
.ai-share-tip__bar > span { background: var(--ai-share); }
.ai-share-tip__list { margin-top: 8px; }
.ai-share-tip__list li { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; color: var(--ai-t2); }
.ai-share-tip__more { margin-top: 2px; color: var(--ai-t4); }
.ai-share-tip__hint { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--ai-divider); color: var(--ai-t4); }

/* MCP server chips */
.ai-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border: 1px solid var(--ai-border);
  border-radius: 9999px;
  color: var(--ai-t2);
  font-size: 12px;
  line-height: 1.5;
}
.ai-chip__count { color: var(--ai-t4); font-variant-numeric: tabular-nums; }
a.ai-chip { transition: border-color .15s, color .15s; }
a.ai-chip:hover { border-color: var(--ai-border-strong); color: var(--ai-t1); }
.ai-chip--bad { border-color: color-mix(in srgb, var(--ai-bad) 45%, transparent); color: var(--ai-bad); }

/* Capability tags */
.ai-caps { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.ai-cap {
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  border: 1px solid var(--ai-border);
  border-radius: 4px;
  color: var(--ai-t2);
  font-size: 11.5px;
  line-height: 18px;
  white-space: nowrap;
}
.ai-cap--bad {
  border-color: color-mix(in srgb, var(--ai-bad) 45%, transparent);
  color: var(--ai-bad);
}
a.ai-cap:hover { border-color: var(--ai-border-strong); color: var(--ai-t1); }
a.ai-cap--bad:hover { border-color: var(--ai-bad); color: var(--ai-bad); }
.ai-cap--active { border-color: var(--ai-accent); color: var(--ai-t1); }
.ai-cap__n { margin-left: 3px; color: var(--ai-t4); font-variant-numeric: tabular-nums; }

/* Fleet access row under the summary strip */
.ai-access { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 6px; padding: 10px 16px; border-top: 1px solid var(--ai-divider); }

/* Callouts (rollout help, tamper warning) */
.ai-callout { border: 1px solid var(--ai-border); border-radius: 10px; background: var(--ai-surface); color: var(--ai-t2); }
.ai-callout--danger {
  border-color: color-mix(in srgb, var(--ai-bad) 40%, transparent);
  background: color-mix(in srgb, var(--ai-bad) 7%, transparent);
  color: var(--ai-t2);
}

/* Definition grid on the endpoint page */
.ai-dl dt { font-size: 12px; color: var(--ai-t4); }
.ai-dl dd { margin-top: 2px; font-size: 13px; color: var(--ai-t2); }
.ai-dl dd.ai-bad { color: var(--ai-bad); }
.ai-dl dd.ai-warn { color: var(--ai-warn); }

/* Asset icon tile. Colors come from inline custom properties set by
   Orpheus::AiDiscoveryHelper#ai_asset_icon (dark values, then *-l for light). */
.ai-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 22%;
  color: var(--ai-fg);
  background: var(--ai-bg);
  box-shadow: inset 0 0 0 1px var(--ai-bd);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  user-select: none;
}
.ai-icon svg { display: block; }
[data-theme="light"] .ai-icon {
  color: var(--ai-fg-l);
  background: var(--ai-bg-l);
  box-shadow: inset 0 0 0 1px var(--ai-bd-l);
}
