/* The next-step card and "Also on the plan" on simple CARE's case page (Care::Simple::NextStepComponent, Care::Simple::PlanComponent, Care::Simple::StepFactsComponent; the module care_simple). Both sit in
   a panel (the person page's), and each step in them is a Care::Simple::StepRowComponent (64j), so this is how a step's words, who has it and by when, and its actions sit inside one. The next step's words are the page's largest text after the heading: it is
   the one thing to do now.

   Overdue is a badge with a word (the bad tone), never color alone. Numbered 64c to follow 64b (the header and level sheet) in the link order. Tokens only and logical properties only, so all of it reads
   on the console in light and in dark and mirrors in a right-to-left language. 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), and the actions wrap onto the next line on a phone. */

.care-simple-next .person-panel-body,
.care-simple-plan .person-panel-body {
  display: grid;
  gap: var(--space-3);
  min-inline-size: 0;
}

.care-simple-next__words,
.care-simple-plan__words {
  margin-block: 0;
  overflow-wrap: anywhere;
  color: var(--fg1);
}

.care-simple-next__words {
  font-size: var(--text-lg);
  font-weight: 600;
}

.care-simple-plan__words {
  font-weight: 600;
}

.care-simple-next__none,
.care-simple-plan__none {
  margin-block: 0;
  color: var(--fg2);
  overflow-wrap: anywhere;
}

/* Who has it, whom it is with and by when, on one line that wraps: the badge follows the day, and that the assistant suggested it comes last. */
.care-simple-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  margin-block: 0;
  min-inline-size: 0;
  color: var(--fg2);
}

.care-simple-facts__who,
.care-simple-facts__with,
.care-simple-facts__when,
.care-simple-facts__suggested {
  overflow-wrap: anywhere;
  min-inline-size: 0;
}

/* "Why" after "Suggested by the assistant": the assistant's reason opens in place, under the line. The dot is decoration; the sr-only words in the summary say what it opens. */
.care-simple-facts__why {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1);
  min-inline-size: 0;
}

.care-simple-facts__suggested:has(+ .care-simple-facts__why:not([open]))::after {
  content: "·" / "";
  margin-inline-start: var(--space-3);
}

.care-simple-facts__why[open] {
  flex: 1 1 100%;
}

.care-simple-facts__why > summary {
  min-block-size: var(--density-chip);
  padding-block: var(--space-1);
  color: var(--accent-text);
  font-weight: 600;
  cursor: pointer;
}

@media (pointer: coarse) {
  .care-simple-facts__why > summary {
    min-block-size: var(--target-min);
  }
}

.care-simple-facts__why > summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.care-simple-facts__reason {
  flex: 1 1 100%;
  margin-block: 0;
  overflow-wrap: anywhere;
  min-inline-size: 0;
}

.care-simple-next__actions,
.care-simple-plan__actions,
.care-simple-plan__add {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  min-inline-size: 0;
}

.care-simple-plan__list {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
  min-inline-size: 0;
}

/* A hairline between steps, so a long plan reads as a list of separate things. */
.care-simple-plan__item {
  display: grid;
  gap: var(--space-2);
  min-inline-size: 0;
  padding-block-start: var(--space-4);
  border-block-start: 1px solid var(--rule);
}

.care-simple-plan__item:first-child {
  padding-block-start: 0;
  border-block-start: 0;
}
