/* /team · AI 同事名册（Every agent matters）。面分层：灰面 + 白卡 + 不描边的胶囊；头像是圆的，底色取自头像背景。 */

/* ---------- 首屏 ---------- */
.tm-hero { padding-bottom: 8px; }
.tm-hero-text { text-align: center; display: flex; flex-direction: column; align-items: center; }
.tm-h1 { margin-top: 18px; font-size: clamp(3rem, 8.4vw, 6.6rem); font-weight: 600; line-height: 1.02; letter-spacing: -0.055em; color: var(--ink-strong); text-wrap: balance; }
.hd .tm-hero-sub { margin: 26px auto 0; max-width: 38em; font-size: clamp(1.08rem, 1.5vw, 1.25rem); line-height: 1.7; color: var(--mut); text-wrap: pretty; }
.tm-hero-text .btn-row { margin-top: 34px; justify-content: center; }

/* 头像墙：三行慢慢滚，左右两端淡出 */
.tm-wall { margin-top: clamp(48px, 6vw, 80px); display: grid; gap: 14px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
.tm-wall-row { overflow: hidden; }
.tm-wall-track { display: flex; gap: 14px; width: max-content; animation: tm-marquee 110s linear infinite; }
.tm-wall-row--rev .tm-wall-track { animation-direction: reverse; animation-duration: 130s; }
.tm-wall-face { flex: none; width: clamp(72px, 7.5vw, 96px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--bg); }
.tm-wall-face img, .tm-face img, .tm-step-face img { display: block; width: 100%; height: 100%; object-fit: cover; }
@keyframes tm-marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .tm-wall-track { animation: none; } }

.tm-stats { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tm-stats > div { display: flex; flex-direction: column; gap: 6px; padding: 24px 26px; border-radius: var(--radius-lg); background: var(--surface); }
.tm-stats b { font-size: clamp(2rem, 3.4vw, 2.8rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.05; color: var(--ink-strong); }
.tm-stats span { font-size: 0.9375rem; color: var(--mut); }
.tm-stats .tm-stat-human { justify-content: flex-end; }
.tm-stats .tm-stat-human b { font-size: clamp(1.45rem, 2.4vw, 1.9rem); color: var(--signal-ink); }

/* ---------- 人和 AI ---------- */
.tm-vals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tm-val { display: flex; flex-direction: column; gap: 12px; padding: 28px 26px 30px; border-radius: var(--radius-lg); background: var(--surface); }
.tm-val .n { font-family: var(--font-mono); font-size: 0.8rem; color: var(--mut-2); }
.tm-val b { font-size: 1.2rem; font-weight: 600; line-height: 1.35; letter-spacing: -0.015em; color: var(--ink-strong); }
.tm-val p { margin: 0; font-size: 0.98rem; line-height: 1.7; color: var(--mut); }

/* ---------- 一个决定，一群同事 ---------- */
.tm-stage { padding: clamp(22px, 3vw, 40px); border-radius: var(--radius-xl); background: var(--surface); }
.tm-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--radius-full); background: var(--fill); }
.tm-tab { height: 38px; padding: 0 18px; border: 0; border-radius: var(--radius-full); background: transparent; color: var(--mut); font: inherit; font-size: 0.9375rem; font-weight: 500; cursor: pointer; transition: background .15s, color .15s; }
.tm-tab:hover { color: var(--ink-strong); }
.tm-tab[aria-selected="true"] { background: var(--raised); color: var(--ink-strong); box-shadow: var(--elev-1); }
.tm-flow { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
.tm-flow[hidden] { display: none; }
.tm-step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 20px 10px 22px; border-radius: var(--radius-md); background: var(--raised); box-shadow: var(--elev-1); }
.tm-step + .tm-step::before { content: ""; position: absolute; left: -10px; top: 56px; width: 10px; height: 2px; background: var(--mut-2); opacity: .5; }
.tm-step-face { width: 72px; height: 72px; padding: 0; border: 0; border-radius: 50%; overflow: hidden; background: var(--bg); cursor: pointer; transition: transform .2s var(--ease); }
button.tm-step-face:hover { transform: scale(1.06); }
.tm-step-who { font-size: 0.98rem; font-weight: 600; color: var(--ink-strong); }
.tm-step-what { font-size: 0.84rem; line-height: 1.5; color: var(--mut); }
.tm-step--human { background: var(--ink-strong); }
.tm-step--human .tm-step-who { color: var(--signal-ink); }
.tm-step--human .tm-step-what { color: var(--bg); opacity: .85; }
.tm-person { display: grid; place-items: center; cursor: default; color: var(--ink-strong); background: var(--bg); box-shadow: 0 0 0 4px var(--signal); }
.hd .tm-flow-note { margin: 22px 0 0; font-size: 0.9rem; line-height: 1.6; color: var(--mut); }

/* ---------- 名册 ---------- */
.tm-tools { position: sticky; top: calc(var(--nav-h) + 8px); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px; margin: 0 -10px; border-radius: var(--radius-lg); background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.tm-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 520px; }
.tm-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: var(--radius-full); background: var(--fill); color: var(--mut); font: inherit; font-size: 0.86rem; cursor: pointer; transition: background .15s, color .15s; }
.tm-chip i { font-style: normal; font-size: 0.78rem; color: var(--mut-2); }
.tm-chip:hover { background: var(--fill-hover); color: var(--ink-strong); }
.tm-chip[aria-pressed="true"] { background: var(--ink-strong); color: var(--bg); }
.tm-chip[aria-pressed="true"] i { color: var(--bg); opacity: .7; }
.tm-search { flex: 0 1 280px; min-width: 0; height: 40px; padding: 0 18px; border: 0; border-radius: var(--radius-full); background: var(--fill); color: var(--ink-strong); font: inherit; font-size: 0.9375rem; }
.tm-search::placeholder { color: var(--mut-2); }

.tm-random { background: var(--signal-soft); color: var(--signal-ink); font-weight: 500; }
.tm-random:hover { background: var(--signal-soft); color: var(--signal-ink); }
.tm-bday { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 0; font-size: 0.9375rem; color: var(--mut); }
.tm-bday[hidden] { display: none; }
.tm-bday button { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 4px; border: 0; border-radius: var(--radius-full); background: var(--surface); color: var(--ink-strong); font: inherit; font-size: 0.9rem; font-weight: 500; cursor: pointer; }
.tm-bday button:hover { background: var(--surface-hover); }
.tm-bday .tm-face { width: 28px; margin: 0; }
.tm-dept { margin-top: clamp(40px, 5vw, 64px); }
.tm-dept[hidden] { display: none; }
.tm-dept header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 22px; }
.tm-dept h3 { margin: 0; font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink-strong); }
.tm-dept header p { margin: 0; font-size: 0.9375rem; color: var(--mut); }
.tm-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 30px 14px; }
.tm-grid li[hidden] { display: none; }
.tm-card, li a.tm-card { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; color: inherit; text-decoration: none; border-bottom: 0; }
.tm-face { display: block; width: min(112px, 100%); aspect-ratio: 1; margin-bottom: 8px; border-radius: 50%; overflow: hidden; background: var(--bg); transition: transform .25s var(--ease), box-shadow .25s; }
.tm-card:hover .tm-face, .tm-card:focus-visible .tm-face { transform: translateY(-4px) scale(1.04); box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--bg), var(--elev-2); }
.tm-card { min-width: 0; }
.tm-card b, .tm-card small, .tm-step-what, .tm-dlg-role { overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; }
.tm-card b { font-size: 0.98rem; font-weight: 600; color: var(--ink-strong); }
.tm-card small { font-size: 0.8rem; line-height: 1.4; color: var(--mut); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tm-empty { margin-top: 40px; color: var(--mut); }

/* ---------- 名册会一直变长 ---------- */
.tm-levels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tm-level { position: relative; padding: 26px 24px 28px; border-radius: var(--radius-lg); background: var(--surface); }
.tm-level + .tm-level::before { content: ""; position: absolute; left: -12px; top: 50%; width: 12px; height: 2px; background: var(--mut-2); opacity: .5; }
.tm-level b { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink-strong); }
.tm-level:last-child b { color: var(--signal-ink); }
.tm-level p { margin: 10px 0 0; font-size: 0.95rem; line-height: 1.65; color: var(--mut); }

/* ---------- 结尾 ---------- */
.tm-cta { text-align: center; display: flex; flex-direction: column; align-items: center; padding-bottom: clamp(64px, 8vw, 120px); }
.tm-cta .hd-sub { margin-left: auto; margin-right: auto; }
.tm-cta .btn-row { margin-top: 30px; justify-content: center; }

/* ---------- 简历弹层 ---------- */
html.tm-lock { overflow: hidden; }
.tm-dlg { width: min(980px, calc(100% - 32px)); max-height: min(860px, calc(100% - 48px)); padding: 0; border: 0; border-radius: var(--radius-xl); overflow: hidden; background: var(--raised); color: var(--ink); box-shadow: var(--ring), var(--elev-3); }
.tm-dlg::backdrop { background: rgba(10, 10, 10, 0.5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.tm-dlg[open] { animation: tm-pop .28s var(--ease-out); }
@keyframes tm-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.tm-dlg-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); max-height: inherit; }
.tm-dlg-art { margin: 0; position: relative; background: var(--bg-3); min-height: 100%; }
.tm-dlg-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tm-dlg-body { position: relative; overflow-y: auto; max-height: min(860px, calc(100vh - 48px)); padding: 64px clamp(22px, 3vw, 40px) 36px; }
.tm-dlg-bar { position: absolute; top: 14px; right: 14px; z-index: 2; display: flex; gap: 6px; }
.tm-ic { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 12px; border: 0; border-radius: var(--radius-full); background: var(--fill); color: var(--ink-strong); font: inherit; font-size: 0.82rem; cursor: pointer; transition: background .15s; }
.tm-ic:hover { background: var(--fill-hover); }
.tm-ic svg { width: 16px; height: 16px; }
.tm-dlg-k { display: block; margin-top: 0; font-size: 0.875rem; color: var(--mut); }
.tm-dlg h2:focus, .tm-dlg h2:focus-visible { outline: none; box-shadow: none; }
.tm-dlg h2 { margin: 6px 0 0; font-size: clamp(2.2rem, 4.4vw, 3.2rem); font-weight: 600; line-height: 1.05; letter-spacing: -0.045em; color: var(--ink-strong); }
.tm-dlg-role { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 1.05rem; font-weight: 500; color: var(--ink); }
.tm-ai { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--radius-full); background: var(--signal-soft); color: var(--signal-ink); font-size: 0.75rem; font-weight: 600; }
.tm-quote { margin: 22px 0 0; padding: 18px 20px; border-radius: var(--radius-md); background: var(--surface); font-size: 1.12rem; line-height: 1.55; font-weight: 500; letter-spacing: -0.01em; color: var(--ink-strong); }
.tm-quote::before { content: "\201C"; display: block; height: 22px; font-size: 2.4rem; line-height: 1; color: var(--signal-ink); }
.tm-dlg-body > p, .tm-dlg-sec p { margin: 0; font-size: 0.98rem; line-height: 1.75; color: var(--ink); }
.tm-intro { margin-top: 18px !important; }
.tm-dlg-sec { margin-top: 24px; }
.tm-dlg-sec h3 { margin: 0 0 8px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.01em; color: var(--mut); }
.tm-does { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tm-does li { position: relative; padding-left: 20px; font-size: 0.98rem; line-height: 1.6; color: var(--ink); }
.tm-does li::before { content: "//"; position: absolute; left: 0; top: 0; font-family: var(--font-mono); font-size: 0.78rem; line-height: 1.95; color: var(--signal-ink); }
.tm-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 24px; }
.tm-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tm-tags li { padding: 5px 12px; border-radius: var(--radius-full); background: var(--fill); font-size: 0.86rem; line-height: 1.4; color: var(--ink); }
.tm-tags--mono li { font-family: var(--font-mono); font-size: 0.75rem; color: var(--mut); }
.tm-mates { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.tm-mates button { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 72px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 0.8rem; font-weight: 500; cursor: pointer; }
.tm-mates .tm-face { width: 56px; margin: 0; }
.tm-mates button:hover .tm-face { transform: translateY(-3px); }

/* ---------- 窄屏 ---------- */
@media (max-width: 980px) {
  .tm-stats, .tm-vals, .tm-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tm-level + .tm-level::before { display: none; }
  .tm-flow { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .tm-step { display: grid; grid-template-columns: 56px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 14px; row-gap: 2px; align-items: center; text-align: left; padding: 12px 14px; }
  .tm-step .tm-step-face { grid-row: 1 / 3; width: 56px; height: 56px; }
  .tm-step-who { align-self: end; }
  .tm-step-what { align-self: start; }
  .tm-step + .tm-step::before { left: 41px; top: -8px; width: 2px; height: 8px; }
  .tm-person svg { width: 24px; height: 24px; }
}
@media (max-width: 720px) {
  .tm-dlg { width: 100%; max-width: 100%; max-height: calc(100% - 24px); margin: auto 0 0; border-radius: var(--radius-xl) var(--radius-xl) 0 0; overflow-y: auto; }
  .tm-dlg-in { display: block; max-height: none; }
  .tm-dlg-art { aspect-ratio: 16 / 11; min-height: 0; }
  .tm-dlg-art img { object-position: 50% 32%; }
  .tm-dlg-body { overflow: visible; max-height: none; padding-top: 22px; }
  .tm-dlg-bar { position: sticky; top: 12px; right: auto; justify-content: flex-end; margin: 12px 12px -48px; }
  .tm-two { grid-template-columns: minmax(0, 1fr); }
  .tm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 10px; }
  .tm-search { flex: 1 1 100%; }
}
@media (max-width: 520px) {
  .tm-vals, .tm-levels { grid-template-columns: minmax(0, 1fr); }
}
