/* Native Person Card contract, shared with Gutenberg.
 * Apply Cover's Person Card style. A heading is the primary name; the explicit
 * role paragraph is secondary. The RC8 two-Paragraph variant uses its existing
 * block order: role first, name second. Nothing is inferred from the text.
 * Core owns images, focal points, overlays, links and authored typography.
 */
.wp-block-cover.is-style-person-card {
  align-items: flex-end;
  justify-content: flex-start;
  width: 100%;
  max-width: 24rem;
  min-width: 0;
  min-height: 22rem;
  height: auto;
  aspect-ratio: 4 / 5;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--wp--preset--color--brand-dark) 18%, transparent);
  border-radius: 4px;
  color: var(--wp--preset--color--white);
  background-color: var(--wp--preset--color--brand-dark);
  box-shadow: 0 .2rem .65rem color-mix(in srgb, var(--wp--preset--color--brand-dark) 8%, transparent);
  text-align: start;
}
/* Do not restyle .wp-block-cover__image-background: object-position belongs to
 * the saved Cover focal point. The gradient is an independent decorative layer.
 */
.wp-block-cover.is-style-person-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, transparent 35%, rgb(0 0 0 / .12) 56%, rgb(0 0 0 / .7));
  pointer-events: none;
}
.wp-block-cover.is-style-person-card .wp-block-cover__inner-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  min-width: 0;
  min-height: 9.5rem;
  margin: 0;
  padding: 1.1rem 1.15rem 1.2rem;
  flex: 0 1 100%;
  max-width: 100%;
  color: var(--wp--preset--color--white);
  text-align: start;
  /* Shared minimum depth aligns ordinary roles; longer roles grow the text
   * zone and the card. No fixed height, clipping, line clamp or JS measurement.
   */
  background: linear-gradient(180deg, rgb(0 0 0 / .76), rgb(0 0 0 / .93));
}
.wp-block-cover.is-style-person-card .wp-block-cover__inner-container::before {
  content: "";
  display: block;
  flex: 0 0 auto;
  width: 1.5rem;
  height: 2px;
  margin-block-end: .7rem;
  background: var(--wp--preset--color--accent);
}
.wp-block-cover.is-style-person-card .wp-block-cover__inner-container > :is(p, h1, h2, h3, h4, h5, h6) {
  max-width: 100%;
  margin-block: 0;
  color: inherit;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: manual;
  text-wrap: pretty;
}
.wp-block-cover.is-style-person-card .wp-block-cover__inner-container > p:not(:where([class*="-font-size"], [style*="font-size"], [class*="-font-size"] *, [style*="font-size"] *)) {
  font-size: .875rem;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
}
.wp-block-cover.is-style-person-card .wp-block-cover__inner-container > :is(h1, h2, h3, h4, h5, h6):not(:where([class*="-font-size"], [style*="font-size"], [class*="-font-size"] *, [style*="font-size"] *)),
.wp-block-cover.is-style-person-card .wp-block-cover__inner-container:has(> p:first-child + p:last-child) > p:last-child:not(:where([class*="-font-size"], [style*="font-size"], [class*="-font-size"] *, [style*="font-size"] *, .bwcet-person-cover__role)) {
  font-size: 1.25rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -.02em;
}
.wp-block-cover.is-style-person-card .wp-block-cover__inner-container > * + * { margin-block-start: .45rem; }
.wp-block-cover.is-style-person-card .wp-block-cover__inner-container a { color: inherit; text-decoration: underline; text-underline-offset: .18em; }

/* Four tracks at a useful portrait size, then three, two and one according to
 * available container width. auto-fill preserves incomplete-row card widths.
 * The explicit People composition and a safe structure-only compatibility
 * marker share one implementation. Native Grid's selected 2/3 count is retained.
 */
:is(.entry-content:not(.site-footer__content), .editor-styles-wrapper) .bwcet-compatible-people-grid {
  --bwcet-people-count: 4;
  --bwcet-people-gap: 1.5rem;
  display: grid;
  gap: var(--bwcet-people-gap);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, max(15.75rem, calc((100% - (var(--bwcet-people-count) - 1) * var(--bwcet-people-gap)) / var(--bwcet-people-count)))), 1fr));
  align-items: stretch;
}
:is(.entry-content:not(.site-footer__content), .editor-styles-wrapper) .bwcet-compatible-people-grid.bwcet-people-grid-2 { --bwcet-people-count: 2; }
:is(.entry-content:not(.site-footer__content), .editor-styles-wrapper) .bwcet-compatible-people-grid.bwcet-people-grid-3 { --bwcet-people-count: 3; }
.bwcet-compatible-people-grid > .wp-block-column { display: flex; min-width: 0; }
.bwcet-compatible-people-grid > .wp-block-column > .wp-block-cover.is-style-person-card,
.bwcet-compatible-people-grid > .wp-block-cover.is-style-person-card { max-width: none; margin: 0; flex: 1; }
/* Shared CSS reaches the editable native block wrappers. Keep media selectors,
 * placeholders and appenders usable; no replacement cards or custom editor UI.
 */
.editor-styles-wrapper .wp-block-cover.is-style-person-card .components-placeholder { min-width: 0; max-width: 100%; color: var(--wp--preset--color--ink); background: var(--wp--preset--color--paper); }
.editor-styles-wrapper .wp-block-cover.is-style-person-card .components-placeholder__fieldset { min-width: 0; max-width: 100%; flex-wrap: wrap; }
@media (forced-colors: active) {
  .wp-block-cover.is-style-person-card { color: CanvasText; background: Canvas; border: 1px solid CanvasText; box-shadow: none; }
  .wp-block-cover.is-style-person-card::after { display: none; }
  .wp-block-cover.is-style-person-card .wp-block-cover__inner-container { color: CanvasText; background: Canvas; }
  .wp-block-cover.is-style-person-card .wp-block-cover__inner-container::before { background: CanvasText; }
}
@media print {
  .wp-block-cover.is-style-person-card { min-height: 0; aspect-ratio: auto; height: auto; color: #000; background: #fff; border: 1px solid #777; box-shadow: none; break-inside: avoid; }
  .wp-block-cover.is-style-person-card::after { display: none; }
  .wp-block-cover.is-style-person-card .wp-block-cover__inner-container { min-height: 0; color: #000; background: #fff; }
}
