/* Contributors (#/people) and a contributor's profile: sub-pages of Discover on the V4 catalog layout. */
[data-page="people"] { color: var(--text-primary, #172b25); }
[data-page="people"] > :not(:first-child) { margin-top: 20px; }
[data-page="people"] > .people-back + :not(:first-child) { margin-top: 8px; }
[data-page="people"] h1 { margin: 0; font-size: 40px; font-weight: 700; line-height: 48px; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.people-panel { padding: 24px 32px; border: 1px solid var(--border-light, #e5e7e8); border-radius: 8px; background: var(--bg-card, var(--surface, #fff)); }
.people-back { display: inline-flex; min-height: 44px; align-items: center; gap: 6px; color: var(--link, var(--brand-primary)); font-weight: 600; text-decoration: none; }
.people-back::before { content: "←"; }
.people-back:hover { text-decoration: underline; }
.people-header { display: flex; align-items: center; gap: 24px; }
.people-avatar { display: grid; place-items: center; overflow: hidden; flex: 0 0 88px; width: 88px; height: 88px; border-radius: 50%; background: var(--surface2, #f1f3f3); color: var(--text, #212224); font-size: 30px; font-weight: 600; }
.people-identity { display: grid; gap: 6px; min-width: 0; }
.people-note, .people-scope, .people-list-intro { margin: 0; color: var(--text-secondary, var(--text2, #4d575d)); font-size: 14px; line-height: 20px; }
.people-list-intro { font-size: 16px; line-height: 24px; }
.people-list-header { display: grid; gap: 8px; }
.people-counts { display: flex; flex-wrap: wrap; gap: 24px 48px; margin: 0; padding: 20px 24px; }
.people-counts > div { display: flex; flex-direction: column-reverse; gap: 4px; }
.people-counts dt { color: var(--text-secondary, var(--text2, #4d575d)); font-size: 14px; }
.people-counts dd { margin: 0; font-size: 24px; font-weight: 600; line-height: 32px; }

/* A Microsoft 365 photo fills the round avatar in place of the initials. */
.people-avatar img, .people-person__avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Type filter: chips on the list, tabs with counts on the profile; both toggle buttons. */
.people-types { display: flex; flex-wrap: wrap; gap: 8px; }
.people-type { display: inline-flex; min-height: 40px; align-items: center; gap: 6px; padding: 0 14px; border: 1px solid var(--border-medium, #c9cfd1); border-radius: 999px; background: var(--bg-surface, var(--surface, #fff)); color: var(--text-primary, var(--text, #212224)); font: inherit; font-size: 14px; cursor: pointer; }
.people-type[aria-pressed="true"] { border-color: var(--brand-primary, #315d4a); background: var(--brand-primary-soft, #e8f3ec); color: var(--link, var(--brand-primary, #245647)); font-weight: 600; }
.people-type__count { color: var(--text-secondary, var(--text2, #4d575d)); font-size: 13px; }

.people-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.people-search { flex: 0 1 360px; min-width: 0; min-height: 44px; padding: 0 14px; border: 1px solid var(--border-medium, #c9cfd1); border-radius: 8px; background: var(--bg-surface, var(--surface, #fff)); color: inherit; font: inherit; }
.people-sort { min-height: 44px; margin-inline-start: auto; padding: 0 12px; border: 1px solid var(--border-medium, #c9cfd1); border-radius: 8px; background: var(--bg-surface, var(--surface, #fff)); color: inherit; font: inherit; }

.people-directory { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 20px; }
.people-person { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 20px; border: 1px solid var(--border-light, #e5e7e8); border-radius: 8px; background: var(--bg-card, var(--surface, #fff)); }
.people-person__head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.people-person__avatar { display: grid; overflow: hidden; flex: 0 0 48px; width: 48px; height: 48px; place-items: center; border-radius: 50%; background: var(--surface2, #f1f3f3); color: var(--text, #212224); font-size: 16px; font-weight: 600; }
.people-person__name { min-width: 0; margin: 0; font-size: 18px; line-height: 24px; overflow-wrap: anywhere; }
.people-person__name a { color: inherit; text-decoration: none; }
.people-person__name a:hover { text-decoration: underline; }
.people-person__chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.people-person__chip { padding: 2px 8px; border-radius: 6px; background: var(--surface2, #f1f3f3); color: var(--text-secondary, var(--text2, #4d575d)); font-size: 13px; line-height: 20px; }
.people-person__stat { margin: 0; color: var(--text-secondary, var(--text2, #4d575d)); font-size: 14px; }
.people-person__footer { margin-top: auto; }
.people-person__view { display: inline-flex; min-height: 44px; align-items: center; color: var(--link, var(--brand-primary)); font-weight: 600; text-decoration: none; }
.people-person__view:hover { text-decoration: underline; }

.people-type:focus-visible, .people-search:focus-visible, .people-sort:focus-visible, .people-person a:focus-visible,
.people-card:focus-visible, .people-back:focus-visible, .people-retry:focus-visible { outline: 3px solid var(--brand-primary); outline-offset: 3px; }

/* The Discover contributors line (people-page.js, second part) keeps these; home-discover.css styles it as one panel. */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.people-grid--directory { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.people-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 20px; border: 1px solid var(--border-light, #dce4df); border-radius: 14px; text-decoration: none; color: var(--text-primary, #172b25); background: var(--bg-card, #fff); overflow-wrap: anywhere; }
.people-card:hover { border-color: var(--brand-primary); background: var(--bg-card-hover, var(--bg-card, #fff)); }
.people-card h3 { font-size: 18px; line-height: 1.35; margin: 0; }
.people-card p { font-size: 14px; line-height: 1.5; margin: 0; color: var(--text-secondary, #58675f); }

/* Copy prompt from a profile when the browser refused the first copy: the text and a new Copy button. */
.people-copy-dialog { box-sizing: border-box; width: min(36rem, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 24px; border: 1px solid var(--border-light, #e5e7e8); border-radius: 12px; background: var(--bg-card, var(--surface, #fff)); color: var(--text-primary, #172b25); }
.people-copy-dialog::backdrop { background: rgb(0 0 0 / 45%); }
.people-copy-dialog h2 { margin: 0 0 8px; font-size: 20px; line-height: 28px; }
.people-copy-dialog p { margin: 0 0 12px; color: var(--text-secondary, var(--text2, #4d575d)); font-size: 14px; line-height: 20px; }
.people-copy-dialog textarea { box-sizing: border-box; width: 100%; min-height: 8rem; padding: 10px 12px; border: 1px solid var(--border-medium, #c9cfd1); border-radius: 8px; background: var(--bg-surface, var(--surface, #fff)); color: inherit; font: inherit; font-size: 14px; resize: vertical; }
.people-copy-dialog__status:empty { display: none; }
.people-copy-dialog__status { margin-top: 8px; }
.people-copy-dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 16px; }
.people-copy-dialog button { min-height: 44px; }
.people-copy-dialog :focus-visible { outline: 3px solid var(--brand-primary); outline-offset: 3px; }

.people-status { margin: 0; padding: 8px 0; }
.people-status:empty { display: none; }
/* The paged list (backend #158): how many match, and Show more under the cards. */
.people-list-total { margin: 0; color: var(--text-secondary, var(--text2, #4d575d)); font-size: 14px; line-height: 20px; }
.people-list-total:empty { display: none; }
.people-more { justify-self: start; margin-top: 4px; }
.people-more[hidden] { display: none; }
.people-retry { min-height: 44px; padding: 0 20px; border: 1px solid var(--border-medium, #648271); border-radius: 8px; background: transparent; color: inherit; font: inherit; cursor: pointer; }

@media (max-width: 760px) {
  [data-page="people"] h1 { font-size: 32px; line-height: 40px; }
  .people-panel { padding: 20px; }
  .people-header { align-items: flex-start; gap: 16px; }
  .people-avatar { flex-basis: 56px; width: 56px; height: 56px; font-size: 22px; }
  .people-counts { gap: 24px; }
  .people-search { flex: 1 1 100%; }
  .people-sort { margin-inline-start: 0; }
  .people-directory, .people-grid { grid-template-columns: minmax(0, 1fr); }
}
