/* Team and Attributions pages: the swimming dish, member cards, stamps, the contribution table, the records, people and
   thank-you cards. Loaded after hp-story.css, only on pages with `team: true`. Same type (Baloo 2 + Nunito Sans), nothing under 15px. */

/* ── the six areas of work: one colour each, with the ink that reads on it ──────────────────────────── */
:root{
  --a-wet:#17B471;--a-dry:#0755D9;--a-hp:#F8A621;--a-edu:#E23A5D;--a-wiki:#00ABB6;--a-coord:#7B52E0;
  --a-wet-ink:#06241a;--a-dry-ink:#fff;--a-hp-ink:#2a1a00;--a-edu-ink:#fff;--a-wiki-ink:#02242a;--a-coord-ink:#fff;
}
:root[data-theme=dark]{
  --a-wet:#2FDC92;--a-dry:#4C8DFF;--a-hp:#F8B53A;--a-edu:#FF6B88;--a-wiki:#19C3CE;--a-coord:#A98BFF;
  --a-wet-ink:#04141f;--a-dry-ink:#04141f;--a-hp-ink:#04141f;--a-edu-ink:#04141f;--a-wiki-ink:#04141f;--a-coord-ink:#04141f;
}
[data-area=wet]{--ac:var(--a-wet);--ink-on:var(--a-wet-ink)}
[data-area=dry]{--ac:var(--a-dry);--ink-on:var(--a-dry-ink)}
[data-area=hp]{--ac:var(--a-hp);--ink-on:var(--a-hp-ink)}
[data-area=edu]{--ac:var(--a-edu);--ink-on:var(--a-edu-ink)}
[data-area=wiki]{--ac:var(--a-wiki);--ink-on:var(--a-wiki-ink)}
[data-area=coord]{--ac:var(--a-coord);--ink-on:var(--a-coord-ink)}

/* ── an avatar: a portrait, or initials until there is one ─────────────────────────────────────────── */
.avatar{flex:none;display:inline-grid;place-items:center;width:56px;height:56px;border-radius:50%;background:var(--ac,var(--accent));color:var(--ink-on,#fff);font:800 1.2rem/1 var(--font-display);letter-spacing:.02em;object-fit:cover}
.avatar-lg{width:112px;height:112px;font-size:2rem}
.avatar-xs{width:34px;height:34px;font-size:.9375rem}
img.avatar{background:var(--surface-2)}

/* ── stamps: where someone works. Solid = mainly, outlined = also helps ─────────────────────────────── */
.article-section .stamps{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;list-style:none;max-width:none}
.article-section .stamps li{margin:0;padding:2px 12px;border-radius:999px;font-size:.9375rem;font-weight:700;line-height:1.5;background:var(--ac);color:var(--ink-on)}
.article-section .stamps li::before{display:none}
.article-section .stamps li[data-level=also]{background:transparent;color:var(--ink);box-shadow:inset 0 0 0 2px var(--ac)}

/* ── the dish ───────────────────────────────────────────────────────────────────────────────────────── */
.dish{margin:2em 0 2.4em;padding:clamp(18px,2.6vw,30px);border-radius:var(--radius);border:1px solid var(--line);background:var(--surface);box-shadow:var(--shadow)}
.dish[hidden]{display:none}
.article-section .dish-title{margin:0 0 4px;font:800 clamp(1.4rem,2.4vw,1.9rem)/1.15 var(--font-display);background:var(--spectrum);-webkit-background-clip:text;background-clip:text;color:transparent;max-width:none}
.article-section .dish-sub{margin:0 0 16px;max-width:46em;color:var(--muted)}
.dish-chips{display:flex;flex-wrap:wrap;gap:8px 10px;margin:0 0 14px}
.dish-chip,.dish-clear{display:inline-flex;align-items:center;gap:9px;padding:7px 15px 7px 12px;border-radius:999px;border:2px solid var(--line);background:var(--surface);color:var(--ink);font:700 1rem/1.3 var(--font-text);cursor:pointer;transition:background .2s,border-color .2s,transform .2s}
.dish-chip i{flex:none;width:12px;height:12px;border-radius:50%;background:var(--ac)}
.dish-chip small{font-size:.9375rem;font-weight:700;color:var(--muted)}
.dish-chip:hover{border-color:var(--ac);transform:translateY(-1px)}
.dish-chip[aria-pressed=true]{background:var(--ac);border-color:var(--ac);color:var(--ink-on)}
.dish-chip[aria-pressed=true] i{background:var(--ink-on)}
.dish-chip[aria-pressed=true] small{color:inherit;opacity:.85}
.dish-clear{border-style:dashed;color:var(--muted)}
.dish-clear[hidden]{display:none}
.dish-chip:focus-visible,.dish-clear:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
.dish-stage{position:relative;border-radius:var(--radius-sm);overflow:hidden;border:1px solid var(--line);background:
  radial-gradient(ellipse at 50% 45%,color-mix(in srgb,var(--green) 11%,var(--surface-2)),var(--surface-2) 72%)}
.dish-canvas{display:block;width:100%;height:clamp(300px,42vw,420px);touch-action:manipulation}
.dish-tip{position:absolute;z-index:2;max-width:min(300px,76%);padding:9px 14px;border-radius:14px;background:var(--navy);color:#fff;font-size:1rem;line-height:1.4;pointer-events:none;box-shadow:0 10px 28px -10px rgba(0,0,0,.5)}
.dish-tip[hidden]{display:none}
.dish-tip strong{display:block;font:700 1.0625rem/1.25 var(--font-display)}
.article-section .dish-status{margin:14px 0 4px;max-width:none;min-height:3.1em;font-weight:700;color:var(--ink)}
.article-section .dish-note{margin:0;max-width:none;color:var(--muted);font-size:1rem}
.dish-probe{position:absolute;width:0;height:0;overflow:hidden;visibility:hidden}

/* The dish needs room and a pointer: on a phone it is replaced by a short note. */
.dish-phone{display:none}
@media (max-width:720px){
  .dish{display:none!important}
  .article-section .dish-phone{display:block;margin:1.6em 0;padding:16px 20px;max-width:none;border-radius:var(--radius-sm);border:1.5px dashed color-mix(in srgb,var(--teal) 55%,var(--line));background:var(--surface);color:var(--muted)}
  .dish-phone strong{display:block;margin-bottom:2px;font:700 1.15rem/1.3 var(--font-display);color:var(--ink)}
}

/* ── the wall of member cards ───────────────────────────────────────────────────────────────────────── */
.article-section .wall{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr));gap:16px;margin:1.6em 0 2em;padding:0;list-style:none;max-width:none}
.article-section .wall>li::before{display:none}
.article-section .wall>.mcard{position:relative;display:flex;flex-direction:column;gap:12px;margin:0;padding:22px 22px 20px;border-radius:var(--radius);background:var(--surface);border:1px solid var(--line);border-top:5px solid var(--ac,var(--line));transition:opacity .35s,transform .35s,box-shadow .35s,border-color .35s}
.mcard[data-main]{--ac:var(--a-wet)}
.mcard[data-main^=dry]{--ac:var(--a-dry)}.mcard[data-main^=hp]{--ac:var(--a-hp)}.mcard[data-main^=edu]{--ac:var(--a-edu)}.mcard[data-main^=wiki]{--ac:var(--a-wiki)}.mcard[data-main^=coord]{--ac:var(--a-coord)}
/* messages under the wall: cards flow down two columns, so a long message and a short one sit side by side without gaps */
.article-section .voices{columns:2 320px;column-gap:16px;margin:1.2em 0 2em;padding:0;list-style:none;max-width:none}
.article-section .voices>li::before{display:none}
.article-section .voices>.voice{break-inside:avoid;margin:0 0 16px;padding:18px 22px 20px;border-radius:var(--radius);background:var(--surface);border:1px solid var(--line);border-top:5px solid var(--ac,var(--line))}
.voice[data-main]{--ac:var(--a-wet)}
.voice[data-main^=dry]{--ac:var(--a-dry)}.voice[data-main^=hp]{--ac:var(--a-hp)}.voice[data-main^=edu]{--ac:var(--a-edu)}.voice[data-main^=wiki]{--ac:var(--a-wiki)}.voice[data-main^=coord]{--ac:var(--a-coord)}
.voice-head{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.voice .avatar-xs{width:44px;height:44px}
.article-section .voice-name{margin:0;max-width:none;font:700 1.15rem/1.25 var(--font-display);color:var(--ink)}
.article-section .voice-text{margin:0;max-width:none;line-height:1.6}
.mcard-head{display:flex;align-items:center;gap:14px}
.mcard-head>div{display:grid;gap:3px;min-width:0}
.article-section .mcard-role,.article-section .dossier-role{margin:0;max-width:none;color:var(--accent);font-weight:700;font-size:.9375rem;line-height:1.3}
.article-story .article-section .mcard h3{margin:0;font:700 clamp(1.25rem,2vw,1.5rem)/1.2 var(--font-display);letter-spacing:0;text-wrap:balance}
.article-section .mcard-motto{margin:0;max-width:none;font-style:italic;line-height:1.5;color:var(--text);flex:1}
.article-section .mcard-motto.is-pending{color:var(--muted)}
.mcard-link{align-self:flex-start;display:inline-flex;gap:8px;align-items:center;padding:5px 14px;border-radius:999px;border:1.5px dashed color-mix(in srgb,var(--accent) 45%,var(--line));font-weight:700;text-decoration:none;color:var(--ink);transition:background .2s,border-color .2s}
.article-story .article-section a.mcard-link{font-weight:700}
.mcard-link:hover{border-color:var(--accent);background:var(--accent-soft)}
.mcard.is-dim{opacity:.34;transform:scale(.985)}
.mcard.is-hit{box-shadow:0 14px 34px -16px color-mix(in srgb,var(--ac) 70%,transparent);transform:translateY(-2px)}
.mcard.flash{animation:mcard-flash 1.6s ease-out}
@keyframes mcard-flash{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--amber) 80%,transparent)}60%{box-shadow:0 0 0 14px transparent}100%{box-shadow:none}}
.mcard:target{scroll-margin-top:calc(var(--header-h,76px) + 24px)}

/* ── contribution table ─────────────────────────────────────────────────────────────────────────────── */
.amatrix{position:relative;margin:1.8em 0 .8em}   /* position: so the hidden labels inside are clipped by the scroll box, not the page */
.amatrix table{width:100%;min-width:38em;border-collapse:collapse;font-size:1rem}
.amatrix th,.amatrix td{padding:9px 12px;border-bottom:1px solid var(--line);text-align:center;vertical-align:middle}
.amatrix thead th{line-height:1.25;vertical-align:bottom;white-space:normal}
.amatrix th.am-area{min-width:5.2em}
.amatrix th[scope=row]{text-align:left;white-space:nowrap}
.amatrix th[scope=row] a{display:inline-flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink);font-weight:700}
.amatrix th[scope=row] a:hover span{text-decoration:underline}
.amatrix .am-area i{display:inline-block;width:11px;height:11px;margin-right:8px;border-radius:50%;background:var(--ac)}
.amatrix td.am-cell{background:color-mix(in srgb,var(--ac) 7%,transparent)}
.am-dot{display:inline-block;width:18px;height:18px;border-radius:50%;background:var(--ac,var(--accent));vertical-align:middle}
.am-dot[data-level=also]{background:transparent;box-shadow:inset 0 0 0 3px var(--ac,var(--accent))}
.amatrix tfoot th,.amatrix tfoot td{border-bottom:0;color:var(--muted);font-weight:700}
.amatrix tfoot tr:first-child>*{border-top:2px solid var(--line)}
.am-legend{display:flex;flex-wrap:wrap;gap:6px 22px;margin:0 0 1.6em;color:var(--muted)}
.am-legend .am-dot{--ac:var(--ink);width:14px;height:14px;margin-right:6px}
.am-legend .am-dot[data-level=also]{box-shadow:inset 0 0 0 3px var(--ink)}

/* ── the records ────────────────────────────────────────────────────────────────────────────────────── */
.dossier-tools{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 1.2em}
.dossier-tools[hidden]{display:none}
.dossier-tools button{padding:6px 16px;border-radius:999px;border:1.5px dashed color-mix(in srgb,var(--accent) 45%,var(--line));background:transparent;color:var(--ink);font:700 1rem/1.3 var(--font-text);cursor:pointer}
.dossier-tools button:hover{border-color:var(--accent);background:var(--accent-soft)}
.dossiers{display:grid;gap:16px}
.dossier{position:relative;margin:0;padding:clamp(20px,3vw,32px);border-radius:var(--radius);background:var(--surface);border:1px solid var(--line);border-left:6px solid var(--ac,var(--line))}
.dossier[data-areas^=wet]{--ac:var(--a-wet)}.dossier[data-areas^=dry]{--ac:var(--a-dry)}.dossier[data-areas^=hp]{--ac:var(--a-hp)}.dossier[data-areas^=edu]{--ac:var(--a-edu)}.dossier[data-areas^=wiki]{--ac:var(--a-wiki)}.dossier[data-areas^=coord]{--ac:var(--a-coord)}
.dossier:target{scroll-margin-top:calc(var(--header-h,76px) + 24px)}
.dossier.is-pending{border-left-style:dashed;background:color-mix(in srgb,var(--surface-2) 40%,var(--surface))}
.dossier-head{display:flex;align-items:center;gap:18px}
.dossier-head>div{display:grid;gap:8px;min-width:0}
.article-story .article-section .dossier h3{margin:0;font:700 clamp(1.4rem,2.4vw,1.9rem)/1.15 var(--font-display)}
.article-section .dossier-motto{margin:0;max-width:none;font-style:italic;color:var(--text)}
.article-section .dossier-credit{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin:14px 0 0;max-width:none}
.dossier-credit span{margin-right:2px;color:var(--muted);font-weight:700}
.dossier-credit em{padding:1px 11px;border-radius:999px;background:var(--accent-soft);font-style:normal;font-size:.9375rem;font-weight:700;color:var(--ink)}
.dossier-fold{margin:16px 0 0;border-top:1px dashed var(--line)}
.dossier-fold>summary{cursor:pointer;display:flex;align-items:center;gap:12px;padding:14px 0 4px;list-style:none;font:700 1.1rem/1.35 var(--font-display);color:var(--ink)}
.dossier-fold>summary::-webkit-details-marker{display:none}
.dossier-fold>summary::before{content:"+";flex:none;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--ac,var(--accent));color:var(--ink-on,#fff);font:800 1.2rem/1 var(--font-display)}
.dossier-fold[open]>summary::before{content:"–"}
.dossier-fold>summary small{font:600 1rem var(--font-text);color:var(--muted)}
.dossier-body{padding-top:6px}
.article-section .dossier-body p{max-width:46em;line-height:1.65}
.article-section .dossier-wait{margin:14px 0 0;max-width:none;color:var(--muted)}
.article-section .dossier-back{margin:16px 0 0;max-width:none}
@media print{.dossier-fold:not([open])>.dossier-body{display:block}.dish,.dossier-tools{display:none}}

/* ── teachers and experts ───────────────────────────────────────────────────────────────────────────── */
.article-section .people{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,330px),1fr));gap:16px;margin:1.8em 0;padding:0;list-style:none;max-width:none}
.article-section .people>li::before{display:none}
.article-section .people>.person{display:flex;gap:18px;align-items:flex-start;margin:0;padding:22px 24px;border-radius:var(--radius);background:var(--surface);border:1px solid var(--line);border-top:5px solid var(--teal)}
.person>div{display:grid;gap:6px;min-width:0}
.article-story .article-section .person h4{margin:0;font:700 1.3rem/1.2 var(--font-display)}
.article-section .person p{margin:0;max-width:none;line-height:1.5}
.person-role{color:var(--accent);font-weight:700}
.person-org,.person-field{color:var(--muted)}
.person-field{font-style:italic}
.article-section .person-motto{margin:8px 0 0;max-width:none;font-style:italic;font-weight:700;color:var(--accent)}
.article-section .person-tba{color:var(--muted);font-style:italic}
.person-tba span{font-style:normal;font-weight:700;color:var(--text)}

/* ── thank-you cards ────────────────────────────────────────────────────────────────────────────────── */
.tcards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:18px;margin:1.9em 0}
.tcard{position:relative;margin:0;padding:26px 26px 22px;border-radius:var(--radius);background:var(--surface);border:1px solid var(--line);border-top:5px solid var(--green);overflow:hidden}
.tcard:nth-child(3n+2){border-top-color:var(--teal)}.tcard:nth-child(3n){border-top-color:var(--amber)}
.tcard::after{content:"";position:absolute;right:-26px;top:-26px;width:92px;height:92px;border-radius:50%;border:3px dashed color-mix(in srgb,var(--teal) 40%,transparent);rotate:-14deg}
.article-story .article-section .tcard h4{margin:0 0 6px;font:700 1.3rem/1.2 var(--font-display);color:var(--ink)}
.article-section .tcard-note{margin:0 0 10px;max-width:none;color:var(--muted)}
.article-section .tcard ul{display:grid;gap:12px;margin:12px 0 0;padding:0;list-style:none;max-width:none}
.article-section .tcard li{margin:0;padding:0;display:grid;gap:2px;border:0;border-radius:0;background:none}
.article-section .tcard li::before{display:none}
.tcard li strong{font:700 1.0625rem/1.3 var(--font-display);color:var(--ink)}
.tcard li span{line-height:1.5}

/* ── a draft note for the team (removed once the facts are confirmed) ───────────────────────────────── */
.article-section .draft-flag{margin:1.6em 0;padding:14px 20px;max-width:46em;border-radius:var(--radius-sm);border:1.5px dashed color-mix(in srgb,var(--amber) 60%,var(--line));background:color-mix(in srgb,var(--amber) 9%,var(--surface))}

@media (max-width:640px){
  .dossier-head{align-items:flex-start;gap:14px}
  .avatar-lg{width:84px;height:84px;font-size:1.6rem}
  .person{padding:18px}
  .dish-canvas{height:300px}
}
@media (prefers-reduced-motion:reduce){
  .mcard,.dish-chip{transition:none}
  .mcard.flash{animation:none;outline:3px solid var(--amber)}
}

/* contribution form: the tasks on a card, and the who-by-task table */
.article-section .mcard-tasks{margin:0;max-width:none;flex:1;line-height:1.5;color:var(--muted)}
.mcard-tasks span{margin-right:8px;font-weight:700;color:var(--text)}
.tmatrix table{min-width:62em}
.tmatrix th.am-task{vertical-align:bottom;padding:10px 4px;min-width:2.6em;height:11.5em}
.tmatrix th.am-task span{display:inline-block;writing-mode:vertical-rl;transform:rotate(180deg);white-space:nowrap;font-weight:700}
.tmatrix .am-cell{--ac:var(--accent);background:transparent;padding:9px 4px}
.tmatrix td.am-cell:nth-child(even){background:color-mix(in srgb,var(--accent) 5%,transparent)}
.tmatrix .tm-who{display:inline-flex;align-items:center;gap:10px;font-weight:700}
