/* Simple CARE's story and people (phase 3 of docs/care/README.md): the sender's words under "Why (first name) is here" (Care::Simple::WhyHereComponent, Care::Simple::ReferralWordsComponent) and
   "People around (first name)" (Care::Simple::AboutComponent). Numbered 64s to follow the other simple CARE sheets in the link order.

   Tokens only and logical properties only, so it reads in light and in dark and mirrors in a right-to-left language. Nothing sets a height, and every line of words may wrap (WCAG 1.4.10). */

/* ── Why (first name) is here ────────────────────────────────────────── */

.care-simple-why__frame {
  display: block;
  flex: 1 1 100%;
  min-inline-size: 0;
}

.care-simple-why__said {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  min-inline-size: 0;
}

/* Why the referral cannot wait, above the words: the warn tone's pair with a word and an icon each, so it never rests on color alone. */
.care-simple-why__urgent {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding-block: var(--space-2);
  padding-inline: var(--space-3);
  border-inline-start: 3px solid var(--tone-warn-line);
  border-radius: var(--radius-sm);
  background: var(--tone-warn-bg);
  color: var(--tone-warn-fg);
  font-size: var(--text-sm);
  font-weight: 600;
  list-style: none;
  min-inline-size: 0;
}

.care-simple-why__urgent li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

.care-simple-why__urgent svg {
  flex: none;
  inline-size: 1rem;
  block-size: 1rem;
  margin-block-start: 0.15em;
}

/* The sender's own words, in body type, set off by a rule on the reading side. They are quoted evidence, not the page's voice: the case's next step is the largest thing on the first screen. */
.care-simple-why__quote {
  margin: 0;
  padding-inline-start: var(--space-4);
  border-inline-start: 3px solid var(--rule);
  color: var(--fg1);
  font-size: var(--text-base);
  overflow-wrap: anywhere;
}

.care-simple-why__quote > :first-child {
  margin-block-start: 0;
}

.care-simple-why__quote > :last-child {
  margin-block-end: 0;
}

.care-simple-why__plain {
  white-space: pre-line;
}

.care-simple-why__from,
.care-simple-why__none,
.care-simple-why__loading,
.care-simple-why__unavailable p {
  margin-block: 0;
  color: var(--fg2);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

.care-simple-why__fold {
  flex: 1 1 100%;
  min-inline-size: 0;
}

.care-simple-why__summary {
  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;
}

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

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

.care-simple-why__fold[open] > .care-simple-why__frame {
  margin-block-start: var(--space-2);
}

/* The words folded inside the frame (a case the assistant has summarized): the account opens under its summary with the same gap. */
.care-simple-why__account {
  display: grid;
  gap: var(--space-2);
  min-inline-size: 0;
}

.care-simple-why__fold[open] > .care-simple-why__account {
  margin-block-start: var(--space-2);
}

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

/* ── People around (first name) ─────────────────────────────────────── */
/* Quiet rows (option A of the card styles, 19 Nov 2026): initials, the name and its line, the number and the last contact only where there was one, then a round Call and a round Write. */

.care-simple-about__actions .btn .icon {
  inline-size: 1rem;
  block-size: 1rem;
}

.care-simple-people {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  min-inline-size: 0;
}

.care-simple-people__person {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-block: var(--space-2);
  min-inline-size: 0;
}

.care-simple-people__person + .care-simple-people__person {
  border-block-start: 1px solid var(--rule);
}

.care-simple-people__initials {
  flex: none;
  display: grid;
  place-items: center;
  inline-size: 2.125rem;
  block-size: 2.125rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: var(--text-xs);
  font-weight: 800;
}

.care-simple-people__initials--teacher {
  background: var(--tone-good-bg);
  color: var(--tone-good-fg);
}

.care-simple-people__who {
  flex: 1 1 auto;
  min-inline-size: 0;
}

.care-simple-people__name,
.care-simple-people__role,
.care-simple-people__meta {
  margin-block: 0;
  overflow-wrap: anywhere;
}

.care-simple-people__name {
  color: var(--fg1);
  font-weight: 700;
}

.care-simple-people__role {
  color: var(--fg2);
  font-size: var(--text-sm);
}

.care-simple-people__code {
  color: var(--fg1);
  font-variant-numeric: tabular-nums;
}

.care-simple-people__meta {
  color: var(--fg3);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
}

.care-simple-people__number {
  white-space: nowrap;
}

.care-simple-people__meta .care-simple-about__last {
  color: var(--tone-good-fg);
  font-size: inherit;
  font-weight: 700;
}

.care-simple-people__buttons {
  flex: none;
  display: flex;
  gap: var(--space-2);
}

.care-simple-people__buttons .btn {
  inline-size: 2.25rem;
  block-size: 2.25rem;
  min-inline-size: 0;
  padding: 0;
  border-radius: 50%;
}

.care-simple-people__buttons .icon {
  inline-size: 1.0625rem;
  block-size: 1.0625rem;
}

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

/* When the case was last in touch: the student's line under the ways to reach them, and a person's beside their number. */
.care-simple-about__last {
  margin-block: 0;
  color: var(--tone-good-fg);
  font-size: var(--text-sm);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.care-simple-about__student {
  margin-block: 0;
  color: var(--fg3);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.care-simple-about__actions .phone-number__labelled .icon {
  inline-size: 1rem;
  block-size: 1rem;
}

.care-simple-about__last--none {
  color: var(--fg2);
  font-weight: 400;
}

.care-simple-about__group {
  display: grid;
  gap: var(--space-1);
  padding-block-start: var(--space-3);
  border-block-start: 1px solid var(--rule);
  min-inline-size: 0;
}

.care-simple-about__group-heading {
  margin: 0;
  color: var(--fg2);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Where it began: the referral beside the work, and its side sheet ─────────────── */

.care-simple-began .care-simple-why__said--card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
}

.care-simple-began .care-simple-why__from {
  color: var(--fg2);
  font-size: var(--text-sm);
}

.care-simple-why__quote--clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.care-simple-began__open {
  margin-block-start: var(--space-3);
}

/* The sheet: a native modal dialog held to the trailing edge, the full height of the window. */
.care-referral-sheet {
  position: fixed;
  inset-block: 0;
  inset-inline: auto 0;
  box-sizing: border-box;
  inline-size: min(36rem, 100%);
  max-inline-size: 100%;
  block-size: 100dvh;
  max-block-size: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  border-inline-start: 1px solid var(--rule);
  background: var(--surface-raised);
  color: var(--fg1);
  box-shadow: var(--shadow-lift);
}

.care-referral-sheet::backdrop {
  background: var(--scrim-soft);
}

@media (prefers-reduced-motion: no-preference) {
  .care-referral-sheet:modal { animation: care-referral-sheet-in 0.2s ease-out; }
}

@keyframes care-referral-sheet-in {
  from { transform: translateX(2rem); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.care-referral-sheet__body {
  display: flex;
  flex-direction: column;
  block-size: 100%;
}

.care-referral-sheet__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4, 1rem) var(--space-5, 1.5rem) var(--space-3);
  border-block-end: 1px solid var(--rule);
}

.care-referral-sheet__eyebrow,
.care-referral-sheet__label {
  margin: 0;
  color: var(--fg2);
  font-family: var(--font-sans);
  font-size: var(--text-xs, 0.75rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.care-referral-sheet__title {
  margin: var(--space-1) 0 0;
  font-size: var(--text-lg, 1.25rem);
}

.care-referral-sheet__close { margin: 0; }

.care-referral-sheet__scroll {
  flex: 1 1 auto;
  min-block-size: 0;
  overflow-y: auto;
  padding: var(--space-4, 1rem) var(--space-5, 1.5rem) var(--space-5, 1.5rem);
  overflow-wrap: anywhere;
}

.care-referral-sheet__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-5, 1.5rem);
}

.care-referral-sheet__rest {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* A preview draws the sheet open in place, inside its card, with no window to hold it to. */
.care-referral-sheet--in-place[open] {
  position: static;
  block-size: auto;
  max-block-size: none;
  margin-block-start: var(--space-3);
  border: 1px solid var(--rule);
  box-shadow: none;
}

/* "Read the referral" under the line: only on a phone, where Where it began is at the foot of the page. */
.care-simple-why__open { display: none; }

@container care-simple not (min-width: 56rem) {
  .care-simple-why__open {
    display: inline-flex;
    margin-block-start: var(--space-2);
  }
}

/* This term's teachers, folded under their heading with how many classes and a chevron that turns when it opens. */
.care-simple-about__fold > summary {
  list-style: none;
}

.care-simple-about__fold > summary::-webkit-details-marker {
  display: none;
}

.care-simple-about__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1) var(--space-2);
  min-block-size: var(--target-min);
  cursor: pointer;
}

.care-simple-about__count {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--fg2);
  font-size: var(--text-sm);
}

.care-simple-about__chevron {
  inline-size: 1rem;
  block-size: 1rem;
  transition: transform 150ms ease;
}

.care-simple-about__fold[open] .care-simple-about__chevron {
  transform: rotate(90deg);
}

[dir="rtl"] .care-simple-about__chevron {
  transform: scaleX(-1);
}

[dir="rtl"] .care-simple-about__fold[open] .care-simple-about__chevron {
  transform: rotate(90deg);
}

@media (prefers-reduced-motion: reduce) {
  .care-simple-about__chevron {
    transition: none;
  }
}
