/* "Where this stands" on simple CARE's case page (Care::Simple::WhereThisStandsComponent; the module care_simple): the assistant's account of the case, the first card under the header. It is meant to be
   read, so it is calm: a plain panel with no strong border (Start here, below it, is the card with the loud one), the assistant's mark and "Written by the assistant" with the time above the words so no one takes a model's
   account for the record, the narrative in the body face at a reading width and a generous line. The sender's own words, further down, are the ones in the
   display face. Numbered 64v to follow the other simple CARE sheets in the link order.

   What the card says about its own state is words, never color alone: a risk of harm gets a mark and a sentence in the warn tone's text on the panel's own ground, quiet beside the account and not a band;
   "may be out of date" and "not written yet" are one muted sentence each. Tokens only and logical properties only, both enforced (test/styles/tokens_test.rb, test/styles/components_test.rb), so it
   reads on the console in light and in dark and mirrors in a right-to-left language. Nothing is pinned to an edge, nothing sets a height, and everything that holds words may shrink and breaks a long
   word, so a language 40% longer never widens the page (WCAG 1.4.10). */

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

/* The panel sets every paragraph directly in its body small and grey (54-person-page.css); each rule here names the body so it wins over that by specificity. */
.care-simple-where .person-panel-body > .care-simple-where__from,
.care-simple-where .person-panel-body > .care-simple-where__harm {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-block: 0;
  min-inline-size: 0;
  font-size: var(--text-sm);
}

.care-simple-where .person-panel-body > .care-simple-where__from {
  align-items: center;
  color: var(--accent-text);
  font-weight: 650;
  letter-spacing: 0.02em;
}

.care-simple-where .person-panel-body > .care-simple-where__harm {
  color: var(--tone-warn-fg);
}

.care-simple-where__from svg,
.care-simple-where__harm svg {
  flex: none;
  inline-size: 1rem;
  block-size: 1rem;
}

.care-simple-where__harm svg {
  margin-block-start: 0.15em;
}

.care-simple-where__from span,
.care-simple-where__harm span {
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

/* The narrative: one paragraph of up to 600 characters, so it is set for reading, not for filling the column. */
.care-simple-where .person-panel-body > .care-simple-where__words {
  margin-block: 0;
  max-inline-size: 68ch;
  color: var(--fg1);
  font-size: var(--text-base);
  line-height: 1.6;
  overflow-wrap: anywhere;
  text-wrap: pretty;
  min-inline-size: 0;
}

/* The case's one line, in place of the narrative while nothing is written. */
.care-simple-where .person-panel-body > .care-simple-where__line {
  margin-block: 0;
  color: var(--fg1);
  font-size: var(--text-base);
  font-weight: 600;
  overflow-wrap: anywhere;
  min-inline-size: 0;
}

.care-simple-where .person-panel-body > .care-simple-where__state {
  margin-block: 0;
  color: var(--fg2);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
  min-inline-size: 0;
}

/* The fold for a phone: the page's own width decides (a page narrower than two columns shows the narrative's first three lines, the whole paragraph clamped, never cut apart). A wide page shows it all and no toggle. */
.care-simple-where .person-panel-body > .care-simple-where__more {
  display: none;
}

@container care-simple not (min-width: 56rem) {
  .care-simple-where .person-panel-body:has(> .care-simple-where__more:not([open])) > .care-simple-where__words {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
  }

  .care-simple-where .person-panel-body > .care-simple-where__more {
    display: block;
    margin-block: 0;
  }

  .care-simple-where__toggle {
    display: list-item;
    min-block-size: var(--density-chip);
    padding-block: var(--space-1);
    color: var(--accent-text);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
  }

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

  .care-simple-where__show-less,
  .care-simple-where__more[open] .care-simple-where__read-all {
    display: none;
  }

  .care-simple-where__more[open] .care-simple-where__show-less {
    display: inline;
  }
}

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