/* Entities page (tickets 004, 989): the page head carries the title and the shared time control
   (decoys-reports.css owns `.workspace-page` / `.workspace-head` / `.workspace-head__action`); the
   section head carries the count, the Partial badge and the one Kind pull-down. */

.workspace-head__action .entities-window {
  margin: 0;
}

.entities-kind-select {
  max-width: 100%;
}

/* A user agent is cut to 64 characters in the middle (entity_format.js middleEllipsis()); on a narrow screen
   even that wraps inside its cell instead of pushing the table past the card. The Label link reads as a
   link, not as a coloured chip. */
.entities-table td:nth-child(2) {
  max-width: 28rem;
  overflow-wrap: anywhere;
}

.entities-table td a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 0.15em;
}

.entities-table td a:hover {
  text-decoration-color: currentColor;
}

.entities-table th .info-tip__button {
  margin-left: 0.35rem;
  vertical-align: middle;
}

/* Provenance/planted/credential-kind chips (ticket 005) — the base pill shape mirrors
   investigations.css's `.chip` rule (that file's own base rule doesn't reach here: it's scoped
   to nothing in particular, but this table gets its own copy so entities.css stays self-
   contained and doesn't depend on load order). Provenance colours reuse the console's existing
   observed/self-reported vocabulary (provenanceLabel() in entity_format.js); planted and
   credential-kind reuse the entity dossier's own gold/muted vocabulary. */
.entities-table .chip {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: .2rem .65rem;
  font-size: var(--fs-2xs);
  font-family: var(--font-mono);
  font-weight: 600;
  border: 1px solid var(--border-strong);
  white-space: nowrap;
  margin-left: .35rem;
}

.entities-table .chip--observed {
  color: var(--ink-dim);
  border-color: var(--border-strong);
}

.entities-table .chip--self-reported {
  color: var(--st-4xx);
  border-color: var(--st-4xx);
}

.entities-table .chip--planted {
  color: var(--gold-bright);
  border-color: var(--border-gold);
  background: var(--gold-soft);
}

.entities-table .chip--credential-kind {
  color: var(--ink-muted);
  border-color: var(--border);
}

/* The AI agent's pixel character, twice the icon size, at the side of its address (tickets 913, 958). */
.entity-ai-agent__character {
  display: flex;
  flex: none;
  justify-content: flex-end;
}

/* The address with the character at the side; the address wraps rather than push the page wider. */
.entity-ai-agent__id {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.25rem 0 0.75rem;
}
.entity-ai-agent__address {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink-muted);
}

/* The TL;DR card (ticket 958): the headline and up to three "why you should care" points, first on the
   page. `[data-agent-tldr]` is the hook the LLM summary replaces the text through. */
.agent-tldr {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--card-from), var(--card-to));
  min-width: 0;
}
.agent-tldr__headline {
  margin: 0 0 0.5rem;
  font-size: var(--fs-lg);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.agent-tldr__points {
  margin: 0 0 0.5rem;
  padding-left: 1.2rem;
}
.agent-tldr__points li {
  margin: 0.25rem 0;
  overflow-wrap: anywhere;
}
.agent-tldr__source {
  margin: 0;
}

/* "What it was after": one block per goal family, then the checks to run on your own systems. */
.entity-ai-agent__intent-item {
  overflow-wrap: anywhere;
}
.entity-ai-agent__intent-item .body-note {
  margin: 0.15rem 0 0;
}
.entity-ai-agent__subhead {
  margin: 0.75rem 0 0.25rem;
  font-size: var(--fs-md);
}

/* The two collapsed sections (how the score was built, more detail). */
.entity-ai-agent__disclosure {
  margin: 0.75rem 0;
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
}
.entity-ai-agent__disclosure > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.25rem 0;
}

/* The heading above the generic entity sections on an AI agent's page. */
.entity-activity-title {
  margin: 1.5rem 0 0.5rem;
}

/* Phone width: the tiles stack in one column and nothing pushes the page wider than the screen. */
@media (max-width: 480px) {
  .entity-ai-agent .command-hero-kpis {
    grid-template-columns: minmax(0, 1fr);
  }
  .entity-ai-agent .stat-tile {
    min-width: 0;
  }
  .agent-tldr {
    padding: 0.85rem 0.8rem;
  }
}
