/* Person (suspect file) test page (stage 3, 9 Oct 2026). Page-only styles on top of shared/ratc.css.
   One page for all 40 people, chosen by its address (person.html#leon-black). Her mugshot, a SUSPECT or
   PERSON OF INTEREST stamp, her lead, then the record: every piece on the person's live page in the order
   the events happened (her year headings), each tagged with its investigation; then her connection boards,
   each with the red string between the two names. */

/* ---------- 1. Opening ---------------------------------------------------- */
.pe-open { padding-block: clamp(3rem, 6vw, 5rem); }
.pe-open__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px clamp(32px, 5vw, 64px); align-items: center; }
.pe-open__art { margin: 0; aspect-ratio: 3 / 2; --lamp-x: 50%; --lamp-y: 20%; }
.pe-open__art > img { width: 100%; height: 100%; object-fit: cover; }
.pe-open__text { display: grid; gap: 14px; justify-items: start; min-width: 0; }
.pe-kick { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.pe-kick a { color: var(--label); text-decoration-color: var(--accent); text-underline-offset: .25em; }
.pe-name { margin: 0; }
.pe-lead { margin: 0; max-width: 52ch; }
.pe-count { margin: 0; }

/* ---------- 2. The record --------------------------------------------------- */
.pe-rec__h { margin: 0 0 1rem; }
.pe-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1.75rem; }
.pe-chip { min-height: 40px; }
.rec { list-style: none; border-top: 2px solid var(--bone); }
.rec__yr { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 0 24px; padding: 16px 0; border-bottom: 1px solid var(--dusk-violet); }
.rec__yr[hidden] { display: none; }
.rec__y { margin: 0; font: 400 clamp(1.5rem, 1.2rem + 1vw, 2.25rem)/1 var(--font-display); color: var(--display); }
.rec__items { list-style: none; display: grid; gap: 12px; }
.rec__it { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.rec__it[hidden] { display: none; }
.rec__a { font: 700 1.1875rem/1.3 var(--font-body); color: var(--cream); text-decoration: none; text-wrap: pretty; }
.rec__a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .18em; }
.rec__tag { color: var(--text); text-decoration: none; white-space: nowrap; }
a.rec__tag:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.pe-empty { margin: 1rem 0 0; }

/* ---------- 3. Connections --------------------------------------------------- */
.pe-con__line { margin: .75rem 0 1.75rem; max-width: 52ch; }
.cns { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.cn__a { display: grid; gap: 14px; height: 100%; padding: 20px 22px 22px; border: 2px solid var(--cream); color: var(--text); text-decoration: none; }
.cn__a:hover { background: rgb(14 8 13 / .25); }
.cn__pair { position: relative; display: flex; justify-content: space-between; gap: 40px; padding-bottom: 30px; }
.cn__n { position: relative; z-index: 1; padding: 6px 10px; border: 2px solid var(--bone); background: var(--ground);
  font: 400 clamp(1.125rem, 1rem + .4vw, 1.375rem)/1 var(--font-display); text-transform: uppercase; color: var(--display); }
.cn__t { font-size: 1rem; line-height: 1.5; }
.cn__a:hover .cn__n { border-color: var(--mustard); }

/* ---------- 4. More ------------------------------------------------------------ */
.pe-more__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 24px; }
.pe-more__prev::after { content: none; }
.pe-more__prev::before { content: "\2190"; text-decoration: none; display: inline-block; }

/* ---------- Motion: a new person folds in over the last (same-page folder open) ---------- */
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion="still"]) .pe-open__grid { view-transition-name: pe-head; }
}

@media (max-width: 899px) {
  .pe-open__grid { grid-template-columns: minmax(0, 1fr); }
  .pe-open__art { margin-inline: calc(-1 * var(--gutter) + 6px); }
  .pe-chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px; scrollbar-width: none; }
  .pe-chip { flex: none; }
  .rec__yr { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .pe-more__row { justify-content: center; }
}
