/* The case page, dense (app/views/cases/show.html.erb, "THE LAYOUT"). The page as the person page is drawn (54-person-page.css): the facts of the case as one framed strip of small-caps labels
   over their values, every section a hairline panel with a sunken small-caps head, and from 56rem of the page's own width two columns: the work and the log in the wide column, the case at a
   glance in the side column beside both. An entry of a list is one dense row: its name and day on the first line, what else it says on one line under it with a quiet dot between the parts,
   and its Read or its button at the end of that line. What a Read draws, and an inline form, take a line of their own.

   The incident page was drawn the same way until the incident workspace (D-176), which has its own layout (21-incident-workspace.css) and no longer carries `.case-show`.

   It changes only how the page's sections sit (everything is under `.case-show`, which the case page carries, so the officer's list that shares `.case-page` is as it was): the components keep their own rules (53-case-pages.css, 56-case-assessments.css, 62-case-work.css,
   63-conduct.css, 64-care-practice.css), so a component drawn alone in its preview is as it was. A LEVEL IS STILL A WORD AMONG WORDS: nothing here names a level, a group, a state or a kind
   of obligation, and no color ranks one (design-direction.md section 6.3).

   Numbered 68 because it must come after the components it arranges (62 to 64) and 65 and 67 are taken. Tokens only and logical properties only, so it reads on the console in light and in
   dark and mirrors in a right-to-left language. It declares no token and decides no mode. Nothing is pinned to an edge and nothing sets a height. Everything that holds words may shrink and
   breaks a long word, so a language 40% longer never widens the page (WCAG 1.4.10). The dot between the parts of a line is drawn with empty alternative text, so a screen reader does not say it. */

.case-show {
  --case-data: 0.8125rem;
  --case-meta: 0.75rem;
  --case-label: 0.6875rem;
  --case-pad: 0.75rem;
  container: case-show / inline-size;
  gap: var(--density-block);
  font-variant-numeric: lining-nums tabular-nums;
}

/* ── The columns ─────────────────────────────────────────────────────── */

.case-grid,
.case-main,
.case-side,
.case-log {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--density-block);
  align-content: start;
  min-inline-size: 0;
}
.case-main:not(:has(*)),
.case-side:not(:has(*)),
.case-log:not(:has(*)) {
  display: none;
}
/* The obligation check's frame loads after the page, and until it has something to say it is empty. An empty box in a grid still takes its gap, which put the side column's first panel one gap
   lower than the work column's for as long as the frame was empty (a case with nothing to check, for good). */
.case-show .obligation-hints-frame:not(:has(*)) {
  display: none;
}
@container case-show (min-width: 56rem) {
  .case-grid {
    grid-template-columns: minmax(0, 1fr) clamp(19rem, 36cqi, 27rem);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "main side" "log side";
    align-items: start;
  }
  .case-grid:not(:has(.case-main > *)) {
    grid-template-rows: auto;
    grid-template-areas: "log side";
  }
  .case-main {
    grid-area: main;
  }
  .case-side {
    grid-area: side;
  }
  .case-log {
    grid-area: log;
  }
}
.case-jump {
  display: block;
  margin: 0;
}
/* The row of links is drawn only on a narrow page, which is a phone: each link is a touch target of the full size (AGENTS.md section 11: 44 px on touch), not only where the pointer says coarse. */
.case-show .case-jump .person-jump-list a {
  min-block-size: var(--target-min);
}
@container case-show (min-width: 56rem) {
  .case-show .case-jump {
    display: none;
  }
}

/* ── A panel ─────────────────────────────────────────────────────────────
   Every section of the page: the global panel's surface and edge, a head that is the section's own heading in small caps on the sunken band, the section's one sentence of help under it in
   the same band, then the body. The sections are the components' own elements, so this is the panel's look and not its markup. */

.case-show :is(.case-main, .case-side, .case-log, .tabs__panel, .case-guided__rail, .case-checklist__tools) > :is(section, nav):not(.person-panel),
.case-show .case-detail > section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.4rem;
  align-content: start;
  max-inline-size: none;
  min-inline-size: 0;
  margin: 0;
  padding: 0 var(--case-pad) 0.6rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  overflow: clip;
  font-size: var(--case-data);
  line-height: 1.35;
}
.case-show :is(.case-main, .case-side, .case-log, .tabs__panel, .case-guided__rail, .case-checklist__tools, .case-detail) > :is(section, nav) > .person-page-heading,
.case-show :is(.case-main, .case-side, .case-log, .tabs__panel, .case-guided__rail, .case-checklist__tools) > section > .case-work-head {
  margin: 0 calc(-1 * var(--case-pad));
  padding: 0.45rem var(--case-pad);
  border-block-end: 1px solid var(--rule);
  background: var(--surface-sunken);
}
.case-show .person-page-heading {
  margin: 0;
  color: var(--fg2);
  font-family: var(--font-sans);
  font-size: var(--case-label);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.case-show .case-work-head {
  flex-wrap: nowrap;
  min-block-size: 0;
}
/* The title keeps a floor, and it is the button's label that gives way: the button was `flex: 0 0 auto`, so a label a language 40% longer left the title the width of a letter or two (5px in the
   pseudo-locale at 320px, its words spilling out of it, which WCAG 1.4.10 forbids). A button's label wraps (35-components.css), so the row stays one row and the title stays readable. */
.case-show .case-work-head > .person-page-heading {
  flex: 1 1 auto;
  min-inline-size: 6rem;
}
.case-show .case-work-head .btn {
  flex: 0 1 auto;
  min-inline-size: 0;
}
/* The section's sentence of help joins the head: under the title, in the same band, small. */
.case-show :is(section, nav) > :is(.person-page-heading, .case-work-head):has(+ .case-source) {
  padding-block-end: 0.1rem;
  border-block-end: 0;
}
.case-show :is(section, nav) > :is(.person-page-heading, .case-work-head) + .case-source {
  margin: -0.4rem calc(-1 * var(--case-pad)) 0;
  padding: 0 var(--case-pad) 0.4rem;
  border-block-end: 1px solid var(--rule);
  background: var(--surface-sunken);
  color: var(--fg2);
  font-size: var(--case-meta);
}
.case-show .case-source,
.case-show .case-work-meta,
.case-show .assessment-meta,
.case-show .assessment-detail {
  font-size: var(--case-meta);
}
.case-show .case-work-subheading,
.case-show .case-assessments-subheading {
  margin-block-start: 0.25rem;
  color: var(--fg3);
  font-family: var(--font-sans);
  font-size: var(--case-label);
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.3;
  text-transform: uppercase;
}
.case-show .callout {
  margin: 0;
  font-size: var(--case-data);
}

/* ── The facts of the case: one strip ────────────────────────────────────
   The head and the source sentence share the band (the source sits at its end), and the facts are cells side by side, each a small-caps label over its value, wrapping to more rows on a
   phone. The rules between cells are each cell's own start and top border, pulled a pixel over its neighbour and cut off where the band ends, as the person page's strip is. */

.case-show .case-detail {
  gap: var(--density-block);
  max-inline-size: none;
}
.case-show .case-detail > .case-detail-facts {
  grid-template-columns: minmax(auto, max-content) minmax(0, 1fr);
  grid-template-areas: "head source" "facts facts";
  gap: 0;
  padding: 0;
}
.case-show .case-detail > .case-detail-facts > .person-page-heading {
  grid-area: head;
  margin: 0;
  border-block-end: 0;
}
.case-show .case-detail > .case-detail-facts > .case-source {
  grid-area: source;
  align-self: stretch;
  margin: 0;
  border-block-end: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-block: 0.3rem;
  padding-inline: var(--case-pad);
  background: var(--surface-sunken);
  font-size: var(--case-meta);
  text-align: end;
}
.case-show .case-detail-facts > .case-facts {
  grid-area: facts;
  display: flex;
  flex-wrap: wrap;
  border-block-start: 1px solid var(--rule);
  overflow: hidden;
}
.case-show .case-detail-facts .case-fact {
  display: grid;
  flex: 1 1 7rem;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.15rem;
  align-content: start;
  margin-block-start: -1px;
  margin-inline-start: -1px;
  padding: 0.45rem var(--case-pad) 0.5rem;
  border-block-start: 1px solid var(--rule);
  border-block-end: 0;
  border-inline-start: 1px solid var(--rule);
}
.case-show .case-detail-facts .case-fact dt {
  color: var(--fg3);
  font-size: var(--case-label);
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.case-show .case-detail-facts .case-fact dd {
  color: var(--fg1);
  font-size: 0.9375rem;
  font-weight: 650;
  line-height: 1.3;
}

/* The stage's age in the strip ("Waiting 4 days, usually 2") sits in a narrow cell. A badge that has to wrap there (WCAG 1.4.10: nothing spills at 320 CSS px) wraps as a rounded box, left aligned, not as a
   pill whose full radius turns three lines of words into a blob. Its words and its tone do not change. */
.case-show .case-detail-facts .case-fact .pill {
  border-radius: 0.6rem;
  margin-block-start: 0.3rem;
  text-align: start;
  white-space: normal;
}

/* T3 (the TAG usability plan, docs/tag_usability/03-target-design.md section 3.2): a fact that is a sentence ("In force": what already binds the people on the matter) takes a row of the strip to itself, so it reads
   whole at every width, and the way to the section that says all of it sits beside it, small, after the words. */
.case-show .case-detail-facts .case-fact--wide {
  flex: 1 1 100%;
}
.case-fact__link {
  margin-inline-start: 0.25rem;
  font-size: var(--text-sm);
  font-weight: 500;
}

/* T3: where the case came from, on a line of its own under who it is about, in the header (CaseOriginComponent). It is working text, not the display face of the line above it: the kind, the office or the filer and
   the day, then "Read it". Long words wrap (the header's sub-line breaks anywhere); the link keeps its words together. */
.case-origin {
  display: block;
  margin-block-start: 0.35rem;
  color: var(--fg2);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-style: normal;
  line-height: 1.5;
}
.case-origin__label {
  font-weight: 650;
}
.case-origin__read {
  margin-inline-start: 0.25rem;
  white-space: nowrap;
}
/* A touch screen: the two links are text in a sentence, so their hit area is made 44 px tall with padding the layout gives back (AGENTS.md section 11, targets). */
@media (pointer: coarse) {
  .case-origin__read,
  .case-fact__link {
    display: inline-block;
    padding-block: 0.8rem;
    margin-block: -0.8rem;
  }
}

/* What was recorded: the title, then the note, each under a small label on its own line. */
.case-show .case-detail-content .case-facts {
  border-block-start: 0;
}
.case-show .case-detail-content .case-fact {
  grid-template-columns: minmax(0, 1fr);
  gap: 0.1rem;
  padding-block: 0.3rem;
}
.case-show .case-detail-content .case-fact:last-child {
  border-block-end: 0;
}
.case-show .case-detail-content .case-fact dt {
  color: var(--fg3);
  font-size: var(--case-label);
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.case-show .case-detail-content .case-title {
  font-size: 0.9375rem;
}
.case-show .case-detail-content .case-note {
  font-size: var(--case-data);
}

/* ── What can be done to the case: one bar ───────────────────────────── */

.case-show > .case-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  max-inline-size: none;
  padding: 0.4rem var(--case-pad);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
}
.case-show > .case-actions > .person-page-heading {
  flex: 0 1 auto;
}
.case-show > .case-actions .case-actions-list {
  flex: 1 1 20rem;
  gap: 0.4rem;
}
/* A bar that holds only More (a page an office leads with its own page) sits in the page header's row of buttons, and its list opens under it, over the page, so the row does not jump. The list is a menu:
   rows, not a tower of buttons; it is never wider than the screen, and past 47.99rem, where the row's buttons wrap onto a line of their own at the page's start edge, it opens from the row's start edge
   instead of the button's end edge, so no label is clipped off the screen at 320px (the list's width is the row's). Escape and a click outside close it (disclosure_controller.js). */
.page-header-actions .case-actions--more-only .case-actions-more__list {
  position: absolute;
  inset-block-start: 100%;
  inset-inline-end: 0;
  z-index: 5;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: var(--space-1);
  min-inline-size: min(14rem, calc(100vw - 2 * var(--space-4)));
  max-inline-size: min(20rem, calc(100vw - 2 * var(--space-4)));
  max-block-size: min(70dvh, 32rem);
  overflow-y: auto;
  padding: var(--space-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  box-shadow: var(--shadow-lift);
}
.page-header-actions .case-actions--more-only .case-actions-more__list > li {
  min-inline-size: 0;
}
.page-header-actions .case-actions--more-only .case-actions-more__list .btn {
  inline-size: 100%;
  justify-content: flex-start;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  text-align: start;
}
.page-header-actions .case-actions--more-only .case-actions-more__list .btn:hover:where(:not(:disabled, [aria-disabled="true"])) {
  border-color: transparent;
  background: var(--surface-sunken);
}
@media (max-width: 47.99rem) {
  .page-header-actions {
    position: relative;
  }
  .page-header-actions .case-actions--more-only .case-actions-more {
    position: static;
  }
  .page-header-actions .case-actions--more-only .case-actions-more__list {
    inset-inline: 0 auto;
    min-inline-size: 0;
    inline-size: min(20rem, 100%);
    max-inline-size: 100%;
  }
}

/* ── Facts inside a panel (the case file, the level of care) ─────────── */

.case-show :is(.case-side, .case-main, .tabs__panel) .case-facts {
  border-block-start: 0;
}
.case-show :is(.case-side, .case-main, .tabs__panel) .case-fact {
  padding-block: 0.3rem;
}
.case-show :is(.case-side, .case-main, .tabs__panel) .case-fact:last-child {
  border-block-end: 0;
}
.case-show :is(.case-side, .case-main, .tabs__panel) .case-fact dt {
  font-size: var(--case-meta);
}

/* ── An entry: one dense row ─────────────────────────────────────────── */

.case-show .case-work-list,
.case-show .assessment-list {
  border-block-start: 0;
}
.case-show .case-work-entry,
.case-show .assessment-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.5rem;
  padding-block: 0.4rem;
}
.case-show .case-work-entry:last-child,
.case-show .assessment-entry:last-child {
  border-block-end: 0;
}
.case-show .case-work-entry > :is(.case-work-line, .case-work-change, .assessment-line) {
  flex: 1 1 100%;
}
.case-show .case-work-line {
  justify-content: space-between;
  gap: 0.1rem 0.6rem;
}
.case-show .case-work-line > time.case-work-meta {
  /* It may shrink, so a moment in a longer language, or with a reader's own text spacing, wraps in its box and does not run out of it (WCAG 1.4.10, 1.4.12). */
  flex: 0 1 auto;
  margin-inline-start: auto;
  color: var(--fg2);
  font-size: var(--case-meta);
}
.case-show .case-work-name {
  font-size: var(--case-data);
}
.case-show .case-work-entry > .case-work-meta,
.case-show .assessment-entry > .assessment-meta {
  flex: 0 1 auto;
}
/* The dot ends the part before the next one, so a line that wraps starts with words and never with a dot. */
.case-show .case-work-entry > .case-work-meta:has(+ .case-work-meta)::after,
.case-show .assessment-entry > .assessment-meta:has(+ .assessment-meta)::after {
  content: "·" / "";
  margin-inline-start: 0.5rem;
  color: var(--fg3);
}
/* Read, an end, a button: at the end of the line under the name. */
.case-show .case-work-entry > :is(.case-work-text-frame, .case-work-inline-form, .btn, .assessment-reason-frame),
.case-show .assessment-entry > .assessment-reason-frame {
  flex: 0 0 auto;
  margin-block: 0;
  margin-inline-start: auto;
}
.case-show .case-work-entry .case-work-inline-form,
.case-show .assessment-why {
  margin: 0;
}
/* What a Read drew, and a form inside an entry, take the whole width. */
.case-show .case-work-entry > .case-work-text-frame:not(:has(> form)),
.case-show .assessment-entry > .assessment-reason-frame:not(:has(> form)),
.case-show .case-work-entry > .care-inline-form {
  flex: 1 1 100%;
  margin-inline-start: 0;
}
.case-show .case-work-entry > .care-inline-form {
  padding-block-start: 0.2rem;
}

/* The interventions: each one's name, and whether it was done at the end of the same line. */
.case-show .care-checklist .case-work-entry {
  flex-wrap: wrap;
}
.case-show .care-checklist .case-work-line {
  flex: 1 1 16rem;
}
.case-show .care-checklist .case-work-name {
  font-weight: 500;
}
.case-show .care-checklist .case-work-entry > .case-work-meta {
  margin-inline-start: auto;
  text-align: end;
}

/* ── The forms ───────────────────────────────────────────────────────────
   A form is a disclosure at the end of its panel, closed until it is wanted; open, it is the panel's width. */

.case-show .case-work-form,
.case-show .care-inline-action {
  margin: 0;
  padding-block-start: 0.4rem;
  border-block-start: 1px solid var(--rule);
}
.case-show .care-inline-action .case-source {
  font-size: var(--case-meta);
}

/* The interventions have two forms (record one done; say one is not needed: 22 Oct 2026), side by side behind their buttons under one rule; the one that is open takes the whole width, the other's
   button waits on its own line. */
.case-show .care-intervention-forms {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: 0.4rem var(--space-3);
  padding-block-start: 0.4rem;
  border-block-start: 1px solid var(--rule);
}
.case-show .care-intervention-forms > .case-work-form {
  flex: 0 1 auto;
  min-inline-size: 0;
  padding-block-start: 0;
  border-block-start: 0;
}
.case-show .care-intervention-forms > .case-work-form[open] {
  flex: 1 1 100%;
}

/* The level of care: the current level stands out as a value, its history is the dense list. */
.case-show .case-assessments-current .case-fact dd {
  display: grid;
  gap: 0.1rem;
}
.case-show .case-assessments-current .assessment-level {
  font-size: 0.9375rem;
}
.case-show .case-assessments-current .assessment-meta,
.case-show .case-assessments-current .assessment-detail {
  display: block;
}

/* A goal's state is changed in a disclosure at the end of its line; open, the choice takes the whole width. */
.case-show .case-work-entry > .case-goal-state {
  flex: 0 0 auto;
  margin: 0;
}
.case-show .case-work-entry > .case-goal-state[open] {
  flex: 1 1 100%;
}
.case-show .case-goal-state > .form-disclosure-body {
  padding-block-start: 0.4rem;
}

/* Facts in the side column: the label and its value on one line, the label in a narrow column. */
.case-show .case-side .case-fact {
  grid-template-columns: minmax(5.5rem, 8.5rem) minmax(0, 1fr);
  align-items: baseline;
  gap: 0 0.6rem;
}
.case-show .case-side .case-assessments-current .case-fact {
  grid-template-columns: minmax(0, 1fr);
}

/* The facts of the case, and under them what was recorded, are each a row of the page's own width, as on the incident page. They once sat side by side from 56rem with the strip's cells
   grown to the taller panel's height, which suited a one-line note; a case's note is the case's own words, written in the editor and as long as the person made it (a suggested note is four
   labeled sections), and beside it the facts were four tall columns with nothing in them (21 Oct 2026). The title and the note keep a reading measure inside their row. */
.case-show .case-detail-content :is(.case-title, .case-note) {
  max-inline-size: 75ch;
}

/* A form keeps the page's own type: its fields, its error summary's links and its choices are the size every form is (24px targets, WCAG 2.5.8), however dense the panel around it. */
.case-show :is(form, .error-summary) {
  font-size: var(--text-base);
  line-height: 1.5;
}

/* ── Files and notes (D-126) ─────────────────────────────────────────────
   A file is one dense row: its name (the link that opens it), then what kind of file it is, how big, and who put it in and when, a quiet dot between the parts. The form that adds one is a
   disclosure at the end of its panel; the upload says who will be able to open the file before the field. (An incident's notes are drawn by the workspace's timeline, 21-incident-workspace.css.) */

.case-show .files-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.case-show .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);
}
.case-show .files-entry:last-child {
  border-block-end: 0;
}
.case-show .files-name {
  flex: 1 1 100%;
  min-inline-size: 0;
  font-size: var(--case-data);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.case-show .files-meta {
  color: var(--fg2);
  font-size: var(--case-meta);
}
.case-show .files-meta:has(+ .files-meta)::after {
  content: "·" / "";
  margin-inline-start: 0.5rem;
  color: var(--fg3);
}
.case-show .files-empty {
  margin: 0;
  color: var(--fg2);
  font-size: var(--case-meta);
}
.case-show .files-upload {
  margin: 0;
  padding-block-start: 0.4rem;
  border-block-start: 1px solid var(--rule);
}
.case-show .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(--case-meta);
  line-height: 1.45;
}

/* ── The case's guide (CaseGuideComponent, 21 Oct 2026) ─────────────────
   Where the case stands, then the one thing to do now. The rail is a row of the response's steps with a rule between them, wrapping on a phone; a done step has a check, the current one a filled
   mark and its words in bold, a step to come a hollow mark, so color is never the only sign. The card under it is the page's first block of work: what to do in the page's display size, its day and
   whose it is, its details, the form or the acts that do it, and what comes after as a short list. Tokens and logical properties only. */
.case-guide {
  container: case-guide / inline-size;
  display: grid;
  gap: var(--space-3);
  min-inline-size: 0;
}
.case-guide__rail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.case-guide__step {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--fg3);
  font-size: var(--text-sm);
  font-weight: 600;
}
.case-guide__rail > li + li::before {
  content: "";
  inline-size: 2.5rem;
  block-size: 2px;
  margin-inline: var(--space-2);
  background: var(--rule);
}
.case-guide__rail > [data-state="done"] + li::before {
  background: var(--accent-line);
}

/* A fork (22 Oct 2026): steps that run side by side, stacked between the step before and the step after. The line from the step before meets a line down the fork's start edge, each branch leaves it
   by a short line and reaches a line down its end edge, and the line to the step after leaves that: a split and a join, drawn with nothing but rules. A line is the accent once the case has come
   that far, as the rail's are. */
.case-guide__fork {
  display: inline-flex;
  align-items: center;
}
.case-guide__rail > .case-guide__fork::before {
  margin-inline-end: 0;
}
.case-guide__rail > .case-guide__fork + li::before {
  margin-inline-start: 0;
}
.case-guide__branches {
  position: relative;
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.case-guide__branches::before,
.case-guide__branches::after {
  content: "";
  position: absolute;
  inset-block: 0.7rem;
  inline-size: 2px;
  background: var(--rule);
}
.case-guide__branches::before {
  inset-inline-start: 0;
}
.case-guide__branches::after {
  inset-inline-end: 0;
}
.case-guide__branches > .case-guide__step::before,
.case-guide__branches > .case-guide__step::after {
  content: "";
  block-size: 2px;
  background: var(--rule);
}
.case-guide__branches > .case-guide__step::before {
  flex: 0 0 0.75rem;
}
.case-guide__branches > .case-guide__step::after {
  flex: 1 0 0.75rem;
}
.case-guide__fork:not([data-state="upcoming"]) .case-guide__branches::before,
.case-guide__fork:not([data-state="upcoming"]) .case-guide__branches > .case-guide__step::before,
.case-guide__branches > .case-guide__step[data-state="done"]::after,
.case-guide__fork[data-state="done"] .case-guide__branches::after {
  background: var(--accent-line);
}
.case-guide__mark {
  display: inline-grid;
  place-items: center;
  inline-size: 1.4rem;
  block-size: 1.4rem;
  border: 2px solid var(--rule-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent-fg);
  font-size: var(--text-xs);
}
.case-guide__step[data-state="done"] {
  color: var(--fg2);
}
.case-guide__step[data-state="done"] .case-guide__mark {
  border-color: var(--accent);
  background: var(--accent);
}
/* Under way: the current step, and a branch open beside it in a fork, are one mark (a dot in a ring) and bold words. Three marks to learn, as in any stepper: a check, a dot, an empty ring
   (22 Oct 2026: two marks for "under way" read as two meanings nobody was told). The Now card names the step it is for. Skipped: a dashed ring, its words struck through. */
.case-guide__step:is([data-state="current"], [data-state="open"]) {
  color: var(--fg1);
  font-weight: 750;
}
.case-guide__step:is([data-state="current"], [data-state="open"]) .case-guide__mark {
  border-color: var(--accent);
  background: radial-gradient(circle, var(--accent) 0 45%, var(--surface) 50%);
}
.case-guide__step[data-state="skipped"] .case-guide__mark {
  border-style: dashed;
}
.case-guide__step[data-state="skipped"] .case-guide__label {
  text-decoration: line-through;
}
.case-guide__summary {
  margin: 0;
  color: var(--fg2);
  font-size: var(--text-sm);
}
.case-guide__now {
  display: grid;
  gap: var(--space-2);
  max-inline-size: 60rem;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--accent-line);
  border-inline-start: 4px solid var(--accent);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  min-inline-size: 0;
}
.case-guide__now[data-overdue] {
  border-inline-start-color: var(--bad);
}
.case-guide__eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  margin: 0;
  color: var(--fg2);
  font-size: var(--text-sm);
}
.case-guide__now-word {
  color: var(--accent-text);
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.case-guide__now-step {
  padding-inline-start: var(--space-3);
  border-inline-start: 1px solid var(--rule-strong);
  color: var(--fg2);
  font-weight: 650;
}
/* When it is due and whose it is: words, not a badge (a capsule beside the card's capsule buttons read as one more button). The due words carry the tone's text color and an icon, so the color is
   never the only sign: a clock while it is due, a warning sign once it is overdue. */
.case-guide__when {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  margin: 0;
  color: var(--fg2);
  font-size: var(--text-sm);
}
.case-guide__due {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--accent-text);
  font-weight: 650;
}
.case-guide__due[data-overdue] {
  color: var(--bad);
}
.case-guide__due .icon {
  flex: none;
  inline-size: 1.05em;
  block-size: 1.05em;
}
.case-guide__due + .case-guide__owner {
  padding-inline-start: var(--space-3);
  border-inline-start: 1px solid var(--rule-strong);
}
.case-guide__title {
  margin: 0;
  color: var(--fg1);
  font-size: var(--text-lg);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.case-guide__detail,
.case-guide__nothing {
  margin: 0;
  color: var(--fg2);
  overflow-wrap: anywhere;
}
.case-guide__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-block-start: var(--space-1);
}
:is(.case-guide__form, .case-checklist__form) {
  min-inline-size: 0;
}
/* How far each heading of the stage's list has got: one quiet line under the title, its parts set apart by a rule, wrapping as words do. */
.case-guide__progress {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--fg2);
  font-size: var(--text-sm);
}
.case-guide__progress > li + li {
  padding-inline-start: var(--space-3);
  border-inline-start: 1px solid var(--rule-strong);
}
/* A decision's ways on: equal buttons of equal width in one row while they fit, stacked on a phone; none is drawn as the main one. */
.case-guide__choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: var(--space-2);
  margin-block-start: var(--space-1);
}
.case-guide__choices > .btn {
  text-align: center;
}
.case-guide__later {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
  color: var(--fg2);
  font-size: var(--text-sm);
}
.case-guide__later-heading {
  margin: 0;
  color: var(--fg1);
  font-size: var(--text-sm);
}
.case-guide__later-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
/* The note behind "Read the note" on a page that leads with its guide (CaseDetailComponent, note_folded). */
.case-note-fold > summary {
  cursor: pointer;
  color: var(--accent-text);
  font-weight: 600;
  min-block-size: 24px;
}
.case-note-fold[open] > summary {
  margin-block-end: var(--space-2);
}
/* The page's own form drawn inside the guide's card (the level of care while none is recorded): the card's title says what it is, so the panel's own heading is for a screen reader only and its
   source sentence is a quiet line, not a band. */
:is(.case-guide__form, .case-checklist__form) .person-page-heading {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.case-show :is(.case-guide__form, .case-checklist__form) :is(section, nav) > :is(.person-page-heading, .case-work-head) + .case-source,
.case-show :is(.case-guide__form, .case-checklist__form) .case-source {
  margin: 0;
  padding: 0;
  border-block-end: 0;
  background: none;
  color: var(--fg2);
  font-size: var(--text-sm);
}
/* A narrow guide (a phone): the rail is marks without the rules between them, with the current step's words and the next step's beside their marks, so it says where the case is and what comes
   next; the marks wrap to a second line where the words need the room. The other steps' words stay for a screen reader (each step still says its state in words). */
@container case-guide (max-width: 34rem) {
  .case-guide__rail {
    flex-wrap: wrap;
    gap: var(--space-2);
  }
  .case-guide__rail > li + li::before,
  .case-guide__branches::before,
  .case-guide__branches::after,
  .case-guide__branches > .case-guide__step::before,
  .case-guide__branches > .case-guide__step::after {
    content: none;
  }
  .case-guide__step {
    flex: 0 0 auto;
  }
  /* A fork is its branches stacked, each with its words while it is current or open now. */
  .case-guide__fork:not([data-state="upcoming"]) {
    flex: 0 1 auto;
    min-inline-size: 0;
  }
  .case-guide__step[data-state="current"] {
    flex: 0 1 auto;
    min-inline-size: 0;
  }
  .case-guide__step[data-state="current"] .case-guide__label {
    min-inline-size: 0;
    overflow-wrap: anywhere;
  }
  .case-guide__step:not([data-state="current"], [data-state="open"]) .case-guide__label {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .case-guide__rail > :is([data-state="current"], .case-guide__fork:has([data-state="current"])) + .case-guide__step {
    flex: 0 1 auto;
    min-inline-size: 0;
  }
  .case-guide__rail > :is([data-state="current"], .case-guide__fork:has([data-state="current"])) + .case-guide__step .case-guide__label {
    position: static;
    inline-size: auto;
    block-size: auto;
    min-inline-size: 0;
    overflow: visible;
    clip-path: none;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
/* The check in a done step's mark is the mark's own size, never wider than it. */
.case-guide__mark svg {
  inline-size: 0.8rem;
  block-size: 0.8rem;
}
.case-guide__step {
  position: relative;
}
/* Inside the guide's card the level of care's form is the thing to do now: drawn open (open_forms), so its disclosure's button is not shown, and nothing must be pressed before the form. */
:is(.case-guide__form, .case-checklist__form) .case-work-form > summary {
  display: none;
}

/* ── The case's guide as a checklist (CaseChecklistComponent) ─────────────
   A step's mark says its state by its shape as well as its color (a check, a dot in a ring, a warning sign, an empty or dashed ring). */
.case-checklist {
  container: case-checklist / inline-size;
  display: grid;
  gap: var(--space-4);
  min-inline-size: 0;
}
.case-checklist__head {
  display: grid;
  gap: var(--space-2);
  min-inline-size: 0;
}
.case-checklist__eyebrow {
  margin: 0;
  color: var(--accent-text);
  font-size: var(--text-xs);
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.case-checklist__headline {
  margin: 0;
  color: var(--fg1);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.25;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.case-checklist__summary {
  margin: 0;
  color: var(--fg2);
}
.case-checklist__counts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.case-checklist__steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}
.case-checklist__step {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  column-gap: var(--space-3);
  min-inline-size: 0;
}
.case-checklist__track {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.case-checklist__track::after {
  content: "";
  flex: 1;
  inline-size: 2px;
  min-block-size: var(--space-4);
  background: var(--rule-strong);
}
.case-checklist__step:last-child .case-checklist__track::after {
  content: none;
}
.case-checklist__step:is([data-state="done"], [data-state="current"], [data-state="open"]) .case-checklist__track::after {
  background: var(--accent-line);
}
.case-checklist__mark {
  display: grid;
  flex: none;
  place-items: center;
  box-sizing: border-box;
  inline-size: 2rem;
  block-size: 2rem;
  border: 2px solid var(--fg3);
  border-radius: 50%;
  background: var(--surface-raised);
  color: var(--fg1);
}
.case-checklist__mark svg {
  inline-size: 1rem;
  block-size: 1rem;
}
.case-checklist__step[data-state="done"] .case-checklist__mark {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-fg);
}
.case-checklist__step[data-state="current"] .case-checklist__mark {
  border-color: var(--accent);
  background: radial-gradient(circle, var(--accent) 0 40%, var(--surface-raised) 45%);
}
.case-checklist__step[data-state="open"] .case-checklist__mark {
  border-color: var(--accent);
}
.case-checklist__step[data-state="late"] .case-checklist__mark {
  border-color: var(--warn);
  border-radius: var(--radius-md);
  background: var(--tone-warn-bg);
  color: var(--warn);
}
.case-checklist__step[data-state="skipped"] .case-checklist__mark {
  border-style: dashed;
}
.case-checklist__fold,
.case-checklist__step > .case-checklist__head-row {
  min-inline-size: 0;
  padding-block-end: var(--space-5);
}
.case-checklist__head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  min-block-size: 2rem;
}
summary.case-checklist__head-row {
  cursor: pointer;
  list-style: none;
}
.case-checklist__head-row::-webkit-details-marker,
.case-checklist__earlier-toggle::-webkit-details-marker {
  display: none;
}
.case-checklist__name-line {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.case-checklist__name {
  color: var(--fg1);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  /* A name longer than a phone's column ("Alternative resolution" in a longer language) breaks rather than runs out of its line. */
  overflow-wrap: anywhere;
}
.case-checklist__step[data-state="skipped"] .case-checklist__name {
  text-decoration: line-through;
}
.case-checklist__words,
.case-checklist__beside {
  color: var(--fg2);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}
/* What a step asks, in a sentence, on its own line under the name: quiet, after the chevron in the row so the chevron stays beside the name. */
.case-checklist__head-row > .case-checklist__about {
  flex-basis: 100%;
  order: 4;
  color: var(--fg2);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}
.case-checklist__chevron {
  display: inline-grid;
  margin-inline-start: auto;
  color: var(--fg2);
  transition: transform 200ms ease-out;
}
.case-checklist__chevron svg {
  inline-size: 1.1rem;
  block-size: 1.1rem;
}
.case-checklist__fold[open] > summary .case-checklist__chevron,
.case-checklist__earlier[open] > summary .case-checklist__chevron {
  transform: rotate(180deg);
}
@media (prefers-reduced-motion: reduce) {
  .case-checklist__chevron {
    transition: none;
  }
}
.case-checklist__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
  margin-block-start: var(--space-2);
  min-inline-size: 0;
}
.case-checklist__earlier {
  border-block-start: 1px solid var(--rule);
}
.case-checklist__earlier-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-block-size: var(--target-min);
  color: var(--accent-text);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.case-checklist__earlier-toggle .case-checklist__chevron {
  margin-inline-start: 0;
}
.case-checklist__items {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}
.case-checklist__items > li {
  min-inline-size: 0;
}
.case-checklist__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-4);
  min-block-size: var(--target-min);
  padding-block: var(--space-2);
  border-block-start: 1px solid var(--rule);
}
.case-checklist__day {
  flex: 0 0 4.5rem;
  color: var(--fg2);
  font-size: var(--text-sm);
}
.case-checklist__what {
  display: grid;
  flex: 1 1 14rem;
  min-inline-size: 0;
}
.case-checklist__label {
  color: var(--fg1);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.case-checklist__item:not([data-open="true"]) .case-checklist__label {
  color: var(--fg2);
}
.case-checklist__detail {
  color: var(--fg2);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}
.case-checklist__section {
  padding-block: var(--space-3) var(--space-1);
  color: var(--fg2);
  font-size: var(--text-xs);
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.case-checklist__today {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-block: var(--space-2);
}
.case-checklist__today::after {
  content: "";
  flex: 1;
  block-size: 2px;
  background: var(--accent);
}
.case-checklist__today-word {
  color: var(--accent-text);
  font-size: var(--text-sm);
  font-weight: 750;
}
.case-checklist__now {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin-block: var(--space-1);
  padding: var(--space-4);
  border: 2px solid var(--accent);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  min-inline-size: 0;
}
.case-checklist__now:empty {
  display: none;
}
.case-checklist__now > .case-checklist__day:empty {
  display: none;
}
.case-checklist__now-main {
  display: grid;
  flex: 1 1 18rem;
  gap: var(--space-2);
  min-inline-size: 0;
}
.case-checklist__now-title {
  margin: 0;
  color: var(--fg1);
  font-size: var(--text-lg);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.case-checklist__when,
.case-checklist__progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--fg2);
  font-size: var(--text-sm);
}
.case-checklist__due {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--accent-text);
  font-weight: 650;
}
.case-checklist__due[data-overdue] {
  color: var(--bad);
}
.case-checklist__due .icon {
  flex: none;
  inline-size: 1.05em;
  block-size: 1.05em;
}
.case-checklist__due + .case-checklist__owner,
.case-checklist__progress > li + li {
  padding-inline-start: var(--space-3);
  border-inline-start: 1px solid var(--rule-strong);
}
.case-checklist__now-detail,
.case-checklist__nothing {
  margin: 0;
  color: var(--fg2);
  overflow-wrap: anywhere;
}
.case-checklist__actions,
.case-checklist__step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-block-start: var(--space-1);
}
.case-checklist__item-form {
  min-inline-size: 0;
  max-inline-size: 100%;
}
.case-checklist__item > .case-checklist__item-form:has(> section, details[open]) {
  flex: 1 1 100%;
}
.case-checklist__choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
}
.case-checklist__action-form {
  margin: 0;
}
.case-checklist__choices > .case-checklist__action-form > .btn {
  inline-size: 100%;
}
/* A step that may end the case, and the way on from a step, drawn as its last row. */
.case-checklist__may-close {
  display: inline-flex;
  align-items: center;
  padding-inline: var(--space-2);
  border: 1px dashed var(--rule-strong);
  border-radius: 999px;
  color: var(--fg2);
  font-size: var(--text-xs);
  font-weight: 700;
  white-space: nowrap;
}
.case-checklist__move {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  margin-block-start: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1.5px dashed var(--rule-strong);
  border-radius: var(--radius-md);
}
.case-checklist__move-words {
  flex: 1 1 18rem;
  min-inline-size: 0;
  margin: 0;
  overflow-wrap: anywhere;
}
.case-checklist__move-detail {
  color: var(--fg2);
}
.case-checklist__move > .case-checklist__item-form {
  flex: 1 1 100%;
}
@container case-checklist (max-width: 34rem) {
  .case-checklist__actions > * {
    flex: 1 1 100%;
  }
  .case-checklist__step {
    grid-template-columns: 1.75rem minmax(0, 1fr);
    column-gap: var(--space-2);
  }
  .case-checklist__mark {
    inline-size: 1.75rem;
    block-size: 1.75rem;
  }
}

/* ── A page that leads with its guide (22 Oct 2026) ──────────────────────
   What can be done to the case is the bar under the header, first, its heading said only to a screen reader (the bar is a nav named by it). Under it, from 60rem of the page's own width, two
   columns, as the incident page has: the guide and then the panels' tabs in the wide one, and the rail beside both, down the page, with what a person checks against while they work (the case's
   facts, what was recorded, the questions the check raised). The guide's card takes its column's width, so there is no empty band beside it. On a phone it is one column in the file's order. */
.case-show--guided > .case-actions > .person-page-heading {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.case-guided,
.case-guided__lead,
.case-guided__rail,
.case-guided__rest {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--density-block);
  align-content: start;
  min-inline-size: 0;
}
.case-guided__rail:not(:has(*)) {
  display: none;
}
@container case-show (min-width: 60rem) {
  .case-guided {
    grid-template-columns: minmax(0, 1fr) clamp(18rem, 30cqi, 25rem);
    grid-template-rows: auto 1fr;
    align-items: start;
  }
  .case-guided > .case-guided__lead {
    grid-column: 1;
    grid-row: 1;
  }
  .case-guided > .case-guided__rail {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
  .case-guided > .case-guided__rest {
    grid-column: 1;
    grid-row: 2;
  }
  .case-guided__lead .case-guide__now {
    max-inline-size: none;
  }
}
/* The case's facts in the rail: the head on its band, the facts two to a row, each a small-caps label over its value, and the source sentence a quiet line under them. */
.case-show .case-guided__rail .case-detail > .case-detail-facts {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "facts" "source";
}
.case-show .case-guided__rail .case-detail > .case-detail-facts > .person-page-heading {
  border-block-end: 1px solid var(--rule);
}
.case-show .case-guided__rail .case-detail-facts > .case-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 8rem), 1fr));
  border-block-start: 0;
}
.case-show .case-guided__rail .case-detail-facts .case-fact--wide {
  grid-column: 1 / -1;
}
.case-show .case-guided__rail .case-detail > .case-detail-facts > .case-source {
  justify-content: flex-start;
  padding-block: 0.4rem 0.5rem;
  border-block-start: 1px solid var(--rule);
  background: none;
  text-align: start;
}
/* The level of care's form inside the guide's card: the card's title already says what it records, so the form's section is one column, its title and its sentence said only to a screen reader,
   and the choices take the card's whole width; the button lines up with them. */
/* The rules a form draws between its parts (the disclosure's, the section's) are the card's edge here, so they are left out. */
.case-show :is(.case-guide__form, .case-checklist__form) .case-work-form {
  padding-block-start: 0;
  border-block-start: 0;
}
:is(.case-guide__form, .case-checklist__form) .form-section {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto;
  padding-block-start: var(--space-2);
  border-block-start: 0;
}
:is(.case-guide__form, .case-checklist__form) .form-section-title,
:is(.case-guide__form, .case-checklist__form) .form-section > .form-section-intro {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
:is(.case-guide__form, .case-checklist__form) .form-section-fields {
  grid-column: 1;
  grid-row: auto;
  margin-block-start: 0;
}
:is(.case-guide__form, .case-checklist__form) .tform {
  max-inline-size: none;
}
:is(.case-guide__form, .case-checklist__form) .tform:has(> .form-section) > .form-actions {
  padding-inline-start: 0;
}
/* The check's questions in the rail are at the rail's sizes: the question at the panel's own size, what it is and how it stands one step smaller under it. */
.case-guided__rail :is(.obligation-hint-label, .obligation-hint-why, .obligation-hint-covered, .obligation-hints-covered-link, .obligation-hint-guidance p) {
  font-size: var(--case-meta);
}

/* ── What happened, and the timeline (guided case page) ──────────────────
   The account the case was opened with leads the page, open, at reading size: the heading in the display face, the note in a measure a person can read. The timeline is one column of days, each
   a heading over its entries; an entry is its time, a dot on the line that runs down the day, and a card. Contacts and steps differ by the dot's colour and by the word over the title. */
.case-show .case-story {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
}
.case-show .case-story__heading {
  margin: 0;
  color: var(--fg1);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.2;
}
.case-show .case-story__title {
  margin: 0;
  color: var(--fg1);
  font-weight: 700;
  overflow-wrap: anywhere;
}
.case-show .case-story__note {
  max-inline-size: 70ch;
  color: var(--fg1);
  font-size: var(--text-md);
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.case-show .case-story__note :is(p, ul, ol, blockquote) {
  margin-block: 0 var(--space-3);
}
/* Where the case came from, first, as the story's own line; and the offices it was sent on to, after the note. */
.case-show .case-story__origin {
  color: var(--fg2);
  font-size: var(--text-sm);
}
.case-show .case-story__origin .case-origin {
  margin: 0;
}
.case-show .case-story__sent {
  margin: 0;
  color: var(--fg2);
  font-size: var(--text-sm);
}
/* What changes the plan, at the end of the whole plan, set apart from the plan's list by a rule. */
.case-show .case-checklist__tools {
  display: grid;
  gap: var(--density-block, var(--space-4));
  margin-block-start: var(--space-4);
  padding-block-start: var(--space-4);
  border-block-start: 1px solid var(--rule);
}
.case-show .case-story__none,
.case-show .case-story__source {
  margin: 0;
  color: var(--fg3);
  font-size: var(--text-sm);
}
.case-show .case-story__source {
  padding-block-start: var(--space-3);
  border-block-start: 1px solid var(--rule);
}
/* On a phone the story keeps every word but less chrome, so the one thing to do now still reaches the first screen. */
@container case-show (max-width: 40rem) {
  .case-show .case-story {
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
  }
  /* The heading reads as the guide's own label does on a phone ("Where this case stands"), over the title in bold. */
  .case-show .case-story__heading {
    color: var(--accent-text);
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: 700;
  }
  .case-show .case-story__note {
    font-size: var(--text-base);
    line-height: 1.5;
  }
  .case-show .case-story__note :is(p, ul, ol, blockquote) {
    margin-block-end: var(--space-2);
  }
  .case-show .case-story__source {
    padding-block-start: 0;
    border-block-start: 0;
    font-size: var(--text-xs);
  }
  .case-show .case-checklist__head {
    gap: var(--space-1);
  }
}

.case-show .case-timeline {
  display: grid;
  gap: var(--space-4);
}
.case-show .case-timeline__head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  align-items: center;
  justify-content: space-between;
}
.case-show .case-timeline__heading {
  margin: 0;
  color: var(--fg1);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
}
.case-show .case-timeline__form .case-work-form {
  padding-block-start: 0;
  border-block-start: 0;
}
.case-show .case-timeline__empty {
  margin: 0;
  color: var(--fg3);
}
.case-show .case-timeline__day {
  display: grid;
  gap: var(--space-2);
}
.case-show .case-timeline__day-heading {
  margin: 0;
  color: var(--fg1);
  font-size: var(--text-base);
  font-weight: 700;
}
.case-show .case-timeline__list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.case-show .case-timeline__entry {
  --dot: var(--accent);
  position: relative;
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: var(--space-4);
  padding-block: var(--space-2);
}
.case-show .case-timeline__entry--contact {
  --dot: var(--spine-teal-line);
}
/* The line down the day, and the dot on it, in the gap between the time and the card. */
.case-show .case-timeline__entry::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: calc(5rem + var(--space-4) / 2 - 1px);
  inline-size: 2px;
  background: var(--rule);
}
.case-show .case-timeline__entry:first-child::before {
  inset-block-start: 1.25rem;
}
.case-show .case-timeline__entry:last-child::before {
  inset-block-end: auto;
  block-size: 1.25rem;
}
.case-show .case-timeline__entry::after {
  content: "";
  position: absolute;
  inset-block-start: calc(var(--space-2) + 0.9rem);
  inset-inline-start: calc(5rem + var(--space-4) / 2 - 6px);
  inline-size: 12px;
  block-size: 12px;
  border-radius: 50%;
  background: var(--dot);
  box-shadow: 0 0 0 3px var(--surface);
}
.case-show .case-timeline__time {
  padding-block-start: 0.85rem;
  color: var(--fg3);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}
.case-show .case-timeline__card {
  display: grid;
  gap: 0.15rem;
  margin-inline-start: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  min-inline-size: 0;
}
.case-show .case-timeline__card > p {
  margin: 0;
  overflow-wrap: anywhere;
}
.case-show .case-timeline__kind {
  color: var(--accent-text, var(--fg2));
  font-size: var(--text-xs);
  font-weight: 700;
}
.case-show .case-timeline__entry--contact .case-timeline__kind {
  color: var(--fg2);
}
.case-show .case-timeline__title {
  color: var(--fg1);
  font-weight: 700;
}
.case-show .case-timeline__meta {
  color: var(--fg3);
  font-size: var(--text-sm);
}
.case-show .case-timeline__text {
  display: block;
  margin-block-start: var(--space-2);
}
@container case-show (max-width: 30rem) {
  .case-show .case-timeline__entry {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-inline-start: var(--space-5);
  }
  .case-show .case-timeline__entry::before {
    inset-inline-start: calc(var(--space-2) - 1px);
  }
  .case-show .case-timeline__entry::after {
    inset-inline-start: calc(var(--space-2) - 6px);
  }
  .case-show .case-timeline__time {
    padding-block-start: 0;
  }
  .case-show .case-timeline__card {
    margin-inline-start: 0;
  }
}
/* With the heading said only to a screen reader, the way to log a contact keeps its place at the row's end. */
.case-show .case-timeline__head:has(> .sr-only) {
  justify-content: flex-end;
}

/* ── Track A: the guide's stage bar and Up next ──────────────────────────
   (the guide's own rules go here, above the marker of the next section) */

/* The guide looks forward: where the case stands (a bar of its stages), the one thing to do now and the next few dated items (Up next), and the whole plan behind a disclosure. A stage says its
   state by its words as well as its color: Done, Now, N of M done, N overdue, To come. */
.case-checklist__eyebrow {
  font-size: var(--text-sm);
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}
/* On a phone the bar is its segments in one row with one line of words under it ("Stage 4 of 8: Review"), the proposed phone design; every stage's own words stay for a screen reader. From 30rem each stage
   is a column of its own with its words under its bar, up to five in a row. */
.case-checklist__bar {
  display: flex;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.case-checklist__stage {
  position: relative;
  flex: 1 1 0;
  min-inline-size: 0;
  color: var(--fg2);
  font-size: var(--text-sm);
}
.case-checklist__meter {
  display: block;
  block-size: 0.5rem;
  border-radius: 999px;
  background: var(--rule-strong);
  overflow: hidden;
}
.case-checklist__meter-fill {
  display: block;
  inline-size: var(--fill, 0%);
  block-size: 100%;
  background: var(--accent);
}
.case-checklist__stage > :not(.case-checklist__meter) {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.case-checklist__bar-caption {
  margin: 0;
  color: var(--fg2);
  font-size: var(--text-sm);
  font-weight: 650;
  line-height: 1.3;
}
.case-checklist__stage-name {
  color: var(--fg1);
  font-weight: 700;
}
.case-checklist__stage[data-state="upcoming"] .case-checklist__stage-name {
  color: var(--fg2);
}
.case-checklist__stage[data-state="skipped"] .case-checklist__stage-name {
  text-decoration: line-through;
}
.case-checklist__stage[data-state="done"] .case-checklist__meter-fill {
  background: var(--good);
}
.case-checklist__stage[data-state="late"] .case-checklist__meter-fill {
  background: var(--warn);
}
.case-checklist__stage[data-state="skipped"] .case-checklist__meter {
  background: none;
  border: 1px dashed var(--rule-strong);
}
.case-checklist__stage[data-state="current"] .case-checklist__meter {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.case-checklist__stage-now {
  color: var(--accent-text);
  font-weight: 700;
}
.case-checklist__stage-alert {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--warn);
  font-weight: 650;
}
.case-checklist__stage-alert .icon {
  flex: none;
  inline-size: 1em;
  block-size: 1em;
}
@container case-checklist (min-width: 30rem) {
  .case-checklist__bar {
    display: grid;
    grid-template-columns: repeat(var(--columns, 5), minmax(0, 1fr));
    gap: var(--space-3) var(--space-2);
  }
  .case-checklist__bar-caption {
    display: none;
  }
  .case-checklist__counts > li[data-in-bar] {
    display: none;
  }
  .case-checklist__counts:not(:has(> li:not([data-in-bar]))) {
    display: none;
  }
  .case-checklist__counts > li + li {
    padding-inline-start: 0;
    border-inline-start: 0;
  }
  .case-checklist__counts > li:not([data-in-bar]) ~ li:not([data-in-bar]) {
    padding-inline-start: var(--space-3);
    border-inline-start: 1px solid var(--rule-strong);
  }
  .case-checklist__stage {
    display: grid;
    align-content: start;
    row-gap: var(--space-1);
  }
  .case-checklist__meter {
    block-size: 0.375rem;
  }
  .case-checklist__stage > :not(.case-checklist__meter) {
    position: static;
    inline-size: auto;
    block-size: auto;
    overflow: visible;
    clip-path: none;
    white-space: normal;
    overflow-wrap: break-word;
  }
  .case-checklist__stage > .sr-only {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
/* A compact bar (CaseChecklistComponent compact_bar: true) keeps every stage in one row at every width, with only its name under it, small; how far each stage has got is the
   segment's fill, the stage now under way the one line under the bar, and every stage's other words are for a screen reader only. The whole plan below says the rest. */
@container case-checklist (min-width: 30rem) {
  .case-checklist[data-compact-bar] .case-checklist__bar {
    grid-template-columns: repeat(var(--stages, 5), minmax(0, 1fr));
    gap: var(--space-2) var(--space-1);
  }
  .case-checklist[data-compact-bar] .case-checklist__meter {
    block-size: 0.5rem;
  }
  .case-checklist[data-compact-bar] .case-checklist__stage > :not(.case-checklist__meter, .case-checklist__stage-name) {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .case-checklist[data-compact-bar] .case-checklist__stage-name {
    color: var(--fg2);
    font-size: var(--text-xs);
    font-weight: 600;
    line-height: 1.3;
    /* Many stages make narrow columns, and a long word ("Communications") breaks rather than runs into the next. */
    overflow-wrap: anywhere;
    hyphens: auto;
  }
  .case-checklist[data-compact-bar] .case-checklist__stage[data-state="current"] .case-checklist__stage-name {
    color: var(--accent-text);
  }
  .case-checklist[data-compact-bar] .case-checklist__bar-caption {
    display: block;
  }
}
/* On a phone a step's few words go on their own line under its name, so a name that wraps keeps the chevron on its first line. */
@container case-checklist (max-width: 30rem) {
  .case-checklist__head-row {
    flex-wrap: wrap;
  }
  .case-checklist__head-row > .case-checklist__name-line {
    flex: 1 1 0;
    min-inline-size: 0;
  }
  /* What a step is beside shares the line with its name, so a long one wraps rather than squeezing the name out of its own box. */
  .case-checklist__head-row > .case-checklist__beside {
    flex: 1 1 0;
    min-inline-size: 0;
  }
  .case-checklist__head-row > .case-checklist__words {
    flex-basis: 100%;
    order: 3;
  }
}
/* What the bar does not say: the counts of the plan's other threads, one quiet line, its parts set apart by a rule. */
.case-checklist__counts {
  gap: var(--space-1) var(--space-3);
  color: var(--fg2);
  font-size: var(--text-sm);
}
.case-checklist__counts > li + li {
  padding-inline-start: var(--space-3);
  border-inline-start: 1px solid var(--rule-strong);
}
.case-checklist__counts > li[data-tone="warn"] {
  color: var(--warn);
  font-weight: 650;
}
.case-checklist__counts > li[data-tone="good"] {
  color: var(--good);
}
@container case-checklist (max-width: 30rem) {
  .case-checklist__counts {
    flex-direction: column;
  }
  .case-checklist__counts > li + li {
    padding-inline-start: 0;
    border-inline-start: 0;
  }
}
/* The parts of the guide sit close, so that on a phone the card is on the first screen under the story and the bar. */
.case-checklist {
  gap: var(--space-3);
}
.case-checklist__head {
  gap: var(--space-1);
}
.case-checklist__next {
  display: grid;
  gap: var(--space-2);
  padding-block-start: var(--space-3);
  border-block-start: 1px solid var(--rule);
  min-inline-size: 0;
}
.case-checklist__next-heading {
  margin: 0;
  color: var(--fg1);
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 1.25;
}
.case-checklist__now {
  margin-block: 0;
  padding: var(--space-3) var(--space-4);
}
/* Leave room for a dated next action that wraps to several lines on a phone. */
@container case-show (max-width: 40rem) {
  .case-show .case-checklist {
    gap: var(--space-2);
  }
  .case-show .case-checklist__next {
    gap: var(--space-1);
    padding-block-start: var(--space-2);
  }
  .case-show .case-checklist__now {
    padding-block: var(--space-2);
  }
}
.case-checklist__now[data-overdue] {
  border-color: var(--bad);
}
.case-checklist__now-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  margin: 0;
  color: var(--fg2);
  font-size: var(--text-sm);
}
.case-checklist__now-word {
  color: var(--accent-text);
  font-weight: 750;
}
.case-checklist__now-step {
  padding-inline-start: var(--space-3);
  border-inline-start: 1px solid var(--rule-strong);
  font-weight: 650;
}
.case-checklist__owner + .case-checklist__owner {
  padding-inline-start: var(--space-3);
  border-inline-start: 1px solid var(--rule-strong);
}
.case-checklist__also {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}
.case-checklist__also-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-block: var(--space-2);
  border-block-start: 1px solid var(--rule);
}
.case-checklist__also-what {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  min-inline-size: 0;
}
.case-checklist__coming {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}
.case-checklist__coming-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-4);
  min-block-size: var(--target-min);
  min-inline-size: 0;
  padding-block: var(--space-2);
  border-block-start: 1px solid var(--rule);
}
.case-checklist__plan {
  min-inline-size: 0;
  padding-block-start: var(--space-1);
  border-block-start: 1px solid var(--rule);
}
.case-checklist__plan-heading {
  margin: var(--space-2) 0 0;
  color: var(--fg1);
  font-size: var(--text-base);
  font-weight: 700;
}
.case-checklist__plan > .case-checklist__steps {
  margin-block-start: var(--space-3);
}

/* The headline with what the office puts beside it (CARE's level of care), the badge wrapping under it on a narrow column. */
.case-checklist__headline-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  min-inline-size: 0;
}
.case-checklist__headline-row > .case-checklist__headline {
  min-inline-size: 0;
}
/* The summary and the act that changes what it says, side by side; the act wraps under it on a phone. */
.case-checklist__summary-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  min-inline-size: 0;
}

/* end of track A's section */



/* ── Track B: the timeline's entries, Coming up and filters ──────────────
   (the timeline's own rules go here, above the marker of the next section) */

/* A dot's color is the line's tone, a spine token (Casework::Surface::TIMELINE_TONES); a step and a contact have their own (blue, teal). */
.case-show .case-timeline__entry[data-tone="plum"] { --dot: var(--spine-plum-line); }
.case-show .case-timeline__entry[data-tone="teal"] { --dot: var(--spine-teal-line); }
.case-show .case-timeline__entry[data-tone="blue"] { --dot: var(--spine-blue-line); }
.case-show .case-timeline__entry[data-tone="amber"] { --dot: var(--spine-amber-line); }
.case-show .case-timeline__entry[data-tone="green"] { --dot: var(--spine-green-line); }
.case-show .case-timeline__entry[data-tone="rose"] { --dot: var(--spine-rose-line); }
.case-show .case-timeline__entry[data-tone="slate"] { --dot: var(--spine-slate-line); }

/* The filters: a pill for each kind of line, the pressed one filled and edged (a shape as well as a color). */
/* Coming up, Now and the days, which the order button turns round together, keep the timeline's own spacing. */
.case-show .case-timeline__flow {
  display: grid;
  gap: var(--space-4);
}
/* The filters at the start of the row and the order at its end; on a phone the order wraps under them. */
.case-show .case-timeline__toolbar:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
}
.case-show .case-timeline__filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.case-show .case-timeline__order {
  min-block-size: var(--density-chip);
  padding-inline: var(--space-2);
  border: 0;
  background: transparent;
  color: var(--accent-text);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
}
.case-show .case-timeline__order:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
.case-show .case-timeline__filter {
  min-block-size: var(--density-chip);
  padding-inline: var(--space-3);
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--fg2);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
}
.case-show .case-timeline__filter:hover {
  background: var(--surface-raised);
}
.case-show .case-timeline__filter:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
.case-show .case-timeline__filter[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  color: var(--fg1);
}

/* What the system recorded (a level, a goal, the opening) is a quiet row: the same line and dot, no card around it. */
.case-show .case-timeline__entry--quiet .case-timeline__card {
  padding-block: var(--space-2);
  padding-inline: 0;
  border: 0;
  background: transparent;
}
.case-show .case-timeline__entry--quiet .case-timeline__title {
  font-weight: 600;
}
.case-show .case-timeline__entry--quiet .case-timeline__time {
  padding-block-start: 0.55rem;
}
.case-show .case-timeline__entry--quiet::after {
  inset-block-start: calc(var(--space-2) + 0.6rem);
}

/* Where it began, said as a card of its own in the case's story color. */
.case-show .case-timeline__entry--origin .case-timeline__card {
  border-color: var(--spine-rose-line);
  background: var(--spine-rose-bg);
}
.case-show .case-timeline__entry--origin .case-timeline__kind {
  color: var(--fg1);
}

/* Coming up: the next two things, above Now, on a dashed line with hollow dots (planned, not done). */
.case-show .case-timeline__ahead {
  display: grid;
  gap: var(--space-1);
}
.case-show .case-timeline__ahead-heading {
  margin: 0;
  padding-inline-start: calc(5rem + var(--space-4) + var(--space-3));
  color: var(--fg3);
  font-size: var(--text-xs);
  font-weight: 700;
}
.case-show .case-timeline__entry--ahead::before {
  background: repeating-linear-gradient(var(--rule) 0 4px, transparent 4px 8px);
}
.case-show .case-timeline__list--ahead .case-timeline__entry:last-child::before {
  inset-block-end: 0;
  block-size: auto;
}
.case-show .case-timeline__entry--ahead::after {
  inset-block-start: calc(var(--space-2) + 0.55rem);
  inset-inline-start: calc(5rem + var(--space-4) / 2 - 5px);
  inline-size: 10px;
  block-size: 10px;
  border: 2px dashed var(--dot);
  background: var(--surface);
  box-shadow: none;
}
.case-show .case-timeline__entry--ahead .case-timeline__time {
  padding-block-start: 0.4rem;
  font-weight: 600;
}
.case-show .case-timeline__ahead-line {
  display: grid;
  gap: 0.1rem;
  align-content: start;
  margin: 0;
  margin-inline-start: var(--space-3);
  padding-block: 0.3rem var(--space-2);
  min-inline-size: 0;
  overflow-wrap: anywhere;
}
.case-show .case-timeline__ahead-title {
  color: var(--fg1);
  font-weight: 600;
}

/* Now: the line between what is coming and what has happened, a dot on the timeline's line and a rule across. */
.case-show .case-timeline__now {
  position: relative;
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: var(--space-4);
  align-items: center;
  margin: 0;
  padding-block: var(--space-2);
  background: linear-gradient(var(--accent), var(--accent)) no-repeat;
  background-position: right center;
  background-size: calc(100% - 5rem - var(--space-4) - var(--space-3)) 2px;
}
.case-show .case-timeline__now::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: calc(5rem + var(--space-4) / 2 - 1px);
  inline-size: 2px;
  background: var(--rule);
}
.case-show .case-timeline__now::after {
  content: "";
  position: absolute;
  inset-block-start: calc(50% - 7px);
  inset-inline-start: calc(5rem + var(--space-4) / 2 - 7px);
  inline-size: 14px;
  block-size: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.case-show .case-timeline__now-label {
  position: relative;
  color: var(--accent-text);
  font-size: var(--text-sm);
  font-weight: 800;
}

@container case-show (max-width: 30rem) {
  .case-show .case-timeline__ahead-heading {
    padding-inline-start: var(--space-5);
  }
  .case-show .case-timeline__entry--ahead::after {
    inset-inline-start: calc(var(--space-2) - 5px);
  }
  .case-show .case-timeline__ahead-line {
    margin-inline-start: 0;
  }
  .case-show .case-timeline__now {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-inline-start: var(--space-5);
    background-position: right center;
    background-size: calc(100% - var(--space-5) - 3rem) 2px;
  }
  .case-show .case-timeline__now::before {
    inset-inline-start: calc(var(--space-2) - 1px);
  }
  .case-show .case-timeline__now::after {
    inset-inline-start: calc(var(--space-2) - 7px);
  }
}
@media (pointer: coarse) {
  .case-show :is(.case-timeline__filter, .case-timeline__order) {
    min-block-size: var(--target-min);
  }
}

/* end of track B's section */



/* ── Track C: the header and the rail ────────────────────────────────────
   (the header's and the rail's own rules go here) */

/* Panel heads and the labels over a fact or a group read as words, not shouted: sentence case at a size to read, the weight doing what the capitals and the spacing did. Each selector is the one
   it overrides, because this section comes last in this sheet (the collapsed panel's summary is set again in 82-case-next.css, so it is named by its parent too). */
.case-show .person-page-heading {
  font-size: var(--text-sm);
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}
.case-show .case-work-subheading,
.case-show .case-assessments-subheading {
  font-size: var(--text-sm);
  letter-spacing: 0;
  text-transform: none;
}
.case-show .case-detail-facts .case-fact dt,
.case-show .case-detail-content .case-fact dt {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.case-show .case-collapsed > .case-collapsed__summary {
  font-size: var(--text-sm);
  letter-spacing: 0;
  text-transform: none;
}

/* The assistant's box (AssistantCaseComponent): its buttons on a row that wraps, one line of what it is, and the rest behind "More", a target of the full size. The work helper's answer fills the
   region under it, which takes no room until it has one. */
.case-show .case-assistant > :is(.case-actions-list, .case-assistant__hints, .case-assistant__note, .case-assistant__more, .case-assistant__others, .case-assistant__result, .case-assistant__letter, .case-work-empty) {
  margin-block: 0;
}
.case-assistant__helper {
  margin: 0;
}
/* What each of the first two buttons adds, in small grey words under them: the button's name, then its sentence, so a person who has read "Where this stands" knows why to press either. */
.case-assistant__hints {
  display: grid;
  gap: var(--space-2);
  min-inline-size: 0;
}
.case-assistant__hint {
  min-inline-size: 0;
}
.case-assistant__hint > dt {
  color: var(--fg1);
  font-size: var(--text-sm);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.case-assistant__hint > dd {
  margin: 0;
  color: var(--fg2);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}
.case-assistant__more > summary,
.case-assistant__others > summary {
  display: list-item;
  min-block-size: var(--target-min);
  padding-block: var(--space-2);
  color: var(--accent-text);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
}
.case-assistant__more > summary:focus-visible,
.case-assistant__others > summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.case-assistant__more-body,
.case-assistant__others-body {
  display: grid;
  gap: var(--space-2);
  padding-block-end: var(--space-2);
}
.case-assistant__more-body > p,
.case-assistant__others-body > :is(p, form, ul) {
  margin: 0;
}
.case-assistant__result:empty {
  display: none;
}

/* end of track C's section */
