/* ============================================================
   Meet the Crew (crew.html), 2026-11-23.
   1) The stage: a COPY of the "Peptide Team stage" block of assets/home.css (the homepage's own stage, driven by assets/team.js), changed from two
      rows of nine to THREE rows of eight (Alex's plan: 17 = 9+8, 23 = 8+8+7, three rows from 18 on). home.css belongs to another thread, so it is copied, not
      edited; when that thread is done, move the block into one shared file and delete this copy.
   2) The library: search, area filter result line, grouped list.
   ============================================================ */
:root{
  --hp-ink:#2F024E; --hp-gold:#CD9423; --hp-gold-hi:#F1CB6A; --hp-gold-ink:#8A5E06;
  --ease-out:cubic-bezier(.23,1,.32,1);
}

/* ---------- the stage ---------- */
.pt-q{font-size:clamp(21px,2.4vw,27px); font-weight:800; line-height:1.2; color:var(--ink); text-align:center; margin:4px 0 16px;}
.pt-goals{display:flex; flex-wrap:wrap; justify-content:center; gap:10px; max-width:1200px; margin:0 auto 24px;}
.pt-goals button{flex:0 0 140px; font:inherit; font-size:14.5px; font-weight:700; line-height:1.2; color:var(--ink); background:#fff; border:1.5px solid var(--line); border-radius:22px; padding:11px 8px;
  text-align:center; cursor:pointer; transition:background .2s ease, color .2s ease, border-color .2s ease, transform .16s var(--ease-out);}
.pt-goals button:active{transform:scale(.97);}
.pt-goals button:hover{border-color:var(--gold);}
.pt-goals button[aria-pressed="true"]{background:var(--ink); color:#fff; border-color:var(--ink);}
.pt-goals button:focus-visible,.pt-char:focus-visible,.pt-big:focus-visible,.crew-new:focus-visible,.crew-hi:focus-visible,.crew-search input:focus-visible,.crew-clear:focus-visible{outline:3px solid var(--hp-gold); outline-offset:2px; border-radius:14px;}
.pt-stage{position:relative; border-radius:28px; padding:26px 12px 16px; background:radial-gradient(92% 72% at 50% 100%, #E7D9F7 0, #F2EAFB 46%, rgba(250,248,252,0) 80%);}
.pt-hint{text-align:center; font-size:14.5px; font-weight:600; color:var(--text-mute); margin:0 0 18px;}
.pt-sec:not(.pt-on) .pt-hint,.pt-sec:not(.pt-on) .pt-goals,.pt-sec:not(.pt-on) .pt-q{display:none;}        /* no script: a plain grid of links */
.pt-crew{--fh:clamp(96px,11.4vw,150px); display:flex; flex-wrap:wrap; justify-content:center; align-items:flex-end; transition:opacity .3s ease, filter .3s ease;}
.pt-char{position:relative; flex:0 0 12.2%; min-width:0; display:flex; flex-direction:column; align-items:center; color:var(--ink); text-align:center; padding-bottom:6px;
  -webkit-tap-highlight-color:transparent; transition:opacity .3s ease, filter .3s ease;}
.pt-char:hover{color:var(--ink);}
/* three rows, eight to a row: back row, middle row and front row each half a step forward and between the ones behind */
.pt-char:nth-child(-n+8){z-index:1;}
.pt-char:nth-child(n+9):nth-child(-n+16){z-index:2; margin-top:-1.4%;}
.pt-char:nth-child(n+17){z-index:3; margin-top:-1.4%;}
.pt-fig{position:relative; display:flex; align-items:flex-end; justify-content:center; width:100%; height:calc(var(--fh) * var(--k,1));
  transform-origin:50% 100%; transition:transform .25s cubic-bezier(.2,.9,.3,1.3);}
.pt-char:nth-child(-n+8) .pt-fig{height:calc(var(--fh) * var(--k,1) * .97);}   /* 2026-11-24: rows differ by only 3% (was .8 / .9): Alex wants every character within 5-10% of the others */
.pt-char:nth-child(n+9):nth-child(-n+16) .pt-fig{height:calc(var(--fh) * var(--k,1) * .985);}
.pt-fig::before{content:""; position:absolute; left:16%; right:16%; bottom:-5px; height:12px; border-radius:50%; z-index:-1;
  background:radial-gradient(closest-side, rgba(47,2,78,.2), rgba(47,2,78,0));}
.pt-wob{position:relative; display:flex; align-items:flex-end; justify-content:center; height:100%; transform-origin:50% 100%;
  animation:ptSway var(--st,5.4s) ease-in-out infinite calc(var(--i,0) * -.73s), ptBreathe var(--bt,3.6s) ease-in-out infinite calc(var(--i,0) * -.41s);
  filter:drop-shadow(0 4px 4px rgba(47,2,78,.14));}
.pt-fig img{height:100%; width:auto; max-width:none; display:block; transform-origin:50% 100%; transition:opacity .22s linear;}
.pt-fig canvas{position:absolute; left:50%; bottom:0; height:100%; aspect-ratio:var(--ar,1); transform:translateX(-50%); opacity:0; mix-blend-mode:plus-lighter; transition:opacity .22s linear;}
.pt-char.live .pt-fig canvas{opacity:1; transition-duration:.16s;}
.pt-fig canvas[hidden]{display:none;}
.pt-char b{font-size:13px; font-weight:800; margin-top:6px; line-height:1.15; max-width:100%; text-align:center; text-wrap:balance;}   /* a long name ("Thymosin Alpha-1") wraps under its own character instead of running into the next one */
.pt-char i{font-style:normal; font-size:13px; font-weight:600; color:var(--text-mute); line-height:1.25;}
.pt-on .pt-char i{display:none;}
@media (hover:hover) and (pointer:fine){
  .pt-on .pt-char:hover{z-index:4;}
  .pt-on .pt-char:hover .pt-fig{transform:translateY(-5%) scale(1.16);}
  .pt-on .pt-char:hover b{color:var(--gold-ink);}
}
.pt-char.dim{opacity:.26; filter:grayscale(.5);}
.pt-char.match{z-index:4;}
.pt-char.match .pt-fig{transform:translateY(-4%) scale(1.1);}
.pt-char.match b{color:var(--gold-ink);}
.pt-char.match .pt-fig::after{content:""; position:absolute; left:12%; right:12%; bottom:-7px; height:16px; border-radius:50%; z-index:-1;
  background:radial-gradient(closest-side, rgba(241,203,106,.95), rgba(241,203,106,0));}
.pt-char.on{opacity:.22;}
.pt-char.live .pt-fig img{opacity:0; transition-duration:.16s;}
@keyframes ptSway{0%,100%{transform:skewX(-1.5deg) rotate(-.5deg);} 50%{transform:skewX(1.5deg) rotate(.5deg);}}
@keyframes ptBreathe{0%,100%{scale:1 1;} 50%{scale:.986 1.02;}}
.pt-open .pt-char{opacity:.3; filter:saturate(.6);}
.pt-open .pt-char.match{opacity:.92; filter:none;}
.pt-open .pt-char.on{opacity:.16;}
.pt-spot{position:absolute; inset:0; z-index:6; display:flex; align-items:flex-end; justify-content:center; gap:16px; padding:0 4% 14px; pointer-events:none;}
.pt-spot[hidden]{display:none;}
.pt-big{position:relative; display:block; flex:0 0 auto; height:calc(min(80%,340px) * var(--bk,1)); pointer-events:auto; filter:drop-shadow(0 14px 12px rgba(47,2,78,.25));}
.pt-big img{height:100%; width:auto; max-width:none; display:block; transform-origin:50% 100%;}
.pt-big canvas{position:absolute; left:50%; bottom:0; height:100%; width:auto; transform:translateX(-50%);}
.pt-big canvas[hidden]{display:none;}
.pt-big.talk img{animation:ptTalk .52s ease-in-out 5;}
@keyframes ptTalk{0%,100%{transform:none;} 50%{transform:translateY(-2.5%) scale(1.02,.985) rotate(-1.5deg);}}
.pt-card{position:relative; pointer-events:auto; align-self:center; width:min(340px,46%); background:var(--hp-ink); color:#fff; border-radius:20px; padding:18px 20px;
  box-shadow:0 22px 40px -16px rgba(0,0,0,.55); animation:ptCard .3s var(--ease-out) .15s both;}   /* ease-out, no overshoot: the card is information, not a toy */
@keyframes ptCard{from{opacity:0; transform:translateY(10px) scale(.95);} to{opacity:1; transform:none;}}
.pt-card::after{content:""; position:absolute; left:-11px; top:50%; width:12px; height:18px; margin-top:-9px; background:var(--hp-ink); clip-path:polygon(100% 0,100% 100%,0 50%);}
.pt-name{display:block; font-size:21px; font-weight:800; color:var(--hp-gold-hi); line-height:1.1; padding-right:30px;}
.pt-role{display:block; font-style:normal; font-size:13px; font-weight:700; color:#CDBBE3; margin:5px 0 10px;}
.pt-line{margin:0 0 14px; font-size:15.5px; font-weight:600; line-height:1.45;}
.pt-card .pt-go{font-size:13.5px;}
.pt-x{position:absolute; top:10px; right:10px; width:28px; height:28px; border-radius:50%; border:0; background:rgba(255,255,255,.14); color:#fff; cursor:pointer; display:grid; place-items:center;}
.pt-x svg{display:block;}
.crew-hero p{font-size:18px; line-height:1.5; max-width:60ch;}   /* the page name alone says little, so the line under it says what the page is, at reading size */
.pt-x:hover{background:rgba(255,255,255,.3);}
@media (max-width:700px){
  .pt-goals{gap:8px; margin-bottom:16px;}
  .pt-goals button{flex:0 0 calc((100% - 16px) / 3); font-size:13.5px; padding:10px 4px;}
  .pt-stage{padding:16px 0 10px; margin:0 -20px; border-radius:0;}
  .pt-char{flex:0 0 33.33%;}
  .pt-char:nth-child(n+9){margin-top:0;}
  /* with the script: the whole crew in a grid, four across (2026-11-24: a sideways strip shows two or three of 24); the visitor scrolls down. --po = the order, so a topic's characters stand together */
  .pt-on .pt-crew{--fh:min(82px, 21.9vw); display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-items:end; gap:20px 0; padding:14px 14px 6px;}
  .pt-on .pt-char{flex:none; order:var(--po,0); margin-top:0; padding-bottom:0;}
  .pt-on .pt-char b{min-height:2.3em;}   /* every name has room for two lines, so the feet of a row stand on one line */
  .pt-on .pt-char.dim{opacity:.3;}
  /* one body size per character (data-k), but never wider than its cell: the wide ones (DSIP, TB-500) would climb over their neighbours. A little overhang is fine, the picture margins are empty */
  .pt-on .pt-crew{--cw:calc((100vw - 28px) / 4 * 1.45);}   /* the picture box may overlap its neighbours a little (the edges are clear); the CHARACTER is what must not */
  .pt-on .pt-char:nth-child(-n+8) .pt-fig,.pt-on .pt-char:nth-child(n+9):nth-child(-n+16) .pt-fig,.pt-on .pt-char:nth-child(n+17) .pt-fig{height:min(calc(var(--fh) * var(--k,1)), calc(var(--cw) / var(--ar,1)));}
  .pt-spot{position:fixed; inset:0; z-index:85; flex-direction:column; align-items:center; justify-content:flex-end; gap:10px; padding:0 14px 18px; background:rgba(47,2,78,.6); pointer-events:auto;}
  .pt-big{height:calc(min(42vh,320px) * var(--bk,1));}
  .pt-card{width:100%; max-width:420px; align-self:auto;}
  .pt-card::after{left:calc(50% - 9px); top:-11px; margin:0; width:18px; height:12px; clip-path:polygon(0 100%,100% 100%,50% 0);}
}
@media (prefers-reduced-motion:reduce){
  .pt-fig img,.pt-wob,.pt-big.talk img,.pt-card{animation:none;}
  .pt-fig{transition:none;}
}

/* ---------- Meet someone new ---------- */
.crew-meet{display:flex; justify-content:center; margin:26px 0 0;}
.crew-new{font:inherit; font-size:16px; font-weight:800; padding:14px 30px; transition:transform .16s var(--ease-out), filter .2s ease;}
.crew-new:active{transform:scale(.97);}

/* ---------- Who studies this? ---------- */
.crew-quiz{max-width:860px; margin:64px auto 0; padding:28px 28px 22px; background:#fff; border:1.5px solid var(--line); border-radius:28px;}
.crew-quiz[hidden]{display:none;}
.crew-quiz h2{font-size:clamp(26px,3.4vw,34px); font-weight:800; line-height:1.15; margin:0 0 8px;}
.crew-quiz-lead{font-size:16px; line-height:1.55; max-width:60ch; margin:0 0 22px;}
.quiz-q{font-size:19px; font-weight:800; color:var(--ink); line-height:1.35; margin:0 0 14px;}
.quiz-opts{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px;}
.quiz-opt{font:inherit; display:flex; flex-direction:column; align-items:center; gap:8px; padding:14px 8px 12px; background:var(--surface); color:var(--ink); border:1.5px solid var(--line); border-radius:20px; cursor:pointer;
  transition:transform .16s var(--ease-out), border-color .2s ease, background-color .2s ease, opacity .2s ease;}
.quiz-opt:active{transform:scale(.97);}
.quiz-pic{display:flex; align-items:flex-end; justify-content:center; width:100%; height:128px;}
.quiz-pic img{height:100%; width:auto; max-width:100%; object-fit:contain; display:block;}
.quiz-name{font-size:16px; font-weight:800; line-height:1.2; text-align:center;}
.quiz-tag{font-size:14px; font-weight:800; line-height:1.2; min-height:1.2em; text-align:center;}
.quiz-opts.is-done .quiz-opt{pointer-events:none;}
.quiz-opt.is-right{background:var(--hp-gold-hi); border-color:var(--gold-ink);}
.quiz-opt.is-wrong{opacity:.6;}
.quiz-opts.is-done .quiz-opt:not(.is-right):not(.is-wrong){opacity:.5;}
.quiz-fb{font-size:16px; font-weight:600; line-height:1.55; min-height:3.1em; margin:16px 0 0; color:var(--text-mute);}
.quiz-fb.on{color:var(--ink); animation:quizIn .2s var(--ease-out);}
@keyframes quizIn{from{opacity:0; transform:translateY(4px);} to{opacity:1; transform:none;}}
.quiz-actions{display:flex; flex-wrap:wrap; align-items:center; gap:10px 22px; margin-top:8px; min-height:48px;}
.quiz-actions [hidden]{display:none;}
.quiz-next{font:inherit; font-size:15px; font-weight:800; padding:12px 26px; border:0; cursor:pointer; transition:transform .16s var(--ease-out), filter .2s ease;}
.quiz-next:active{transform:scale(.97);}
.quiz-meet{font-size:16px;}
@media (hover:hover) and (pointer:fine){ .quiz-opt:hover{border-color:var(--gold);} .quiz-opts.is-done .quiz-opt:hover{border-color:var(--line);} .quiz-opt.is-right:hover{border-color:var(--gold-ink);} .quiz-next:hover{filter:brightness(1.06);} }
@media (max-width:640px){
  .crew-quiz{margin-top:44px; padding:22px 14px 16px; border-radius:22px;}
  .quiz-opts{gap:8px;}
  .quiz-opt{padding:10px 4px;}
  .quiz-pic{height:96px;}
  .quiz-name{font-size:14.5px;}
  .quiz-tag{font-size:13px;}
}
@media (prefers-reduced-motion:reduce){ .quiz-opt,.quiz-next{transition:none;} .quiz-fb.on{animation:none;} }

/* ---------- the library ---------- */
.crew-lib h2{font-size:clamp(26px,3.4vw,34px); font-weight:800; line-height:1.15; margin:0 0 10px;}
.crew-lead{font-size:16px; line-height:1.6; max-width:760px; color:var(--text); margin:0 0 22px;}
.crew-tools{display:flex; flex-wrap:wrap; align-items:center; gap:10px 24px; margin:0 0 6px;}
.crew-search{position:relative; flex:1 1 340px; max-width:560px;}
.crew-search svg{position:absolute; left:15px; top:50%; margin-top:-10px; color:var(--text-mute); pointer-events:none;}
.crew-search input{display:block; width:100%; font:inherit; font-size:16px; color:var(--ink); background:#fff; border:1.5px solid var(--line); border-radius:16px; padding:14px 16px 14px 46px;
  transition:border-color .2s ease;}
.crew-search input::placeholder{color:var(--text-mute); opacity:1;}
.crew-search input:hover{border-color:var(--gold);}
.crew-search input::selection{background:var(--hp-gold-hi); color:var(--ink);}
.crew-sr{position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap;}
.crew-status{margin:0; font-size:15px; font-weight:600; color:var(--text-mute);}
.crew-empty{font-size:16px; font-weight:600; margin:26px 0;}
.crew-empty[hidden],.crew-area[hidden],.crew-item[hidden]{display:none;}
.crew-clear{font:inherit; font-weight:800; color:var(--ink); background:none; border:0; padding:0; cursor:pointer; text-decoration:underline; text-underline-offset:3px; text-decoration-color:var(--gold);}
.crew-clear:hover{color:var(--gold-ink);}
.crew-area h3{display:flex; align-items:baseline; gap:10px; font-size:22px; font-weight:800; line-height:1.2; margin:44px 0 10px;}
.crew-count{font-size:15px; font-weight:700; color:var(--text-mute);}
.crew-list{list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px 36px;}
.crew-item{display:grid; grid-template-columns:minmax(0,1fr); align-items:center; gap:2px 12px; padding:12px 0; border-radius:14px;}
.crew-item.has-char{grid-template-columns:auto minmax(0,1fr); padding:12px 10px; margin:0 -10px; background:var(--surface); align-items:center;}
.crew-fig{display:flex; align-items:flex-end; height:76px; min-width:60px;}
.crew-fig img{height:100%; width:auto; max-width:112px; display:block;}
.crew-txt{display:flex; flex-direction:column; gap:1px; min-width:0;}
.crew-name{font-size:17px; font-weight:800; color:var(--ink); line-height:1.25; overflow-wrap:anywhere;}
a.crew-name:hover{color:var(--gold-ink);}
.crew-note{font-size:15px; font-weight:500; color:var(--text); line-height:1.4;}
.crew-aka{font-size:14px; color:var(--text-mute); line-height:1.4;}
.crew-hi{grid-column:2; justify-self:start; margin-top:6px; font:inherit; font-size:14px; font-weight:800; color:var(--on-gold); background:var(--hp-gold-hi); border:0; border-radius:18px; padding:7px 16px; cursor:pointer;
  transition:transform .16s var(--ease-out), filter .2s ease;}
.crew-hi:active{transform:scale(.97);}
@media (hover:hover) and (pointer:fine){ .crew-hi:hover,.crew-new:hover{filter:brightness(1.06);} }
@media (max-width:980px){ .crew-list{grid-template-columns:repeat(2,minmax(0,1fr));} }
@media (max-width:640px){
  .crew-list{grid-template-columns:minmax(0,1fr);}
  .crew-search{flex-basis:100%;}
  .crew-item.has-char{margin:0 -6px; padding:12px 6px;}
}
@media (prefers-reduced-motion:reduce){ .crew-new,.crew-hi,.pt-goals button{transition:none;} }
