/* #1483 — Admin → AI Roles (web/admin-ai-roles*.js).
   Colours are theme tokens or color-mix over them; no literals (ADL ship
   checklist 5). Badges use an OPAQUE chip on --bg-2, the #850 fix: a
   translucent tint's contrast depends on what sits behind it. Motion: none
   beyond the shared button styles; reduced-motion block below for safety. */
.air-root { display: flex; flex-direction: column; gap: 12px; }
.air-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.air-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.air-badge:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.air-badge-repo-role,
.air-badge-task-type { border-color: color-mix(in srgb, var(--accent) 70%, var(--line)); }
.air-badge-env-seed { border-style: dashed; }
.air-badge-ceiling { border-color: color-mix(in srgb, var(--success) 70%, var(--line)); }
.air-badge-pin-dropped,
.air-badge-unreadable { border-color: var(--danger); color: var(--danger); }
.air-badge-gateway,
.air-badge-floor { border-color: color-mix(in srgb, var(--warning) 70%, var(--line)); }
.air-badge-override { border-color: var(--primary); }

/* The blade sits BESIDE the matrix (ADL-FOCUS-01 panel/blade rung), sticky so it stays
   next to the cell that opened it; on a phone it is a full-screen panel. */
.air-layout { display: flex; align-items: flex-start; gap: 16px; }
.air-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.air-blade-host:empty { display: none; }
.air-blade-host {
  flex: 0 0 340px;
  min-width: 0;
  position: sticky;
  top: 8px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
}

.air-wrap { overflow-x: auto; max-width: 100%; }
.air-matrix { border-collapse: separate; border-spacing: 0; font-size: 12px; color: var(--text); }
.air-caption { caption-side: top; text-align: left; padding: 0 0 6px; color: var(--text-dim); font-size: 12px; }
.air-matrix th,
.air-matrix td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.air-matrix thead th { color: var(--text-dim); font-weight: 600; }
.air-col { min-width: 13em; }
.air-col-name { display: block; font-family: var(--font-mono); color: var(--text); overflow-wrap: anywhere; }
.air-col-edit { margin-top: 4px; padding: 2px 8px; font-size: 11px; }
.air-rowhead {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--bg-3);
  min-width: 8.5em;
  color: var(--text);
  font-weight: 600;
}
.air-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.air-cell.is-cloud { border-left: 3px solid var(--primary); }
.air-cell.is-local { border-left: 3px solid var(--success); }
.air-cell:hover { border-color: var(--accent); }
.air-cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.air-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.air-model { font-family: var(--font-mono); overflow-wrap: anywhere; }
.air-caps,
.air-note { color: var(--text-dim); font-size: 11px; }

.air-blade {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.air-blade-title { margin: 0; font-size: 14px; color: var(--text); }
.air-blade-title:focus { outline: none; }
.air-blade-title:focus-visible { outline: 2px solid var(--accent); }
.air-blade-now { margin: 0; font-size: 11px; color: var(--text-dim); overflow-wrap: anywhere; }
.air-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text); }
.air-field textarea { font-family: var(--font-mono); width: 100%; box-sizing: border-box; }
.air-blade-actions { flex-wrap: wrap; }

.air-tasktypes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.air-tasktypes li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.air-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.air-add input,
.air-add select { min-width: 0; max-width: 100%; }
.air-forecast ul,
.air-compare { margin: 0; padding-left: 18px; flex-basis: 100%; }
.air-forecast-title { font-weight: 600; }
.air-refusal { padding: 8px 10px; border: 1px solid var(--danger); border-radius: var(--radius-sm); }
.air-preview-note { margin: 0; }

@media (max-width: 900px) {
  .air-blade-host {
    position: fixed;
    inset: 0;
    z-index: 60;
    max-height: none;
    padding: 12px;
    background: var(--bg);
  }
}
@media (max-width: 640px) {
  .air-col { min-width: 11em; }
  .air-add input,
  .air-add select,
  .air-add button { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .air-cell,
  .air-blade { transition: none; animation: none; }
}
