/* A team's assessment of one case (CaseAssessmentsComponent in app/components; docs/data_model/13-operational-domains.md section 16.4; design-direction.md section 6.3), on the page of one
   case and nowhere else. Built from the case page's own lists (`.case-facts`, `.case-fact`, `.case-source` in 53-case-pages.css), the form fields, the badge, the callout and the button, so
   what is here is only how they sit together: the section as wide as the case's facts, the history as a plain list under a hairline, and the form as the case sheet is laid out.

   EVERY LEVEL LOOKS THE SAME. There is one rule for a level (`.assessment-level`) and the markup names no level, so nothing here can color, size, order or mark one level above another.

   Linked after 55-week-calendar.css, which is why it is numbered 56. Tokens only and logical properties only, both enforced (test/styles/tokens_test.rb, test/styles/components_test.rb),
   so all of it reads on the light shell and on the console, in light and in dark, and mirrors in a right-to-left language. It 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). */

.case-assessments {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--density-gap);
  max-inline-size: 64rem;
  min-inline-size: 0;
}
.case-assessments-subheading {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 650;
  overflow-wrap: anywhere;
}

/* The level is a word among words: one weight, the body's color, for every level. */
.assessment-level {
  font-weight: 650;
  overflow-wrap: anywhere;
}
.assessment-meta {
  min-inline-size: 0;
  margin: 0;
  color: var(--fg2);
  font-size: var(--text-sm);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.case-assessments-current .assessment-meta {
  display: inline;
}
.assessment-detail {
  display: block;
  margin-block-start: 0.2rem;
  overflow-wrap: anywhere;
}

/* ── The history: newest first ─────────────────────────────────────────── */

.case-assessments-history {
  display: grid;
  gap: var(--density-gap);
  min-inline-size: 0;
}
.assessment-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-block-start: 1px solid var(--rule);
}
.assessment-entry {
  display: grid;
  gap: 0.25rem;
  min-inline-size: 0;
  padding-block: var(--density-row);
  border-block-end: 1px solid var(--rule);
}
.assessment-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-inline-size: 0;
  margin: 0;
}
.assessment-line .pill {
  max-inline-size: 100%;
}
.assessment-why {
  margin: 0;
  margin-block-start: 0.25rem;
}

/* ── The reason, when someone asks for it ─────────────────────────────────── */

.assessment-reason {
  display: grid;
  gap: 0.25rem;
  min-inline-size: 0;
  margin-block-start: 0.25rem;
  padding-block: 0.5rem;
  padding-inline-start: 0.75rem;
  border-inline-start: 2px solid var(--rule-strong);
}
.assessment-reason-label {
  margin: 0;
  color: var(--fg2);
  font-size: var(--text-sm);
}
.assessment-reason-text {
  min-inline-size: 0;
  margin: 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.assessment-reason-text bdi {
  unicode-bidi: isolate;
}

/* ── Recording one ───────────────────────────────────────────────────────── */

.assessment-form {
  padding-block-start: var(--density-gap);
}
