/* The incident workspace (WS2 of the incident workspace build; D-176; the approved mock, "Incident workspace", 14 Oct 2026): the incident's page as one working surface.
   IncidentCommandBarComponent, IncidentDetailComponent ("What happened"), IncidentTimelineComponent ("Since then"), OwedRailComponent ("What you owe") and IncidentAccessComponent, and the page
   that arranges them (app/views/incidents/show.html.erb). A command bar (the number, the review's steps, the moves, a More menu) that sticks to the top of a wide screen, and under it the incident's
   facts in one line; then a wide main column (the account, then the people, the cases, the timeline, the files) beside a working rail (what you owe, where the people will be next, how they connect)
   that runs beside the whole column; at the foot, one quiet line of what this reader sees and what is not shown. The two columns are a container query on the workspace (the console's rail takes its
   own room, so the window's width says little); below it one column: the account, what you owe straight after it, then the rest.

   Every panel inside the workspace is drawn as a card: the raised surface, a hairline, the large radius, a soft shadow, and a heading in the display face. The people components (WS3, 22-incident-people.css)
   use the same card, so the page reads as one.

   Tokens only and logical properties only, both enforced (test/styles/tokens_test.rb, test/styles/components_test.rb), so it reads on the light shell and the console, in light and in dark, and mirrors in
   a right-to-left language. Nothing pinned to an edge but the bar on a wide screen (not in a native shell, not on a phone, not in print), no height in vh, and everything that holds words may shrink and
   wrap, so a language 40% longer never widens the page (WCAG 1.4.10). State is said in words beside every color and every tick (WCAG 1.4.1). */

/* ── The workspace ───────────────────────────────────────────────────── */
.incident-workspace {
  container: incident-workspace / inline-size;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-inline-size: 0;
  margin-block-start: var(--space-3);
  font-variant-numeric: lining-nums tabular-nums;
}

.incident-workspace > .callout {
  margin: 0;
}

.iw-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
  min-inline-size: 0;
}

.iw-main,
.iw-rail {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-inline-size: 0;
}

/* One column: the rail first. */
.iw-rail {
  order: -1;
}

@container incident-workspace (min-width: 60rem) {
  .iw-grid {
    grid-template-columns: minmax(0, 1fr) minmax(19rem, 25rem);
  }

  .iw-rail {
    order: 0;
  }
}

/* ── Cards ───────────────────────────────────────────────────────────── */
.iw-card,
.incident-workspace .panel {
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  min-inline-size: 0;
}

.iw-card.panel.person-panel,
.incident-workspace .panel.person-panel {
  overflow: visible;
  font-size: var(--text-sm);
  line-height: 1.5;
  box-shadow: var(--shadow-soft);
}

.iw-card.person-panel .person-panel-head,
.incident-workspace .person-panel .person-panel-head,
.iw-card > .iw-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  padding: var(--space-4) var(--space-4) var(--space-2);
  border: 0;
  background: transparent;
}

.iw-card.person-panel .person-panel-title,
.incident-workspace .person-panel .person-panel-title,
.iw-card-title {
  margin: 0;
  color: var(--fg1);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.25;
  text-transform: none;
}

.iw-card.person-panel .person-panel-note,
.incident-workspace .person-panel .person-panel-note {
  color: var(--fg3);
  font-size: var(--text-xs);
}

.iw-card.person-panel .person-panel-body,
.incident-workspace .person-panel .person-panel-body,
.iw-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  min-inline-size: 0;
  padding: 0 var(--space-4) var(--space-4);
  overflow-wrap: anywhere;
}

.iw-card.person-panel .person-panel-foot,
.incident-workspace .person-panel .person-panel-foot {
  padding: var(--space-3) var(--space-4);
  border-block-start: 1px solid var(--rule);
  color: var(--fg3);
  font-size: var(--text-xs);
}

.iw-card p,
.iw-card h3,
.iw-card h4 {
  margin: 0;
}

.iw-card .icon,
.iw-bar-wrap .icon {
  inline-size: 1rem;
  block-size: 1rem;
  flex: none;
}

/* ── The command bar ─────────────────────────────────────────────────── */
.iw-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-inline-size: 0;
}

.iw-bar {
  z-index: 20;
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

/* Sticky only where nothing else is: a wide screen in a browser. The page's scroll padding keeps a focused control clear of it (38-shell.css, WCAG 2.4.11). */
@media screen and (min-width: 1080px) {
  body:not([data-native]) .iw-bar {
    position: sticky;
    inset-block-start: var(--space-2);
    background: color-mix(in srgb, var(--surface-raised) 92%, transparent);
    -webkit-backdrop-filter: saturate(1.2) blur(8px);
    backdrop-filter: saturate(1.2) blur(8px);
  }

  html:has(body:not([data-native]) .iw-bar) {
    scroll-padding-block-start: 5.5rem;
  }
}

.iw-bar-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-2) var(--space-4);
  min-inline-size: 0;
}

.iw-bar-in > :is(.native-back, .native-close) {
  flex: none;
}

.iw-bar-id {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  min-inline-size: 0;
}

.iw-bar-title {
  margin: 0;
  color: var(--fg1);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.iw-bar-kind {
  margin-inline-end: 0.45em;
  color: var(--fg3);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  vertical-align: 0.2em;
}

.iw-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--fg3);
  font-size: var(--text-xs);
}

.iw-step {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-md);
}

/* The connector between two steps: decoration, drawn before every step but the first. */
.iw-step + .iw-step::before {
  content: "";
  inline-size: 0.875rem;
  block-size: 1.5px;
  margin-inline-end: 0.35rem;
  background: var(--rule-strong);
}

.iw-step[aria-current="step"] {
  background: var(--surface-sunken);
  color: var(--fg1);
  font-weight: 800;
}

.iw-step-number {
  display: inline-grid;
  place-items: center;
  inline-size: 1.25rem;
  block-size: 1.25rem;
  border: 1.5px solid currentcolor;
  border-radius: 50%;
  font-size: 0.6875rem;
  font-weight: 800;
}

.iw-step[data-step="done"] .iw-step-number {
  border-color: var(--good);
  background: var(--good);
  color: var(--surface-raised);
}

.iw-step[data-step="done"] .iw-step-number .icon {
  inline-size: 0.75rem;
  block-size: 0.75rem;
  stroke-width: 3;
}

.iw-bar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-inline-start: auto;
  min-inline-size: 0;
}

.iw-bar-moves {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
}

.iw-more {
  position: relative;
}

.iw-more > summary {
  list-style: none;
  cursor: pointer;
}

.iw-more > summary::-webkit-details-marker {
  display: none;
}

.iw-more-menu {
  position: absolute;
  inset-block-start: calc(100% + var(--space-1));
  inset-inline-end: 0;
  z-index: 30;
  display: grid;
  gap: 2px;
  min-inline-size: 15rem;
  max-inline-size: calc(100dvw - 2rem);
  margin: 0;
  padding: var(--space-1);
  list-style: none;
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
}

.iw-more-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-block-size: var(--target-min);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--fg1);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
}

.iw-more-item:hover {
  background: var(--surface-sunken);
}

.iw-more-item:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: -1px;
}

/* What this reader sees and what is not shown to them: a quiet dashed box, its two halves each with an icon and the words. */
.iw-walls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-2) var(--space-4);
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  color: var(--fg2);
  font-size: 0.8125rem;
}

.iw-walls > span {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.4rem;
  min-inline-size: 0;
}

.iw-walls .icon {
  margin-block-start: 0.15rem;
}

.iw-walls-not {
  color: var(--fg3);
}

/* ── What happened ───────────────────────────────────────────────────── */
.iw-lockline {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.4rem;
  color: var(--fg2);
  font-size: 0.8125rem;
}

.iw-lockline .icon {
  margin-block-start: 0.15rem;
}

.iw-narrative {
  max-inline-size: 72ch;
  color: var(--fg1);
  font-family: var(--font-display);
  font-size: var(--text-md);
  line-height: 1.7;
}

.iw-account-place {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-2);
  color: var(--fg1);
}

.iw-account-place-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--fg3);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.iw-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
  padding-block-start: var(--space-3);
  border-block-start: 1px solid var(--rule);
}

.iw-byline-text {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  min-inline-size: 0;
  color: var(--fg2);
  font-size: 0.8125rem;
}

.iw-byline-text .incident-body-changed {
  font-size: inherit;
}

.iw-record {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
}

.iw-record-title {
  margin: 0;
  color: var(--fg3);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.iw-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr));
  gap: var(--space-2) var(--space-4);
  margin: 0;
}

.iw-fact {
  display: grid;
  gap: 0.1rem;
  min-inline-size: 0;
}

.iw-fact dt {
  color: var(--fg3);
  font-size: var(--text-xs);
}

.iw-fact dd {
  margin: 0;
  color: var(--fg1);
  font-size: 0.8125rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.iw-record-source {
  color: var(--fg3);
  font-size: var(--text-xs);
}

/* ── Since then ──────────────────────────────────────────────────────── */
.iw-composer {
  margin: 0;
}

.iw-composer > .form-disclosure-button {
  display: flex;
  justify-content: flex-start;
  inline-size: 100%;
  min-block-size: var(--target-min);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-sunken);
  color: var(--fg2);
  font-size: var(--text-sm);
  font-weight: 600;
  text-align: start;
  white-space: normal;
}

.iw-composer[open] > .form-disclosure-button {
  margin-block-end: var(--space-3);
}

.iw-tl-day {
  margin: var(--space-2) 0 0;
  color: var(--fg3);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.iw-tl {
  margin: 0;
  padding: 0;
  list-style: none;
}

.iw-tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 4.5rem 1.625rem minmax(0, 1fr);
  gap: var(--space-2);
  padding-block-end: var(--space-3);
}

/* The line that joins the dots: decoration. */
.iw-tl-item::before {
  content: "";
  position: absolute;
  inset-block: 1.75rem 0;
  inset-inline-start: calc(4.5rem + var(--space-2) + 0.8125rem - 1px);
  inline-size: 2px;
  background: var(--rule);
}

.iw-tl-item:last-child::before {
  display: none;
}

.iw-tl-when {
  padding-block-start: 0.2rem;
  color: var(--fg3);
  font-size: var(--text-xs);
  text-align: end;
}

.iw-tl-dot {
  display: grid;
  place-items: center;
  inline-size: 1.625rem;
  block-size: 1.625rem;
  border-radius: 50%;
  background: var(--tone-accent-bg);
  color: var(--tone-accent-fg);
}

.iw-tl-dot .icon {
  inline-size: 0.8125rem;
  block-size: 0.8125rem;
}

.iw-tl-dot[data-kind="check"] { background: var(--tone-warn-bg); color: var(--tone-warn-fg); }
.iw-tl-dot:is([data-kind="transfer"], [data-kind="referral"]) { background: var(--tone-info-bg); color: var(--tone-info-fg); }
.iw-tl-dot:is([data-kind="closed"], [data-kind="case_opened"]) { background: var(--tone-good-bg); color: var(--tone-good-fg); }
.iw-tl-dot[data-kind="person_withdrawn"] { background: var(--tone-mute-bg); color: var(--tone-mute-fg); }

.iw-tl-what {
  display: grid;
  gap: var(--space-2);
  min-inline-size: 0;
  padding-block-start: 0.15rem;
  color: var(--fg1);
  overflow-wrap: anywhere;
}

/* Who did it, set apart in the row's one translated sentence (it is a span, so the sentence stays whole for a translator). The sentence says who in words; the weight only helps the eye. */
.iw-tl-actor {
  font-weight: 700;
}

.iw-tl-quote {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
}

p.iw-tl-quote {
  white-space: pre-line;
}

@container incident-workspace (max-width: 26rem) {
  .iw-tl-item {
    grid-template-columns: 3.5rem 1.625rem minmax(0, 1fr);
  }

  .iw-tl-item::before {
    inset-inline-start: calc(3.5rem + var(--space-2) + 0.8125rem - 1px);
  }
}

/* ── What you owe ────────────────────────────────────────────────────── */
.owed-rail .person-panel-body {
  gap: var(--space-3);
}

.owed-progress {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--fg2);
  font-size: 0.8125rem;
}

.owed-track {
  display: flex;
  flex: 1;
  gap: 2px;
  min-inline-size: 4rem;
  block-size: 0.5rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-sunken);
}

.owed-segment {
  flex: 1;
  background: var(--rule-strong);
}

.owed-segment[data-state="suggested"] { background: var(--gold); }
.owed-segment:is([data-state="done"], [data-state="taken"]) { background: var(--good); }
.owed-segment:is([data-state="sent"], [data-state="received"], [data-state="under_review"]) { background: var(--accent); }
.owed-segment:is([data-state="declined"], [data-state="not_needed"], [data-state="withdrawn"]) { background: var(--fg-faint); }

.owed-group {
  display: grid;
  gap: var(--space-2);
  min-inline-size: 0;
}

.owed-group-heading {
  margin: var(--space-2) 0 0;
  color: var(--fg3);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.owed-group-intro {
  color: var(--fg2);
  font-size: 0.8125rem;
}

.owed-list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.owed-item {
  display: grid;
  grid-template-columns: 1.375rem minmax(0, 1fr);
  gap: var(--space-1) var(--space-3);
  align-items: start;
  padding: var(--space-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
}

.owed-item:target {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.owed-tick {
  display: grid;
  place-items: center;
  inline-size: 1.375rem;
  block-size: 1.375rem;
  margin-block-start: 0.05rem;
  border: 2px solid var(--rule-strong);
  border-radius: var(--radius-md);
  color: var(--surface-raised);
}

.owed-item:is([data-state="done"], [data-state="taken"], [data-state="not_needed"]) .owed-tick {
  border-color: var(--good);
  background: var(--good);
}

.owed-item:is([data-state="sent"], [data-state="received"], [data-state="under_review"]) .owed-tick {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-fg);
}

.owed-item:is([data-state="declined"], [data-state="withdrawn"]) .owed-tick {
  border-color: var(--fg-faint);
  background: var(--fg-faint);
}

.owed-tick .icon {
  inline-size: 0.8125rem;
  block-size: 0.8125rem;
  stroke-width: 3;
}

.owed-body {
  display: grid;
  gap: var(--space-2);
  min-inline-size: 0;
}

.owed-body p {
  margin: 0;
  overflow-wrap: anywhere;
}

.owed-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-1) var(--space-2);
}

.owed-title {
  flex: 1 1 10rem;
  margin: 0;
  color: var(--fg1);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 800;
  line-height: 1.35;
}

.owed-item:is([data-state="done"], [data-state="sent"], [data-state="received"], [data-state="under_review"], [data-state="taken"], [data-state="not_needed"], [data-state="declined"]) .owed-title {
  color: var(--fg2);
}

.owed-guidance > summary {
  color: var(--accent-text);
  font-size: 0.8125rem;
  font-weight: 650;
  cursor: pointer;
}

.owed-guidance > p {
  margin-block-start: var(--space-1);
  color: var(--fg2);
  font-size: 0.8125rem;
}

.owed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

/* The two ways to send an incident to an office the reader works in: each its button and, under it, a line on what it does. */
.owed-ways {
  display: grid;
  gap: var(--space-3);
}

.owed-way {
  display: grid;
  gap: var(--space-1);
  min-inline-size: 0;
}

.owed-way-note {
  margin: 0;
  color: var(--fg2);
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

/* The Title IX question under the duties, quiet: a question and a way to answer it, not an item to tick. */
.owed-title-ix {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  margin: 0;
  color: var(--fg2);
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

/* A case to open in the reader's own office, for more than one person: one button that opens the list in the flow. */
.owed-open > summary {
  list-style: none;
  cursor: pointer;
}

.owed-open > summary::-webkit-details-marker {
  display: none;
}

.owed-open > summary .icon {
  inline-size: 1rem;
  block-size: 1rem;
  transition: transform 120ms ease;
}

.owed-open[open] > summary .icon {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .owed-open > summary .icon {
    transition: none;
  }
}

.owed-open-list {
  display: grid;
  gap: 2px;
  margin: var(--space-2) 0 0;
  padding: var(--space-1);
  list-style: none;
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
}

.owed-open-list a {
  display: flex;
  align-items: center;
  min-block-size: var(--target-min);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
}

.owed-open-list a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: -1px;
}

.owed-actions > form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
}

.owed-people {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.owed-person {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
}

.owed-person > form {
  margin: 0;
}

/* ── The cases and the files (IncidentCasesComponent, FilesPanelComponent) ──
   Drawn on the case page's layout (68-case-page-layout.css, under `.case-show`) until the workspace, which does not carry that class; the same dense rows here, in the workspace's own sizes.
   A case's cell is its first line and quieter lines under it; a file is its name, then what kind, how big and who put it in, a quiet dot between the parts. */
.incident-workspace :is(.incident-case-main, .incident-case-sub) {
  display: block;
}

.incident-workspace .incident-case-sub {
  color: var(--fg2);
  font-size: var(--text-xs);
  font-weight: 400;
}

.incident-workspace .incident-case-day {
  white-space: nowrap;
}

.incident-workspace .files-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.incident-workspace .files-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.5rem;
  min-inline-size: 0;
  padding-block: 0.45rem;
  border-block-end: 1px solid var(--rule);
}

.incident-workspace .files-entry:last-child {
  border-block-end: 0;
}

.incident-workspace .files-name {
  flex: 1 1 100%;
  min-inline-size: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.incident-workspace :is(.files-meta, .files-empty) {
  margin: 0;
  color: var(--fg2);
  font-size: var(--text-xs);
}

.incident-workspace .files-meta:has(+ .files-meta)::after {
  content: "·" / "";
  margin-inline-start: 0.5rem;
  color: var(--fg3);
}

.incident-workspace .files-upload {
  margin: 0;
  padding-block-start: 0.4rem;
  border-block-start: 1px solid var(--rule);
}

.incident-workspace .files-audience {
  margin: 0.4rem 0;
  padding: 0.45rem 0.6rem;
  border-inline-start: 3px solid var(--rule);
  background: var(--surface-sunken);
  color: var(--fg1);
  font-size: var(--text-xs);
  line-height: 1.45;
}

/* ── Print: one column, nothing sticky, no menus. ────────────────────── */
@media print {
  .iw-bar {
    position: static;
    box-shadow: none;
  }

  .iw-bar-actions,
  .iw-composer {
    display: none;
  }

  .iw-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .iw-rail {
    order: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .iw-bar {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* ── 21 Oct 2026: the facts under the number, Latest, the account first ─────────────────────────────────────────────────
   The incident's facts are one wrapping line under the bar, each a small label over its value (a note under it in the quieter face), with a hairline between, so they read as one row of facts and
   never as cards. Latest, under the account, is the newest note in its own tinted block with its time and who wrote it. The grid has three parts: the account, the rail, and the rest of the
   column. On a wide screen the rail spans both rows beside the column, so the people follow the account straight away however long the rail is; in one column the order is the page's: the
   account, what you owe, the rest (the rail is no longer first). The line of what is not shown is quiet, at the foot. Tokens and logical properties only. */
.iw-bar-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) 0;
  margin: 0;
  padding: var(--space-1) 0 0;
  list-style: none;
  min-inline-size: 0;
}
.iw-bar-fact {
  display: grid;
  gap: 0.1rem;
  padding-inline: var(--space-4);
  border-inline-start: 1px solid var(--rule);
  min-inline-size: 0;
}
.iw-bar-fact:first-child {
  padding-inline-start: 0;
  border-inline-start: 0;
}
.iw-bar-fact-label {
  color: var(--fg3);
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.iw-bar-fact-value {
  color: var(--fg1);
  font-weight: 650;
  overflow-wrap: anywhere;
}
.iw-bar-fact-note {
  color: var(--fg2);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}
.iw-latest {
  display: grid;
  gap: var(--space-2);
  margin-block-start: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  min-inline-size: 0;
}
.iw-latest-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
  margin: 0;
  color: var(--accent-text);
  font-size: var(--text-sm);
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.iw-latest-meta {
  color: var(--fg2);
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
}
.iw-latest-body {
  color: var(--fg1);
  overflow-wrap: anywhere;
}
.iw-grid--account-first .iw-rail {
  order: 0;
}
@container incident-workspace (min-width: 60rem) {
  .iw-grid--account-first {
    grid-template-rows: auto 1fr;
    align-items: start;
  }
  .iw-grid--account-first > .iw-main--lead {
    grid-column: 1;
    grid-row: 1;
  }
  .iw-grid--account-first > .iw-rail {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
  .iw-grid--account-first > .iw-main--rest {
    grid-column: 1;
    grid-row: 2;
  }
}
.incident-workspace > .iw-walls {
  border: 0;
  background: none;
  padding-inline: 0;
}

/* The page before closing an incident with something still in motion (incidents/closings/new): each kind of thing a quiet card, its heading, a sentence, then the list. */
.incident-closing-group {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
}

.incident-closing-title {
  margin: 0;
  font-size: var(--text-md);
  color: var(--fg1);
}

.incident-closing-note {
  margin: 0;
  color: var(--fg2);
  font-size: var(--text-sm);
}

.incident-closing-list {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding-inline-start: var(--space-5);
  list-style: disc;
  color: var(--fg1);
  overflow-wrap: anywhere;
}

.incident-closing-list li::marker {
  color: var(--fg3);
}

/* Shared with (12 Nov 2026): the offices brought in to read the incident, one row each in the rail, with Stop sharing under the row. */
.incident-shares-list {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.incident-shares-row {
  display: grid;
  gap: var(--space-1);
  justify-items: start;
  min-inline-size: 0;
}

.incident-shares-row > p {
  margin: 0;
  overflow-wrap: anywhere;
}

.incident-shares-office {
  color: var(--fg1);
  font-weight: 700;
}

.incident-shares-line,
.incident-shares-reason,
.incident-shares-none {
  color: var(--fg2);
}

.incident-shares-none {
  margin: 0;
}
