/* ==========================================================================
   Content pages: about, projects, legal, news, get involved and the
   member's account pages. Loaded by those pages only, as their second
   stylesheet (site.css holds the tokens and the shared parts). Same rules
   as site.css: logical properties, colour tokens only, targets at least
   44 px, no scripts.
   ========================================================================== */

/* --- About, projects, legal ---------------------------------------------- */

/* One section of a page (About, Membership): a card. */
.page-block {
  margin-block: 0 24px;
  padding: clamp(20px, 13.84px + 1.573vw, 36px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  max-inline-size: calc(var(--measure) + 72px); /* the card hugs its text column */
}
#board.page-block { max-inline-size: none; } /* the board's grid stays wide */
.page-block > h2 {
  margin-block-end: 16px;
  color: var(--brand);
  font-size: 30px;
}
/* A page's own Markdown headings sit below the block heading. */
.page-block .prose h2:first-child { margin-block-start: 0; }
.page-block .prose > :last-child { margin-block-end: 0; }

/* Projects: one card per project. */
.project-list {
  display: grid;
  gap: 20px;
  max-inline-size: 880px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.project-list__item {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.project-list__title {
  margin-block-end: 6px;
  font-size: 28px;
}
.project-list__title a {
  display: inline-block;
  min-block-size: var(--target);
  color: var(--brand);
  text-decoration: none;
}
.project-list__title a:hover { color: var(--brand-2); text-decoration: underline; }
.project-list__excerpt {
  max-inline-size: var(--measure);
  margin: 0;
  color: var(--body);
}

/* Partners and sponsors (the About page, and a conference's page by level): each logo on a
   light plate in both schemes, so a logo drawn for a white page stays visible in the dark one. */
.partner-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* The logo (or the name), then the description under it. */
.partner-list__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-inline-size: 0;
  max-inline-size: 100%;
}
.partner-list__link {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--target);
  max-inline-size: 100%;
}
.partner-list__name {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--target);
  max-inline-size: 100%;
  overflow-wrap: anywhere;
}
.partner-list__plate {
  display: block;
  padding: 8px;
  background: var(--on-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  max-inline-size: 100%;
  color: var(--deep); /* the logo's name, shown in its place when its file cannot be read */
}
.partner-list__logo {
  display: block;
  inline-size: 200px;
  block-size: 72px;
  max-inline-size: 100%;
  object-fit: contain;
  overflow-wrap: anywhere;
}
/* Larger logos for higher levels (a conference's page). */
.partner-list--diamond .partner-list__logo { inline-size: 240px; block-size: 96px; }
.partner-list--platinum .partner-list__logo { inline-size: 200px; block-size: 80px; }
.partner-list--gold .partner-list__logo { inline-size: 160px; block-size: 64px; }
.partner-list--silver .partner-list__logo { inline-size: 128px; block-size: 52px; }
.partner-list__description {
  max-inline-size: 240px; /* at most the widest logo box */
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
/* Staff text is isolated: a direction mark or override in it never reorders the text around it. */
.partner-list bdi { unicode-bidi: isolate; }

/* --- News: the list and one item ------------------------------------------ */
.news-list {
  display: grid;
  gap: 24px;
  max-inline-size: 880px;
}
.news-detail__image {
  display: block;
  /* Same width as the text column: --measure is in em, so the image takes
     the .prose font size. */
  font-size: 19px;
  max-inline-size: min(100%, var(--measure));
  block-size: auto;
  margin-block-end: 24px;
  border-radius: var(--radius);
}

/* --- Get involved: three cards; the donate page's headings ---------------- */
.involve-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.involve-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-card);
}
.involve-card h2 { margin: 0; color: var(--brand); font-size: 28px; }
.involve-card p { margin: 0; color: var(--body); flex: 1; }

.form-heading { margin-block: 40px 8px; color: var(--brand); font-size: 30px; }
.donate-instructions { margin-block-end: 8px; }

/* --- Account: the overview as a card of rows ------------------------------ */
.account-details {
  max-inline-size: 40em;
  margin: 0;
  padding-inline: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.account-details__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  padding-block: 14px;
  border-block-end: 1px solid var(--line);
}
.account-details__row:last-child { border-block-end: 0; }
.account-details dt {
  flex: 0 0 12em;
  color: var(--muted);
  font-weight: 600;
}
.account-details dd { flex: 1 1 14em; min-inline-size: 0; margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.account-details__state { margin-inline: 8px; color: var(--body); font-weight: 600; }
.account-details__action { margin-block-start: 8px; }
.account-details__pending { margin: 8px 0 0; color: var(--ink); font-weight: 600; }
.account-subtitle { margin-block: 48px 8px; color: var(--brand); font-size: 28px; }
/* A line under the details card (the account overview's "Report a problem"). */
.account-details-after { margin-block: 24px 0; max-inline-size: 40em; }

@media (max-width: 759.98px) {
  .page-block > h2,
  .project-list__title { font-size: 24px; }
  .news-detail__image { font-size: 17px; } /* the phone .prose size */
  .account-details { padding-inline: 16px; }
}

/* The member's payments table scrolls inside its own box (a focusable region named by its
   heading), never the page: four columns of dates, references and amounts do not fit in 320 px.
   The table stays a table for screen readers; the reference is never broken. */
.table-scroll { max-inline-size: 100%; overflow-x: auto; }
.payments__reference { white-space: nowrap; }

/* The board inside its About block: the members are not cards inside a card, only a grid. */
.page-block .board-card { padding: 0; border: 0; box-shadow: none; background: none; }
.page-block .board-list { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* --- Mentorship: the lines of a programme's card -------------------------- */
.mentor-list__meta,
.mentor-list__state { margin: 0 0 4px; }
.mentor-list__state { font-weight: 600; }

/* --- Teaching cases: the intro, the filter, the actions and each card's links --- */
.case-intro { max-inline-size: var(--measure); }
.case-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.case-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  align-items: end;
  max-inline-size: 880px;
  margin-block: 24px;
}
.case-filter .field { flex: 1 1 220px; }
.case-filter__button { margin-block: 0 20px; }
.case-card__actions { margin-block: 16px 0; }
/* An opinion's key images, then its author's Remove: the buttons' usual gap between them. */
.case-card__actions + .case-actions { margin-block-start: 12px; }
.case-card__report { margin: 0; }
.case-card__report a { display: inline-flex; align-items: center; min-block-size: var(--target); }

/* --- Second opinions: the opinions and comments under a request ---------- */
.opinion-section { margin-block-start: 32px; }
.opinion-section__title { font-size: 24px; }
.opinion-thread { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.opinion-thread__item {
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.opinion-thread__head { margin: 0 0 8px; font-size: 18px; }
.opinion-thread__item p { max-inline-size: var(--measure); }
.opinion-section__form-title { margin-block: 32px 12px; font-size: 20px; }

/* --- For patients: the leaflets, grouped by kind of study ---------------- */
.leaflet-group + .leaflet-group { margin-block-start: 40px; }
/* Staff text: a long word or address breaks rather than widening the page at 320 px. */
.leaflet__title, .leaflet__text { overflow-wrap: anywhere; }
/* Staff text is isolated: a direction mark or override in it never reorders the text around it. */
.leaflet__title, .leaflet__text, .leaflet bdi { unicode-bidi: isolate; }
.leaflet__date { margin-block: 4px 12px; color: var(--body); }

/* --- Resources: the filters and each resource's row ------------------------ */
.resource-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  align-items: end;
  max-inline-size: 880px;
  margin-block: 24px;
}
.resource-filters .field { flex: 1 1 220px; }
.resource-filters__button { margin-block: 0 20px; }
/* Staff text: a long word or address breaks rather than widening the page at 320 px. */
.resource__title, .resource__text, .resource__site { overflow-wrap: anywhere; }
/* Staff text is isolated: a direction mark or override in it never reorders the text around it. */
.resource__title, .resource__text, .resource bdi { unicode-bidi: isolate; }
.resource__text { margin-block: 0 4px; }
.resource__meta { color: var(--body); margin-block: 4px 12px; }
.resource__site { margin-block: 0 12px; }
.resource__members { margin-block: 0; font-weight: 600; }

/* Sponsors are shown on screen only, never on paper (owner, 24 November 2026). */
@media print {
  #sponsors { display: none; }
}
