/* GaiS v1.3 — agent identity components
 * Adds portraits + identity to agent cards and workflow
 * heroes without changing the existing colour bindings in styles.css, which
 * remain the single source of the per-agent --candidate-colour palette.
 */

.agent-id {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  margin: 0 0 8px;
  color: var(--ink);
}

.agent-id__face {
  width: 52px;
  height: 69px;
  flex: 0 0 auto;
  object-fit: cover;
  object-position: 50% 0;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--candidate-colour) 55%, var(--line));
  background: color-mix(in srgb, var(--candidate-colour) 22%, #fff);
  box-shadow: 0 6px 14px rgba(36, 26, 12, .10);
}

.agent-id__meta { display: grid; gap: 1px; min-width: 0; }
.agent-id__meta strong {
  font-family: var(--serif);
  font-size: 1.16rem;
  line-height: 1.1;
  letter-spacing: -.01em;
}
.agent-id__role { font-size: .84rem; color: var(--ink-soft); }
.agent-id__colour {
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.agent-id__preview {
  margin-left: auto;
  padding: 6px 2px 4px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--candidate-colour);
  white-space: nowrap;
}
.agent-id__preview:hover { color: var(--ink); border-bottom-color: var(--ink); }
.agent-id__preview:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Workflow hero: replace the 17px colour dot with the agent's own portrait. */
.agent-hero-identity { grid-template-columns: 96px minmax(0, 1fr); }
.agent-portrait {
  width: 96px;
  height: 128px;
  object-fit: cover;
  object-position: 50% 0;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--candidate-colour) 55%, var(--line));
  background: color-mix(in srgb, var(--candidate-colour) 26%, #fff);
  box-shadow: 0 10px 24px rgba(36, 26, 12, .12);
}

@media (max-width: 560px) {
  .agent-hero-identity { grid-template-columns: 76px minmax(0, 1fr); }
  .agent-portrait { width: 76px; height: 101px; border-radius: 13px; }
  .agent-id__face { width: 46px; height: 61px; }
  .agent-id__preview { margin-left: 0; }
}

@media print {
  .agent-id__preview { border-bottom: 0; }
}
