/* The incident screens (B2; IncidentDetailComponent, IncidentPeopleComponent and IncidentSheetComponent in app/components, and the views under app/views/incidents; docs/data_model/13-operational-domains.md
   section 8, "As built (B2)"). Built from the shared page parts (41-page-structure.css, 42-page-section.css, 43-entry-list.css, 45-sheet.css), the case screens' own rules (53-case-pages.css, 68-case-page-layout.css:
   the two labelled lists of a page, the source line), the form fields, the panel, the data table, the badge and the empty state, so what is here is only how the incident's own parts sit: the list's toolbar,
   the review moves as buttons in a row that wraps, the people as a list of rows each with its role in words, its history in a disclosure and its actions under it, and the sheet that adds people.

   Numbered 61, the number the simulation build reserved for B2. Tokens only and logical properties only, both enforced (test/styles/tokens_test.rb, test/styles/components_test.rb), so all of it reads on
   the light shell and on the console, in light and in dark, and mirrors in a right-to-left language. It decides no mode and no surface and declares no token. Nothing is pinned to an edge and nothing sets
   a height in vh. Everything that holds words may shrink (`min-inline-size: 0`) and breaks a word that has no room (`overflow-wrap`), so a long name, a long description or a language 40% longer never
   widens the page (WCAG 1.4.10). */

/* ── The list ─────────────────────────────────────────────────────────── */

/* The toolbar above the list: the states to show, what is applied, and the ways to find one incident behind a button. It is one card, as wide as the list under it, as the request queue's filter is
   (60-intake.css), so the two pages' edges line up and a person sees one tool and not three loose rows. */
.incidents-toolbar {
  display: grid;
  gap: var(--space-3);
  min-inline-size: 0;
  padding-block: var(--space-3);
  padding-inline: var(--space-4);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}
.incidents-applied {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-4);
  min-inline-size: 0;
}
/* The disclosure's own space above it is for a form in a panel; in the toolbar the grid's gap does it. */
.incidents-toolbar .incidents-find {
  margin-block-start: 0;
}
.incidents-toolbar .incidents-find > .form-disclosure-body {
  display: grid;
  gap: var(--space-4);
  min-inline-size: 0;
  margin-block-start: var(--space-3);
  padding-block-start: var(--space-4);
  border-block-start: 1px solid var(--rule);
}
/* The two ways to find one: a number, and a person found in the Directory. Side by side where there is room, one over the other where there is not; the people who matched take the whole row. */
.incidents-find-forms {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-4) var(--space-5);
  min-inline-size: 0;
}
.incidents-find-forms > form {
  display: flex;
  flex: 1 1 20rem;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-3);
  max-inline-size: none;
  min-inline-size: 0;
}
/* The person's field takes the room there is, with its button beside it; the number's holds its own width (a medium control, 20rem) and its button stays next to it. */
.incidents-person-form .field {
  flex: 1 1 12rem;
  min-inline-size: 0;
}
.incidents-number-form .field {
  flex: 0 1 20rem;
  min-inline-size: 0;
}
.incidents-find-forms > :is(.incidents-person-none, .incidents-person-results) {
  flex: 1 1 100%;
}
.incidents-person-results {
  display: grid;
  gap: var(--space-1);
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.incidents-person-class,
.incidents-person-none,
.incidents-person-shown,
.incidents-clear {
  min-inline-size: 0;
  margin: 0;
  color: var(--fg2);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}
.incidents-person-shown {
  color: var(--fg1);
}
/* The filter bar's own room under it is for a bar on a page; in the folded filters the grid's gap between the choices and the forms under them does it. */
.incidents-toolbar .filter-bar {
  margin-block-end: 0;
}
/* A number and a day are not broken inside themselves: "2026-" over "0002" and "Oct" over "5," are read as two things. A time wraps below its day when there is no room beside it. */
.incident-list tbody th[scope="row"] a,
.incident-list__day,
.incident-list__time {
  white-space: nowrap;
}
/* The list's note says how many match and, as a second sentence, the order they are in; each is a sentence of its own. */
.incident-list__order {
  color: var(--fg2);
}

/* ── One incident ─────────────────────────────────────────────────────── */

/* What was written is drawn in an isolate of its own (a `bdi`), and the narrative keeps the line breaks it was written with. */
.incident-narrative bdi,
.incident-place bdi,
.incident-person-name bdi {
  unicode-bidi: isolate;
}
.incident-narrative {
  white-space: pre-line;
}
/* A reader who may see that an incident happened and not what was written about it is told so as an absence, in the panel's own size: withheld is not empty (design-direction.md section 6.3). */
.incident-body-withheld.empty-state {
  padding-block: var(--space-3);
  padding-inline: var(--space-4);
}
.incident-body-withheld .empty-state-message {
  font-size: var(--case-data, var(--text-sm));
}
/* The obligation check's frame loads after the page and is empty until it has something to say. An empty frame is still a child of its column's grid, so the gap round it pushed the Files panel 12px
   below the Notes panel beside it: an empty frame takes no part in the layout until it holds the panel. */
.incident-show .case-side > .obligation-hints-frame:empty,
.page-flow[data-measure="sheet"] > .obligation-hints-frame:empty {
  display: contents;
}
/* The facts of the incident, and under them what was written, are each a row of the page's own width (as on the case page, 68-case-page-layout.css), so neither is narrower than the
   notes and the files under them, which are the page's two columns. */
.incident-move {
  display: grid;
  gap: var(--density-gap);
  min-inline-size: 0;
}
.incident-move-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-inline-size: 0;
}
.incident-move-form {
  gap: 0.6rem;
  margin: 0;
}

/* ── Who was there: 32-incident-people.css (NS6) ─────────────────────── */

/* ── The sheet that adds people ───────────────────────────────────────── */

/* The sheets of the incident are `.page-flow[data-measure="sheet"]` (41-page-structure.css): one measure, the form's own 60rem, so a callout above a form, the helper's panel and the sections end where the form does. */
/* Who is on the incident so far: a name and, after it, how they were there; one to a line. */
.incident-so-far-list {
  display: grid;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-wrap: anywhere;
}
.incident-so-far-list > li + li {
  padding-block-start: var(--space-2);
  border-block-start: 1px solid var(--rule);
}
.incident-so-far-list > li {
  padding-block-end: var(--space-2);
}
.incident-so-far-list bdi {
  unicode-bidi: isolate;
}
.incident-so-far-role {
  color: var(--fg2);
}
.incident-add-me-actions,
.incident-people-finish {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  min-inline-size: 0;
}
/* The search is a sheet (45-sheet.css) with one field and its button on one line. */
.incident-search-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-2) var(--space-4);
  min-inline-size: 0;
}
.incident-search-form .field {
  flex: 1 1 14rem;
  min-inline-size: 0;
}
.incident-search-results {
  display: grid;
  gap: 0;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-block-start: 1px solid var(--rule);
}
.incident-search-result {
  min-inline-size: 0;
  padding-block: var(--space-3);
  border-block-end: 1px solid var(--rule);
}
/* A result is one row: the name over its role chips, and Add right after them (an inline form, no hairline). */
.incident-search-add.tform {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 1rem;
  min-inline-size: 0;
}
.incident-search-add > * {
  flex: 1 1 100%;
}
.incident-search-add > .field-group,
.incident-search-add > .form-actions {
  flex: 0 1 auto;
}
.incident-search-name {
  grid-column: 1 / -1;
  min-inline-size: 0;
  margin: 0;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.incident-search-class {
  color: var(--fg2);
  font-size: var(--text-sm);
  font-weight: 400;
}

/* One suggestion of "Who was there, from the narrative" in its own frame (ref2 N5): its search results, or its description form, under the sentence that raised it. */
.work-helper-result__suggestion,
.incident-suggestion {
  display: grid;
  gap: 0.5rem;
  min-inline-size: 0;
}
.incident-suggestion-note {
  margin: 0;
  color: var(--fg2);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}
.incident-suggestion-form.tform {
  gap: 0.75rem;
}
.incident-files-blind-referrals {
  display: grid;
  gap: var(--space-2);
  min-inline-size: 0;
}
