/* People of the New Testament (/people). Tokens from questions.css and atlas.css, the two-pane frame from books.css,
   the profile card from family.css. Only what is new is here: the faces in the hero, the search, the group pills, the tiles. */

/* hero: twelve faces beside the title */
.faces{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:clamp(6px,.8vw,10px); padding:clamp(8px,1vw,12px);
  background:var(--card); border:1px solid var(--rule); border-radius:var(--r-card); box-shadow:var(--shadow-card)}
.faces .av{display:block; width:100%; height:auto; aspect-ratio:1; object-fit:cover; border-radius:12px; background:var(--paper-3)}
.ppl-hero h1{max-width:12ch}

/* the search and the groups */
.ppl-sec .wrap{display:grid; gap:clamp(16px,2vw,24px)}
.finder{display:grid; gap:14px; padding:clamp(16px,2vw,24px); background:var(--card); border:1px solid var(--rule);
  border-radius:var(--r-card); box-shadow:var(--shadow-pill)}
html:not(.js) .finder{display:none}
.field{display:grid; gap:8px}
.field label{font:600 11.5px/1.4 var(--f-mono); letter-spacing:.16em; text-transform:uppercase; color:var(--ink-2)}
.field input{width:100%; min-height:52px; padding:0 22px; border-radius:999px; border:1.5px solid var(--rule-2); background:var(--paper);
  color:var(--ink); font:500 17px/1.2 var(--f-body); -webkit-appearance:none; appearance:none; transition:border-color .18s}
.field input::placeholder{color:var(--muted); opacity:1}
.field input:hover{border-color:var(--ox)}
.field input:focus-visible{outline:3px solid var(--gold-deep); outline-offset:2px; border-color:var(--ink)}
.pills{display:flex; flex-wrap:wrap; gap:8px}
.pill{display:inline-flex; align-items:center; min-height:44px; padding:0 16px; border-radius:999px; border:1.5px solid var(--rule-2);
  background:var(--paper); color:var(--ink-2); font:600 13.5px/1.2 var(--f-body); cursor:pointer; transition:background .18s, color .18s, border-color .18s}
.pill:hover{border-color:var(--ox); color:var(--ox)}
.pill:focus-visible{outline:3px solid var(--gold-deep); outline-offset:2px}
.pill[aria-pressed="true"]{background:var(--ink); border-color:var(--ink); color:var(--paper)}
.count{margin:0; font:600 11.5px/1.4 var(--f-mono); letter-spacing:.14em; text-transform:uppercase; color:var(--ox)}
.ppl-sec [hidden]{display:none !important}

/* the list: a tile for each person, group by group */
.plist{display:grid; gap:clamp(18px,2.2vw,26px); padding:clamp(16px,2.2vw,28px); background:var(--card); border:1px solid var(--rule);
  border-radius:var(--r-card); box-shadow:var(--shadow-card); scroll-margin-top:84px; min-width:0}
.plist .hint{margin:0; color:var(--ink-2); font-size:15px}
html:not(.js) .plist .hint{display:none}
.pgrp{display:grid; gap:10px; padding:0}
.pgrp h3{font-family:var(--f-mono); font-size:11.5px; line-height:1.4; letter-spacing:.16em}
.pgrp .gn{color:var(--muted); margin-inline-start:6px}
.pgrid{list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fill,minmax(128px,1fr)); gap:8px}
.pt{display:grid; justify-items:center; align-content:start; gap:5px; height:100%; min-height:44px; padding:14px 8px 12px; text-align:center;
  border-radius:14px; border:1px solid var(--rule); background:var(--paper); color:var(--ink); text-decoration:none;
  transition:background .18s, color .18s, border-color .18s, transform .18s var(--ease-out)}
.pt .av{width:72px; height:72px; border-radius:50%; object-fit:cover; background:var(--paper-3); border:2px solid var(--card);
  box-shadow:0 0 0 1px var(--rule); margin-bottom:3px}
.pt .n{font:600 14.5px/1.22 var(--f-body); text-wrap:balance}
.pt .r{font:500 12.5px/1.35 var(--f-body); color:var(--ink-2); text-wrap:balance}
.pt:hover{border-color:var(--ox); transform:translateY(-1px)}
.pt:focus-visible{outline:3px solid var(--gold-deep); outline-offset:2px}
.js .pt[aria-current="true"]{background:var(--ink); border-color:var(--ink); color:var(--paper)}
.js .pt[aria-current="true"] .r{color:var(--paper)}
.nores{margin:0; padding:18px 4px; font-size:16px; line-height:1.5; color:var(--ink-2)}

/* a person with no painting yet: the initial on a paper circle */
.av.mono{display:grid; place-items:center; background:var(--paper-3); color:var(--ink-2); font:400 30px/1 var(--f-display)}
.pf .av.mono{font-size:clamp(40px,5vw,56px)}
.faces .av.mono{font-size:clamp(28px,4vw,48px)}

/* the profile */
.grp-of{margin:-8px 0 0; font:600 10.5px/1.4 var(--f-mono); letter-spacing:.14em; text-transform:uppercase; color:var(--muted)}
.ppl-sec .sources-f{margin-top:clamp(8px,2vw,24px)}
@media (min-width:861px){
  /* the list is long, so the profile beside it scrolls inside its own frame */
  .js .ppl .books{max-height:calc(100vh - 100px); overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin;
    margin:-6px -10px -30px; padding:6px 10px 40px}
}
@media (max-width:860px){
  /* on a phone the chosen profile opens above the list, and the list stays where it is */
  .js .ppl .books{order:-1; scroll-margin-top:76px}
  .js .ppl .books:not(:has(.sel)){display:none}
}
@media (max-width:560px){
  .faces .av:nth-child(n+9){display:none}
  .pgrid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .plist{padding:16px 12px}
  .finder{padding:16px 14px}
  /* the groups in one row that slides sideways inside the search box, so the list starts sooner */
  .pills{flex-wrap:nowrap; overflow-x:auto; margin:0 -14px; padding:3px 14px 6px; scrollbar-width:none; -webkit-overflow-scrolling:touch}
  .pills::-webkit-scrollbar{display:none}
  .pill{flex:none}
}
@media (max-width:340px){ .pgrid{grid-template-columns:1fr} }
@media (prefers-reduced-motion: reduce){
  .pt,.pill,.field input{transition:none}
  .pt:hover{transform:none}
}

/* Arabic: tracked letters would pull joined letters apart */
[dir="rtl"] .field label,[dir="rtl"] .count,[dir="rtl"] .pgrp h3,[dir="rtl"] .grp-of{letter-spacing:0}
