/* /team (owner, 2026-11-13). Laid out after a community staff page the owner liked: each rank is a centred title,
   a line about it and a rule, then narrow cards with a round avatar, name, title and a quote. A rank may set its own
   colour (--rk) in /admin/team; with none it stays black and white. No glows or gradients (house rule). */
body:has(main.tm-main) { min-height: 100vh; display: flex; flex-direction: column; }
main.tm-main { columns: auto; max-width: 1180px; flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 64px; padding-bottom: 64px; }
main.tm-main > * { column-span: none; }
main.tm-main h1 { font-size: clamp(40px, 6vw, 56px); font-weight: 500; letter-spacing: -0.02em; margin-bottom: 12px; }
main.tm-main .lede { font-size: 18px; color: var(--ink-2); margin: 0 auto; }
main.tm-main #team { width: 100%; }

.tm-groups { display: grid; gap: 56px; margin-top: 56px; }
.tm-group { --rk: var(--ink, #ededef); text-align: center; }
.tm-group h2 { margin: 0; padding: 0; border: 0; font-size: 24px; font-weight: 500; letter-spacing: -0.01em; color: var(--rk); }
.tm-rdesc { margin: 8px auto 0; max-width: 60ch; color: var(--ink-2, #a1a1a8); font-size: 15px; }
.tm-group hr { width: min(100%, 520px); margin: 20px auto 28px; border: 0; border-top: 1px solid var(--rk); opacity: .5; }
.tm-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 20px; }

.tm-card { width: 200px; margin: 0; padding: 28px 18px 22px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; background: var(--pane, #0e0e10); display: flex; flex-direction: column; align-items: center; text-align: center; }
.tm-av { width: 88px; height: 88px; border-radius: 50%; overflow: hidden; background: rgba(255, 255, 255, .05); display: grid; place-items: center; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
.tm-av img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tm-av span { font-size: 30px; color: var(--ink-2, #a1a1a8); }
.tm-blank { width: 100%; height: 100%; fill: rgba(255, 255, 255, .14); }   /* open seats */
.tm-info { width: 100%; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 16px; }
.tm-name { font-size: 17px; font-weight: 500; color: var(--ink, #ededef); overflow-wrap: anywhere; }
.tm-title { font-size: 13.5px; color: var(--rk, var(--ink-2)); opacity: .85; }
.tm-group[style] .tm-title { opacity: 1; }
.tm-bio { display: block; margin: 10px 0 0; color: var(--ink-2, #a1a1a8); font-size: 13.5px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; quotes: "\201C" "\201D"; }
.tm-x { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.tm-now { margin: 4px 0 0; color: var(--ink-2, #a1a1a8); font-size: 12.5px; }
.tm-now time { font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink, #ededef); }
.tm-x li { margin: 0; color: var(--ink-2, #a1a1a8); font-size: 12.5px; overflow-wrap: anywhere; }
.tm-c { margin: 12px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 6px; font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--ink-2, #a1a1a8); }
.tm-c a { color: var(--ink-2, #a1a1a8); text-decoration: none; overflow-wrap: anywhere; }
.tm-c a:hover { color: var(--ink, #ededef); text-decoration: underline; }
.tm-edit { margin-top: 12px; padding: 0; border: 0; background: none; color: var(--ink-2, #a1a1a8); font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }
.tm-edit:hover { color: var(--ink, #ededef); }

.tm-form { width: 100%; display: grid; gap: 8px; text-align: left; }
.tm-form label { display: grid; gap: 4px; font-size: 12px; color: var(--ink-2, #a1a1a8); }
.tm-form textarea, .tm-form input { width: 100%; box-sizing: border-box; padding: 6px 8px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; background: rgba(0, 0, 0, .3); color: var(--ink, #ededef); font: inherit; font-size: 13px; resize: vertical; }
.tm-fa { display: flex; gap: 8px; }
.tm-btn { height: 30px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; background: none; color: var(--ink, #ededef); font: inherit; font-size: 13px; cursor: pointer; }
.tm-btn.tm-solid { background: var(--ink, #ededef); border-color: transparent; color: #0b0b0c; font-weight: 500; }
.tm-btn:disabled { opacity: .5; cursor: default; }
.tm-err { margin: 0; color: #f2a0a0; font-size: 12px; }
.tm-err:empty { display: none; }
.tm-note { color: var(--ink-2, #a1a1a8); }
.tm-help { margin-top: 64px; text-align: center; color: var(--ink-2, #a1a1a8); }
main.tm-main ~ .foot, main.tm-main ~ .foot a { color: var(--ink-2); }
@media (max-width: 560px) {
  main.tm-main { padding-top: 32px; } main.tm-main h1 { font-size: 40px; }
  .tm-list { gap: 12px; } .tm-card { width: calc(50% - 6px); padding: 20px 12px 16px; } .tm-av { width: 72px; height: 72px; }
}

/* Smooth scrolling (owner, 2026-11-13: "make the scrolling way smoother, optimize it").
   The lattice uses background-attachment: fixed, which repaints on every scroll frame. .gridbg is already
   position: fixed, so plain scroll attachment looks the same there, and on its own layer it never repaints. */
body:has(main.tm-main) .gridbg { transform: translateZ(0); contain: strict; }
body:has(main.tm-main) .gridbg i { background-attachment: scroll; }
body:has(main.tm-main) .gridbg ~ header::before { background-attachment: scroll; }
/* rank sections far off screen aren't laid out or painted until they come near */
.tm-group { content-visibility: auto; contain-intrinsic-size: auto 520px; }
.tm-card { contain: layout paint; }

/* loading screen until the list, pictures and fonts are ready (team.js) */
.tm-loading { min-height: 50vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--ink-2, #a1a1a8); font-size: 14px; }
.tm-spin { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .12); border-top-color: var(--ink, #ededef); animation: tm-spin .8s linear infinite; }
@keyframes tm-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tm-spin { animation-duration: 2.4s; } }
