/* 22 · Team dashboard (team.html, team.theaicourse.ai). PROTOTYPE.
   Spec: docs/team-seats-checkout/team-dashboard/spec.md (AI With Remy project). Loads after 21-team.css and reuses its
   tm- tokens: warm paper for numbers, white cards for actions, the bevelled blue button, Space Mono eyebrows.
   Signed in, the header grows an account chip and tabs (Overview, Team, Seats, Billing). The sign-in screens are a
   centred login; the Add seats flow keeps 21-team.css's two-card layout. body[data-mode] says which one is showing. */

/* ---- Sign-in: a centred login, logo, product name and two callouts above the card ------------------------------ */
.tm-login-intro, .tm-login-back { display: none; }
.tm-page[data-mode="auth"] .tm-head { display: none; } /* the logo moves above the product name; no header, no rule */
.tm-page[data-mode="auth"] .tm-main { padding-block: clamp(40px, 10vh, 104px) 72px; }
.tm-page[data-mode="auth"] .tm-grid { display: flex; flex-direction: column; align-items: center; gap: 0; max-width: 560px; margin: 0 auto; }
.tm-page[data-mode="auth"] .tm-summary { display: none; }
.tm-page[data-mode="auth"] .tm-panel { width: 100%; max-width: 460px; }
.tm-page[data-mode="auth"] .tm-panel { text-align: center; }
.tm-page[data-mode="auth"] .tm-title { font-size: 24px; margin-bottom: 20px; }
.tm-page[data-mode="auth"] .tm-sub { margin-inline: auto; }
.tm-page[data-mode="auth"] .tm-panel input[type="email"] { text-align: center; }
.tm-page[data-mode="auth"] .tm-code, .tm-page[data-mode="auth"] .tm-code-links, .tm-page[data-mode="auth"] .tm-actions { justify-content: center; }
.tm-page[data-mode="auth"] .tm-login-intro { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 28px; }
.tm-page .tm-login-logo { color: var(--ink); text-decoration: none; }
.tm-login-logo .tm-wordmark { font-size: 24px; line-height: 28px; letter-spacing: -0.045em; }
.tm-login-name { margin: 8px 0 20px; font-size: 40px; line-height: 1.1; font-weight: 500; letter-spacing: -0.045em; color: var(--ink); text-wrap: balance; }
/* Under the name, above the card: two stacked lines, icons in one lane, the block centred by the intro column. */
.tm-login-points { list-style: none; margin: 0; padding: 0; max-width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.tm-login-points li { display: flex; flex-direction: row; align-items: center; gap: 10px; font-size: 16px; line-height: 24px; color: var(--tm-ink-2); text-align: left; }
.tm-login-icon { width: 24px; height: 24px; flex: 0 0 24px; }
.tm-page[data-mode="auth"] .tm-login-back { display: block; margin: 20px 0 0; font-size: 13px; }
.tm-page .tm-login-back a { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; color: var(--tm-muted); text-decoration: none; }
.tm-page .tm-login-back a:hover { color: var(--ink); }
@media (max-width: 480px) { .tm-login-name { font-size: 32px; } }

/* ---- Add seats: what a seat gets you, above the order ------------------------------------------------------------ */
.tm-page[data-mode="wizard"] .tm-sum-title { font-size: 26px; }
.tm-summary.is-tall { position: static; } /* taller than a laptop screen, so it scrolls with the page */
.tm-sum-rule { margin: 0; border: 0; border-top: 1px solid var(--tm-paper-line); }

/* ---- Header: account chip and tabs ---------------------------------------------------------------------------- */
/* One bar: wordmark left, tabs centred, the account menu right. Under 880px the tabs take a second row. */
.tm-page .tm-head-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-rows: 64px; align-items: center; gap: 0 24px; min-height: 0; padding-block: 0; }
.tm-page .tm-head-inner > .tm-brand { grid-column: 1; justify-self: start; }
.tm-page .tm-head-inner > .tm-account { grid-column: 3; justify-self: end; }
.tm-account { display: flex; flex-direction: row; align-items: center; font-size: 13px; }
.tm-menu { position: relative; }
.tm-page .tm-acct-btn { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border: 1px solid transparent; border-radius: 999px; background: none; color: var(--tm-muted); cursor: pointer; }
.tm-page .tm-acct-btn:hover, .tm-page .tm-acct-btn[aria-expanded="true"] { border-color: var(--tm-line); background: var(--bg-white); color: var(--ink); }
.tm-acct-photo { display: block; width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--tm-paper-shelf); }
.tm-acct-btn .tm-avatar-md { width: 34px; height: 34px; flex: 0 0 34px; }
.tm-acct-chev { transition: transform 160ms ease; }
.tm-acct-btn[aria-expanded="true"] .tm-acct-chev { transform: rotate(180deg); }
.tm-menu-pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; min-width: 240px; max-width: calc(100vw - 32px); padding: 6px; display: flex; flex-direction: column; background: var(--bg-white); border: 1px solid var(--tm-card-line); border-radius: 12px; box-shadow: 0 16px 36px rgba(26, 24, 22, 0.12); }
.tm-menu-pop[hidden] { display: none; }
.tm-menu-who { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--tm-line); }
.tm-page .tm-menu-name { margin: 0; font-size: 14px; font-weight: 500; color: var(--ink); }
.tm-page .tm-menu-email { margin: 0; font-size: 12px; color: var(--tm-muted); overflow-wrap: anywhere; }
.tm-menu-who .tm-role { margin-top: 8px; }
/* Company logo: in the menu next to "Change company logo", and above the company name on the overview. */
#tm-logo-pick { white-space: nowrap; }
.tm-menu-logo { height: 20px; width: auto; max-width: 64px; object-fit: contain; flex: 0 0 auto; }
.tm-co-logo { display: block; height: 48px; width: auto; max-width: min(240px, 100%); object-fit: contain; object-position: left center; margin-bottom: 16px; }
@media (max-width: 640px) { .tm-co-logo { height: 40px; margin-bottom: 12px; } }
.tm-page .tm-menu-item { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 14px; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; }
.tm-page .tm-menu-item:hover, .tm-page .tm-menu-item:focus-visible { background: var(--tm-paper-soft); }
.tm-role { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; background: var(--tm-paper); border: 1px solid var(--tm-paper-line); font-family: var(--font-mono); font-size: 10px; line-height: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tm-ink-2); white-space: nowrap; }

.tm-tabs { grid-column: 2; align-self: stretch; display: flex; flex-direction: row; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tm-tabs::-webkit-scrollbar { display: none; }
.tm-page .tm-tab { position: relative; flex: 0 0 auto; display: flex; align-items: center; padding: 0 12px; font-size: 14px; color: var(--tm-muted); text-decoration: none; }
.tm-page .tm-tab:hover { color: var(--ink); }
.tm-page .tm-tab[aria-current="page"] { color: var(--ink); font-weight: 500; }
.tm-tab[aria-current="page"]::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--blue); }

.tm-page .tm-back { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; margin-bottom: 18px; font-size: 13px; color: var(--tm-muted); text-decoration: none; }
.tm-page .tm-back:hover { color: var(--ink); }

/* ---- Avatars ---------------------------------------------------------------------------------------------------- */
.tm-page .tm-avatar-xs, .tm-page .tm-avatar-sm, .tm-page .tm-avatar-md { background: var(--tm-paper-shelf); color: var(--ink); font-weight: 600; letter-spacing: 0.02em; }
.tm-page .tm-avatar-xs { width: 26px; height: 26px; flex: 0 0 26px; font-size: 10px; }
.tm-page .tm-avatar-sm { width: 30px; height: 30px; flex: 0 0 30px; font-size: 11px; }
.tm-page .tm-avatar-md { width: 38px; height: 38px; flex: 0 0 38px; font-size: 12px; }
.tm-page .tm-avatar.is-me { background: var(--ink); color: var(--tm-paper); }

/* ---- Page head -------------------------------------------------------------------------------------------------- */
.tm-dash { min-width: 0; }
.tm-dash.is-entering > * { animation: tm-rise 0.36s var(--ease) both; }
.tm-dash.is-entering > *:nth-child(2) { animation-delay: 40ms; }
.tm-dash.is-entering > *:nth-child(3) { animation-delay: 80ms; }
.tm-dash.is-entering > *:nth-child(n+4) { animation-delay: 120ms; }
.tm-dhead { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 28px; }
.tm-dhead-text { min-width: 0; flex: 1 1 420px; }
.tm-dtitle { margin: 10px 0 8px; font-size: 36px; line-height: 1.08; letter-spacing: -0.045em; font-weight: 500; text-wrap: balance; }
.tm-dsub { margin: 0; color: var(--tm-ink-2); max-width: 64ch; }
/* Overview: "<Company> Team Dashboard", with the site's yellow highlighter behind the company (as on the sales hero). */
.tm-dtitle-co { font-size: 46px; line-height: 1.08; margin-top: 12px; }
.tm-dhead-text > .tm-dtitle-co:first-child { margin-top: 0; }
.tm-hl { position: relative; isolation: isolate; display: inline-block; }
.tm-hl::before { content: ''; position: absolute; z-index: -1; left: -4px; right: -4px; top: 0.3em; bottom: 0.02em; border-radius: 2px; background: #FFE76A; transform: rotate(-1deg); transform-origin: 0 0; }
.tm-dhead-actions { display: flex; flex-direction: row; gap: 10px; }

/* ---- Shared bits ------------------------------------------------------------------------------------------------- */
.tm-page .tm-muted { color: var(--tm-muted); }
.tm-page p.tm-muted { margin: 0; font-size: 13px; }
.tm-done-text { color: var(--tm-green); font-weight: 500; }
.tm-bar { display: block; height: 6px; min-width: 40px; border-radius: 999px; background: var(--tm-paper-shelf); overflow: hidden; }
.tm-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--blue); transition: width 0.6s var(--ease); }
.tm-bar.is-full > span { background: var(--tm-green-stroke); }
.tm-bar-lg { height: 10px; }
.tm-pill-ok { background: var(--tm-green-wash); color: var(--tm-green); }
.tm-pill-warn { background: var(--tm-amber-wash); color: var(--tm-amber); }
.tm-pill-error, .tm-pill-red { background: var(--tm-red-wash); color: var(--tm-red); }
.tm-pill-muted { background: var(--tm-paper-soft); color: var(--tm-muted); box-shadow: inset 0 0 0 1px var(--tm-line); }
.tm-pill-blue { background: var(--tm-blue-wash); color: var(--tm-blue-deep); }
.tm-tag { display: inline-block; margin-left: 8px; padding: 1px 6px; border: 1px solid var(--tm-field-line); border-radius: 4px; font-family: var(--font-mono); font-size: 10px; line-height: 1.5; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tm-ink-2); vertical-align: 2px; font-weight: 400; }
.tm-tag-me { background: var(--tm-blue-wash); border-color: #D6D6FF; color: var(--tm-blue-deep); }
.tm-btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.tm-callout-blue { background: var(--tm-blue-wash); border-color: #D6D6FF; color: var(--tm-blue-deep); }
.tm-callout-blue strong { color: var(--tm-blue-deep); }
.tm-page .tm-arrow-link { margin-top: auto; align-self: flex-start; color: var(--blue); font-size: 14px; font-weight: 500; text-decoration: none; }
.tm-page .tm-arrow-link:hover { text-decoration: underline; }

/* ---- The two key tiles ----------------------------------------------------------------------------------------- */
.tm-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.tm-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; min-width: 0; padding: 26px 28px 28px; background: var(--bg-white); border: 1px solid var(--tm-card-line); border-radius: 14px; box-shadow: 0 2px 0 var(--tm-line); }
.tm-tile-icon { display: block; width: 80px; height: 80px; margin: -10px 0 -4px -11px; }
.tm-tile-title { margin: 0; font-size: 20px; line-height: 1.25; letter-spacing: -0.03em; font-weight: 500; }
.tm-tile-actions .tm-link { font-size: 14px; }
.tm-tile-copy { margin: 0; color: var(--tm-ink-2); max-width: 46ch; }
.tm-tile-perks { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 10px; }
.tm-tile-perks li { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 12px; font-size: 14px; line-height: 1.4; color: var(--tm-muted); }
.tm-tile-perks img { display: block; width: 28px; height: 28px; }
.tm-tile-perks strong { font-weight: 500; color: var(--ink); }
.tm-tile-actions { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: auto; padding-top: 26px; }
/* Add team members: Add seats and Book a call on one line, Book a call on the right; Manage seats (admins) is a
   quiet link in the tile's top-right corner. */
.tm-tile-actions-split { align-self: stretch; justify-content: space-between; }
.tm-page .tm-tile-corner { position: absolute; top: 24px; right: 28px; font-size: 13px; line-height: 18px; color: var(--tm-muted); text-decoration: underline; text-decoration-color: var(--tm-field-line); text-underline-offset: 3px; }
.tm-page .tm-tile-corner:hover { color: var(--ink); text-decoration-color: currentColor; }
/* View my team: the door on the left, three key numbers on the right. */
.tm-tile-split { flex-direction: row; align-items: stretch; gap: 24px; }
.tm-tile-body { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; flex: 1 1 auto; min-width: 0; }
.tm-tile-stats { margin: 0; flex: 0 0 auto; min-width: 150px; display: flex; flex-direction: column; justify-content: center; padding-left: 24px; border-left: 1px solid var(--tm-line); }
.tm-tile-stats > div { display: flex; flex-direction: column-reverse; gap: 2px; padding-block: 10px; }
.tm-tile-stats > div + div { border-top: 1px solid var(--tm-line); }
.tm-tile-stats dd { margin: 0; font-size: 24px; line-height: 28px; font-weight: 500; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.tm-tile-stats dt { font-size: 12px; line-height: 16px; color: var(--tm-muted); }




/* ---- Leaderboard (overview) ------------------------------------------------------------------------------------- */
.tm-board { margin-top: 20px; gap: 12px; }
.tm-board-head { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; }
.tm-board-intro { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tm-seg { display: inline-flex; flex-direction: row; gap: 2px; padding: 3px; border: 1px solid var(--tm-card-line); border-radius: 999px; background: var(--tm-paper-soft); }
.tm-seg button { font: inherit; font-size: 13px; padding: 5px 13px; border-radius: 999px; color: var(--tm-ink-2); cursor: pointer; }
.tm-seg button:hover { color: var(--ink); }
.tm-seg button[aria-pressed="true"] { background: var(--bg-white); color: var(--ink); font-weight: 500; box-shadow: 0 0 0 1px var(--tm-card-line), 0 1px 0 var(--tm-line); }
.tm-seg button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.tm-board-cols, .tm-board-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) minmax(150px, 240px) 92px; align-items: center; gap: 14px; }
.tm-board-cols { padding: 6px 8px 8px; border-bottom: 1px solid var(--tm-line); font-size: 12px; color: var(--tm-muted); }
.tm-board-cols .is-active { color: var(--ink); font-weight: 500; }
.tm-board-cols span:last-child, .tm-board-calls { text-align: right; }
.tm-board-list { list-style: none; margin: 0; padding: 0; }
.tm-board-row { padding: 10px 8px; border-bottom: 1px solid var(--tm-line); }
.tm-board-row:last-child { border-bottom: 0; }
/* The viewer's own row is their progress tile: blue wash, raised, with their next lesson underneath. */
.tm-board-row.is-me { margin-block: 4px; padding: 12px 10px; background: var(--tm-blue-wash); border: 1px solid #D6D6FF; border-radius: 12px; box-shadow: 0 2px 0 #DCDCFF; row-gap: 8px; }
.tm-board-row.is-me .tm-board-name { color: var(--tm-blue-deep); }
.tm-rank.is-you { background: var(--blue); color: #fff; box-shadow: inset 0 0 0 1px var(--tm-blue-deep); }
.tm-board-who .tm-tag { margin-left: 0; flex: 0 0 auto; }
.tm-board-next { grid-column: 2 / -1; display: flex; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 13px; color: var(--tm-blue-deep); }
.tm-page .tm-board-next a { color: var(--blue); font-weight: 500; text-decoration: none; }
.tm-page .tm-board-next a:hover { text-decoration: underline; }
.tm-board-gap { display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 8px; font-size: 12px; color: var(--tm-muted); }
.tm-board-gap::before, .tm-board-gap::after { content: ''; flex: 1 1 auto; border-top: 1px dashed var(--tm-field-line); }
.tm-rank { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; font-family: var(--font-mono); font-size: 13px; color: var(--tm-ink-2); font-variant-numeric: tabular-nums; }
/* Top three in the icon set's brass, steel and copper. */
.tm-rank.is-gold { background: linear-gradient(#F4D26A, #DDAE3E); color: #4E3604; box-shadow: inset 0 0 0 1px rgba(122, 86, 10, 0.22); }
.tm-rank.is-silver { background: linear-gradient(#EEF0F2, #B9BFC6); color: #33383E; box-shadow: inset 0 0 0 1px rgba(60, 66, 74, 0.18); }
.tm-rank.is-bronze { background: linear-gradient(#F0C29C, #C98A5E); color: #45250F; box-shadow: inset 0 0 0 1px rgba(110, 60, 25, 0.2); }
.tm-board-who { display: flex; flex-direction: row; align-items: center; gap: 10px; min-width: 0; }
.tm-board-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.tm-board-who .tm-pill { flex: 0 0 auto; }
.tm-board-course { display: flex; flex-direction: row; align-items: center; gap: 10px; min-width: 0; }
.tm-board-course .tm-bar { flex: 1 1 auto; }
.tm-board-pct { width: 38px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.tm-board-calls { font-size: 13px; color: var(--tm-muted); white-space: nowrap; }
.tm-board-calls strong { margin-right: 2px; font-size: 15px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.tm-board[data-by="calls"] .tm-board-course .tm-bar > span { background: var(--tm-field-line); }
.tm-board[data-by="calls"] .tm-board-course .tm-bar.is-full > span { background: #9CC7AE; }
.tm-board-foot { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 0 8px; }

/* ---- Lower cards (needs attention, billing, your progress, admins) --------------------------------------------- */
.tm-lower { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.tm-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 24px; background: var(--bg-white); border: 1px solid var(--tm-card-line); border-radius: 14px; }
/* Book a call: iClosed's calendar fills the card and sizes itself (data-resize); the floor covers the load. */
/* Book a call (Charlie, 2026-10-09): no box of ours, just iClosed's own form, centred, the frame cut to its edges.
   iClosed's form is a fixed 811px two-column card once its frame is 900px or wider, else one column up to 480px
   wide; its height comes from iClosed's widget_height messages (widget.js sets the container's height). */
.tm-call { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 8px; }
.tm-call-frame { width: 100%; max-width: 480px; overflow: hidden; border-radius: 6px; }
.tm-call-frame .iclosed-widget { width: 100%; }
@media (min-width: 880px) {
  .tm-call-frame { max-width: none; width: 812px; }
  .tm-call-frame .iclosed-widget { width: 900px; margin-left: -44px; }
}
.tm-page .tm-call-alt { margin: 0; font-size: 13px; color: var(--tm-muted); text-align: center; }
.tm-page .tm-call-alt a { color: var(--ink); }
.tm-dash > .tm-card, .tm-dash > .tm-seats + .tm-card { margin-top: 20px; }
.tm-card-title { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.tm-card-big { margin: 0; font-size: 34px; line-height: 1.1; font-weight: 500; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.tm-card-big span { margin-left: 4px; font-size: 15px; font-weight: 400; letter-spacing: 0; color: var(--tm-ink-2); }
.tm-card .tm-btn { align-self: flex-start; margin-top: 4px; }
.tm-attn { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tm-attn li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 11px 0; border-top: 1px solid var(--tm-line); font-size: 14px; }
.tm-attn li:first-child { border-top: 0; padding-top: 2px; }
.tm-attn p { margin: 0; color: var(--tm-ink-2); }
.tm-attn svg { margin-top: 2px; }
.tm-attn .tm-link { white-space: nowrap; }
.tm-allgood { display: flex; flex-direction: row; align-items: center; gap: 10px; margin: 0; font-size: 14px; color: var(--tm-ink-2); }

/* ---- Team view ---------------------------------------------------------------------------------------------------- */
.tm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 24px; }
.tm-stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tm-stats > div { min-width: 0; padding: 14px 16px 16px; background: var(--tm-paper); border: 1px solid var(--tm-paper-line); border-radius: 10px; box-shadow: 0 2px 0 var(--tm-paper-shelf); }
.tm-stats dt { font-size: 12px; color: var(--tm-muted); }
.tm-stats dd { margin: 4px 0 0; font-size: 28px; line-height: 1.15; font-weight: 500; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.tm-stats p { margin: 2px 0 0; font-size: 12px; color: var(--tm-muted); }

.tm-listbar { display: flex; flex-direction: row; align-items: center; justify-content: flex-end; margin-bottom: 12px; }
.tm-sort { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; font-size: 13px; color: var(--tm-muted); }
.tm-sort select { font: inherit; font-size: 13px; color: var(--ink); padding: 6px 10px; border: 1px solid var(--tm-field-line); border-radius: 8px; background: var(--bg-white); cursor: pointer; }

.tm-people, .tm-seats { list-style: none; margin: 0; padding: 0; background: var(--bg-white); border: 1px solid var(--tm-card-line); border-radius: 14px; overflow: hidden; }
.tm-person + .tm-person, .tm-seat + .tm-seat { border-top: 1px solid var(--tm-line); }
.tm-person.is-me { background: var(--tm-paper-soft); }
.tm-person-main { display: grid; grid-template-columns: 38px minmax(0, 1.05fr) minmax(0, 1fr) 32px; align-items: center; gap: 14px; padding: 14px 16px; }
.tm-person-id { min-width: 0; }
.tm-person-name { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.tm-person-sub { margin: 1px 0 0; font-size: 13px; color: var(--tm-muted); overflow-wrap: anywhere; }
.tm-person-prog { min-width: 0; }
.tm-prog-top { display: flex; flex-direction: row; align-items: center; gap: 10px; }
.tm-prog-top .tm-bar { flex: 1 1 auto; }
.tm-prog-pct { width: 38px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.tm-prog-next { margin: 5px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.tm-person.is-pending .tm-prog-next { margin-top: 4px; }
.tm-expand { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: var(--tm-muted); cursor: pointer; }
.tm-expand:hover { background: var(--tm-paper-soft); color: var(--ink); }
.tm-expand svg { transition: transform 0.2s var(--ease); }
.tm-expand[aria-expanded="true"] svg { transform: rotate(180deg); }
.tm-expand:focus-visible { outline: 2px solid var(--blue); outline-offset: 0; }
.tm-modules { padding: 2px 16px 18px 68px; }
.tm-modules ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 28px; }
.tm-modules li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(60px, 90px) 34px; align-items: center; gap: 10px; font-size: 13px; color: var(--tm-muted); }
.tm-modules li.is-started, .tm-modules li.is-done { color: var(--tm-ink-2); }
.tm-mod-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-mod-count { text-align: right; font-size: 12px; color: var(--tm-muted); font-variant-numeric: tabular-nums; }

/* ---- Seats view --------------------------------------------------------------------------------------------------- */
.tm-dash .tm-callout { margin-bottom: 8px; }
.tm-seat-cols, .tm-seat { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr) minmax(0, 1.2fr) 148px; gap: 10px 18px; }
.tm-seat-cols { padding: 14px 16px 6px; font-size: 12px; color: var(--tm-muted); }
/* Manage team members: a checkbox column, the bulk bar at the top right of the table, and picked rows. */
.tm-seat-cols.is-selecting, .tm-seats.is-selecting .tm-seat { grid-template-columns: 22px minmax(0, 1.3fr) minmax(0, 0.8fr) minmax(0, 1.2fr) 148px; }
.tm-seat-check { display: grid; place-items: center; align-self: start; padding-top: 2px; cursor: pointer; }
.tm-page .tm-seat-check input, .tm-page .tm-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); cursor: pointer; }
.tm-seat.is-picked { background: var(--tm-blue-wash); }
.tm-seats-bar { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 22px; }
.tm-seats-bar p { margin: 0; }
.tm-seats-bar.is-selecting { padding: 10px 12px 10px 16px; border: 1px solid #D6D6FF; border-radius: 12px; background: var(--tm-blue-wash); }
.tm-check { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; cursor: pointer; }
.tm-select-count { flex: 1 1 auto; font-size: 14px; color: var(--tm-blue-deep); font-variant-numeric: tabular-nums; }
.tm-select-actions { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.tm-btn-danger-quiet { background: var(--bg-white); color: var(--tm-red); border: 1px solid #EDB3A5; box-shadow: 0 2px 0 var(--tm-line); }
.tm-btn-danger-quiet:hover:not(:disabled) { border-color: var(--tm-red); }
.tm-dash > .tm-confirm { margin-top: 12px; }
.tm-confirm-total { margin: 0; font-size: 14px; font-weight: 500; color: var(--ink); }
.tm-seat { align-items: center; padding: 14px 16px; }
.tm-seat.is-leaving .tm-seat-name { color: var(--tm-muted); }
.tm-seat-plan { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 12px; min-width: 0; }
.tm-seat.is-editing { background: var(--tm-paper-soft); }
.tm-seat-id { min-width: 0; }
.tm-seat-name { margin: 0; font-weight: 500; }
.tm-seat-login { margin: 2px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.tm-seat-login .tm-mono { font-size: 12px; margin-left: 4px; }
.tm-seat-note { display: flex; flex-direction: row; align-items: flex-start; gap: 6px; margin: 6px 0 0; font-size: 12px; color: var(--tm-amber); max-width: 60ch; }
.tm-seat-note svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 1px; }
.tm-seat-state { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 12px; }
/* Row actions sit in the last column, right-aligned, stacked when there are two. */
.tm-seat-actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.tm-seat-actions .tm-btn { width: 100%; white-space: nowrap; }
.tm-seat.is-editing .tm-seat-actions:empty { display: none; }
.tm-page .tm-link-danger { color: var(--tm-red); }
.tm-btn-danger { background: var(--tm-red); color: #fff; border: 1px solid #9E2C15; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 0 #9E2C15; }
.tm-btn-danger:hover:not(:disabled) { transform: translateY(-1px); }
.tm-confirm { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border: 1px solid #F2C6BA; border-radius: 10px; background: var(--tm-red-wash); }
.tm-confirm-title { margin: 0; font-weight: 600; }
.tm-confirm ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--tm-ink-2); }
.tm-confirm-actions { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding-top: 2px; }
.tm-admins { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tm-admins li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--tm-line); }
.tm-admins li:first-child { border-top: 0; padding-top: 2px; }
.tm-admin-who { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.tm-admin-who .tm-muted { font-size: 13px; }
.tm-fix { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; padding-top: 2px; }
.tm-fix label { font-size: 13px; font-weight: 500; }
.tm-fix-row { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; }
.tm-page .tm-fix-row input { flex: 1 1 260px; width: auto; }
.tm-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 20px; padding: 24px; border: 1px dashed var(--tm-field-line); border-radius: 14px; color: var(--tm-ink-2); }
.tm-empty p { margin: 0; }
.tm-admins-card { gap: 6px; }

/* ---- Billing ------------------------------------------------------------------------------------------------------ */
.tm-subs { list-style: none; margin: 0; padding: 0; }
.tm-subs li { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding: 14px 0; border-top: 1px solid var(--tm-line); }
.tm-subs li:first-child { border-top: 0; padding-top: 2px; }
.tm-subs p { margin: 0; }
.tm-subs-main p:first-child { display: flex; flex-direction: row; align-items: center; gap: 10px; margin-bottom: 2px; }
.tm-subs-pay { display: flex; flex-direction: row; align-items: center; gap: 14px; font-size: 14px; text-align: right; }
.tm-subs-pay .tm-btn { margin-top: 0; }
.tm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tm-table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--tm-muted); padding: 0 0 8px; border-bottom: 1px solid var(--tm-line); }
.tm-table td { padding: 11px 0; border-bottom: 1px solid var(--tm-line); }
.tm-table tr:last-child td { border-bottom: 0; padding-bottom: 0; }
.tm-table .is-num { text-align: right; font-variant-numeric: tabular-nums; }
.tm-card-head { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.tm-page .tm-doc-no { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 11px; color: var(--tm-muted); }
.tm-doc-links { text-align: right; white-space: nowrap; }
.tm-page .tm-doc-links a { display: inline-flex; flex-direction: row; align-items: center; gap: 5px; margin-left: 16px; font-size: 13px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--tm-field-line); text-underline-offset: 3px; }
.tm-page .tm-doc-links a:hover { text-decoration-color: currentColor; }
.tm-table td + td, .tm-table th + th { padding-left: 16px; }
.tm-bill-fine { margin-top: 18px; max-width: 72ch; }

/* ---- Loading, toast ----------------------------------------------------------------------------------------------- */
.tm-dload .tm-alert { margin-top: 12px; }
.tm-skel { border-radius: 10px; background: linear-gradient(90deg, var(--tm-paper-soft) 0%, var(--tm-paper-shelf) 50%, var(--tm-paper-soft) 100%); background-size: 200% 100%; animation: tm-shimmer 1.4s linear infinite; }
.tm-skel-line { width: 200px; height: 12px; margin-bottom: 14px; }
.tm-skel-title { width: 340px; max-width: 80%; height: 38px; margin-bottom: 32px; }
.tm-skel-tile { height: 320px; border-radius: 14px; }
@keyframes tm-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.tm-toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; margin: 0; max-width: calc(100vw - 32px); padding: 11px 16px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: 0 10px 30px rgba(26, 24, 22, 0.18); opacity: 0; transform: translate(-50%, 12px); transition: opacity 0.2s, transform 0.28s var(--ease); pointer-events: none; }
.tm-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---- Add seats: a name beside each teammate email ------------------------------------------------------------------ */
.tm-rows-head { margin-bottom: 10px; }
.tm-rows-head .tm-rows-label { margin-bottom: 2px; }
.tm-row-main { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) 40px; gap: 6px; align-items: center; }
.tm-row-name { min-width: 0; }
/* 21-team.css colours every input in a flagged row; only the email is checked, so the name keeps its normal border. */
.tm-row.is-error .tm-row-name input:not(:focus), .tm-row.is-warn .tm-row-name input:not(:focus) { border-color: var(--tm-field-line); }
.tm-review-list strong { font-weight: 600; margin-right: 2px; }

/* ---- Tablet and phone ------------------------------------------------------------------------------------------------- */
@media (max-width: 880px) {
  .tm-page .tm-head-inner { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 60px auto; }
  .tm-page .tm-head-inner > .tm-account { grid-column: 2; grid-row: 1; }
  .tm-tabs { grid-column: 1 / -1; grid-row: 2; height: 44px; }
  .tm-page .tm-tab:first-child { margin-left: -12px; }
  .tm-tiles, .tm-lower { grid-template-columns: minmax(0, 1fr); }
  .tm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tm-person-main { grid-template-columns: 38px minmax(0, 1fr) 32px; row-gap: 10px; }
  .tm-person-prog { grid-column: 2 / 4; grid-row: 2; }
  .tm-expand, .tm-expand-gap { grid-column: 3; grid-row: 1; }
  .tm-modules { padding-left: 16px; }
  .tm-modules ol { grid-template-columns: minmax(0, 1fr); }
  .tm-seat { grid-template-columns: minmax(0, 1fr) auto; }
  .tm-seat-cols, .tm-seat-cols.is-selecting { display: none; }
  .tm-seats.is-selecting .tm-seat { grid-template-columns: 22px minmax(0, 1fr); }
  .tm-seats.is-selecting .tm-seat-state, .tm-seats.is-selecting .tm-seat-plan { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
  .tm-select-actions { width: 100%; }
  .tm-seat-plan { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
  .tm-seat-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .tm-seat-actions:empty { display: none; }
  .tm-seat-actions .tm-btn { width: auto; }
}
@media (max-width: 600px) {
  .tm-doc-links { white-space: normal; }
  .tm-page .tm-doc-links a { display: flex; justify-content: flex-end; margin: 0 0 6px; }
  .tm-page .tm-doc-links a:last-child { margin-bottom: 0; }
  .tm-page .tm-tab { padding-inline: 8px; font-size: 13.5px; }
  .tm-page .tm-tab:first-child { margin-left: -8px; }
  .tm-tab[aria-current="page"]::after { left: 8px; right: 8px; }
  .tm-dhead { margin-bottom: 22px; }
  .tm-dtitle { font-size: 29px; }
  .tm-dtitle-co { font-size: 34px; }
  .tm-board-cols { display: none; }
  .tm-board-row { grid-template-columns: 28px minmax(0, 1fr) auto; row-gap: 8px; padding-inline: 4px; }
  .tm-board-course { grid-column: 2 / 4; grid-row: 2; }
  .tm-board-next { grid-column: 2 / 4; grid-row: 3; }
  .tm-board-foot { padding: 0 4px; }
  .tm-board-who .tm-pill { display: none; }
  .tm-dhead-actions, .tm-dhead-actions .tm-btn { width: 100%; }
  .tm-tile, .tm-card { padding: 22px 18px; }
  .tm-tiles, .tm-lower { gap: 14px; }
  .tm-lower { margin-top: 14px; }
  .tm-tile-icon { width: 68px; height: 68px; margin: -8px 0 -4px -9px; }
  .tm-tile-actions .tm-btn { flex: 1 1 auto; }
  .tm-tile-actions-split .tm-btn { flex: 0 0 auto; }
  .tm-tile-split { gap: 16px; }
  .tm-tile-stats { min-width: 118px; padding-left: 16px; }
  .tm-tile-stats dd { font-size: 20px; line-height: 24px; }
  .tm-stats { gap: 8px; }
  .tm-stats > div { padding: 12px 14px 14px; }
  .tm-stats dd { font-size: 24px; }
  .tm-stats-3 { grid-template-columns: minmax(0, 1fr); }
  .tm-person-main, .tm-seat { padding: 14px; }
  .tm-subs li { flex-direction: column; align-items: flex-start; }
  .tm-subs-pay { text-align: left; flex-wrap: wrap; }
  .tm-row-main { grid-template-columns: minmax(0, 1fr) 40px; row-gap: 6px; }
  .tm-row-name, .tm-row-field { grid-column: 1; }
  .tm-row-remove { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .tm-rows { gap: 18px; }
  .tm-toast { bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .tm-dash.is-entering > * { animation: none; }
  .tm-bar > span, .tm-expand svg, .tm-toast { transition: none; }
  .tm-skel { animation: none; }
}

/* ---- Footer (Charlie, 2026-10-09): always at the bottom of the window, centred on the sign-in page and on phones -- */
.tm-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.tm-page > .tm-main { flex: 1 0 auto; }
.tm-page[data-mode="auth"] .tm-foot-inner { justify-content: center; }
@media (max-width: 600px) {
  .tm-foot-inner { flex-direction: column; align-items: center; text-align: center; gap: 8px; padding-block: 18px calc(22px + env(safe-area-inset-bottom, 0px)); }
  .tm-foot-contact { margin: 0; }
  .tm-foot-links { flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
}

/* ---- Phones (Charlie, 2026-10-09): compact overview tiles. The icon sits beside the title, the copy and buttons
   run full width under it, and View my team's stats become one row of three above its button. ---------------------- */
@media (max-width: 600px) {
  .tm-tile { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 10px 12px; padding: 16px; border-radius: 12px; }
  .tm-tile > *, .tm-tile-body > * { grid-column: 1 / -1; }
  .tm-tile-body { display: contents; }
  .tm-tile .tm-tile-icon { grid-column: 1; width: 56px; height: 56px; margin: -7px 0 -7px -8px; }
  .tm-tile .tm-tile-title { grid-column: 2; font-size: 17px; line-height: 1.3; }
  .tm-tile-corner + .tm-tile-icon + .tm-tile-title { padding-right: 92px; } /* clear of Manage seats in the corner */
  .tm-tile-copy { font-size: 14px; line-height: 1.5; }
  .tm-tile-actions { padding-top: 2px; gap: 10px; }
  .tm-tile-actions .tm-btn, .tm-tile-actions-split .tm-btn { flex: 1 1 0; min-height: 42px; padding: 0 12px; font-size: 14px; }
  .tm-page .tm-tile-corner { top: 28px; right: 16px; font-size: 12px; }
  .tm-tile-stats { order: 1; flex-direction: row; min-width: 0; padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--tm-line); }
  .tm-tile-stats > div { flex: 1 1 0; min-width: 0; justify-content: flex-end; padding: 0 0 0 12px; }
  .tm-tile-stats > div:first-child { padding-left: 0; }
  .tm-tile-stats > div + div { border-top: 0; border-left: 1px solid var(--tm-line); }
  .tm-tile-stats dd { font-size: 19px; line-height: 24px; }
  .tm-tile-stats dt { font-size: 11px; line-height: 14px; }
  .tm-tile-team-actions { order: 2; }
}

/* Your Circle picture on the order card (Charlie, 2026-10-09). */
.tm-avatar-photo { display: block; object-fit: cover; background: var(--tm-paper-shelf); }

/* ---- AI With Remy admin view (Charlie, 2026-10-10): a row of pills above the dashboard switches between All teams and
   each company; All teams is a grid of company cards (logo, name, members). Staff also send billing and cancel. -------- */
.tm-plat { margin: 0 0 28px; }
.tm-plat[hidden] { display: none; }
/* All teams stays fixed on the left (always a way back, Charlie 2026-10-11); the companies scroll beside it. The row is
   position: relative so it is the pills' offsetParent (js/team.js showPressed measures each pill within it). It fades
   at whichever edge has more to see; overscroll-behavior stops a sideways swipe at the end from going back a page. */
.tm-plat-bar { display: grid; grid-template-columns: auto auto auto minmax(0, 1fr); align-items: center; gap: 4px 8px; }
/* The slider under the companies (Charlie, 2026-10-12): drag the thumb, or press anywhere along it, to slide through
   them all. A 20px hit area around a 6px track; hidden when every company fits. */
.tm-plat-scrub { grid-column: 4; padding: 0 4px; }
.tm-plat-scrub[hidden] { display: none; }
.tm-plat-track { position: relative; height: 20px; border-radius: 999px; cursor: pointer; touch-action: none; outline: none; }
.tm-plat-track::before { content: ''; position: absolute; left: 0; right: 0; top: 7px; height: 6px; border-radius: 999px; background: var(--tm-paper-shelf); box-shadow: inset 0 0 0 1px var(--tm-paper-line); }
.tm-plat-thumb { position: absolute; left: 0; top: 5px; width: 44px; height: 10px; border-radius: 999px; background: var(--tm-ink-2); opacity: 0.55; cursor: grab; transition: opacity 0.15s; will-change: transform; }
.tm-plat-track:hover .tm-plat-thumb, .tm-plat-track:focus-visible .tm-plat-thumb, .tm-plat-track.is-dragging .tm-plat-thumb { opacity: 0.9; }
.tm-plat-track.is-dragging, .tm-plat-track.is-dragging .tm-plat-thumb { cursor: grabbing; }
.tm-plat-track:focus-visible { box-shadow: 0 0 0 2px var(--blue); }
.tm-plat-div { flex: 0 0 auto; width: 1px; height: 22px; background: var(--tm-card-line); }
.tm-plat-row { position: relative; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: row; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-padding-inline: 40px; padding: 4px; }
.tm-plat-row::-webkit-scrollbar { display: none; }
.tm-plat-row.is-more-left, .tm-plat-row.is-more-right { -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--tm-fade-l, 0px), #000 calc(100% - var(--tm-fade-r, 0px)), transparent); mask-image: linear-gradient(90deg, transparent, #000 var(--tm-fade-l, 0px), #000 calc(100% - var(--tm-fade-r, 0px)), transparent); }
.tm-plat-row.is-more-left { --tm-fade-l: 36px; }
.tm-plat-row.is-more-right { --tm-fade-r: 36px; }
.tm-plat-row.is-dragging { cursor: grabbing; user-select: none; }
.tm-plat-row.is-dragging .tm-plat-pill { cursor: grabbing; }
.tm-plat-pill { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; flex: 0 0 auto; height: 36px; padding: 0 15px; border: 1px solid var(--tm-card-line); border-radius: 999px; background: var(--bg-white); color: var(--tm-ink-2); font: inherit; font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; cursor: pointer; box-shadow: 0 1px 0 var(--tm-line); transition: border-color 0.15s, background-color 0.15s, color 0.15s; }
.tm-plat-pill:hover { border-color: var(--tm-field-line); color: var(--ink); }
.tm-plat-pill:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.tm-plat-pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: none; }
.tm-plat-all { padding-left: 12px; }
.tm-plat-n { padding: 2px 6px; border-radius: 999px; background: var(--tm-paper); color: var(--tm-muted); font-family: var(--font-mono); font-size: 11px; font-weight: 400; }
.tm-plat-pill[aria-pressed="true"] .tm-plat-n { background: rgba(255, 255, 255, 0.16); color: #fff; }

/* A company's logo, or its initials until it has one. */
.tm-tmark { display: inline-flex; flex-direction: row; align-items: center; justify-content: center; flex: 0 0 auto; border: 1px solid var(--tm-paper-line); background: var(--tm-paper); color: var(--tm-ink-2); font-family: var(--font-mono); font-weight: 400; letter-spacing: 0.02em; }
.tm-tmark-lg { width: 52px; height: 52px; border-radius: 12px; font-size: 16px; }
img.tm-tmark-lg { width: auto; max-width: 100%; height: 44px; padding: 0; border: 0; border-radius: 0; background: none; object-fit: contain; object-position: left center; }

.tm-teams-bar { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin: 0 0 16px; }
.tm-teams-search { position: relative; display: flex; flex-direction: row; align-items: center; flex: 1 1 260px; max-width: 380px; color: var(--tm-muted); }
.tm-teams-search svg { position: absolute; left: 13px; pointer-events: none; }
.tm-teams-search input { width: 100%; height: 40px; padding: 0 14px 0 36px; border: 1px solid var(--tm-field-line); border-radius: 999px; background: var(--bg-white); color: var(--ink); font: inherit; font-size: 14px; }
.tm-teams-search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--tm-blue-wash); }
.tm-teams-tools { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.tm-teamgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.tm-teamgrid > li { display: flex; min-width: 0; }
.tm-tcard { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; min-height: 156px; padding: 18px 18px 16px; border: 1px solid var(--tm-card-line); border-radius: 14px; background: var(--bg-white); color: var(--ink); font: inherit; text-align: left; cursor: pointer; box-shadow: 0 2px 0 var(--tm-line); transition: transform 0.18s var(--ease), border-color 0.18s, box-shadow 0.18s; }
.tm-tcard:hover { transform: translateY(-2px); border-color: var(--tm-field-line); box-shadow: 0 4px 0 var(--tm-line); }
.tm-tcard:active { transform: translateY(0); box-shadow: 0 1px 0 var(--tm-line); }
.tm-tcard:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.tm-tcard-name { margin-top: auto; padding-top: 14px; font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.tm-tcard-meta { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; color: var(--tm-muted); }
.tm-tcard-plan { padding: 1px 7px; border-radius: 999px; background: var(--tm-blue-wash); color: var(--tm-blue-deep); font-family: var(--font-mono); font-size: 10px; line-height: 1.6; letter-spacing: 0.06em; text-transform: uppercase; }
.tm-skel-tcard { height: 156px; border-radius: 14px; }
.tm-page .tm-teams-none { margin: 0; padding: 24px; border: 1px dashed var(--tm-field-line); border-radius: 14px; color: var(--tm-ink-2); }
.tm-staff-stats { margin-bottom: 28px; }
.tm-teams-fine { margin-top: 18px; }
.tm-teams-fine .tm-link { font-size: inherit; }

/* Make someone an admin (Admins card), email billing, cancel a purchase. */
.tm-add-admin { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 4px; padding-top: 12px; border-top: 1px solid var(--tm-line); }
.tm-add-admin label, .tm-send-field > span { font-size: 13px; color: var(--tm-muted); }
.tm-add-admin-row { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.tm-add-admin select { flex: 1 1 260px; }
.tm-send-field select { width: 100%; }
.tm-send-field input, .tm-send-field textarea { width: 100%; box-sizing: border-box; min-width: 0; padding: 8px 10px; border: 1px solid var(--tm-field-line); border-radius: 8px; background: var(--bg-white); color: var(--ink); font: inherit; font-size: 14px; }
.tm-send-field input { height: 38px; }
.tm-send-field textarea { resize: vertical; }
.tm-gt-send .tm-send-field { flex-basis: 100%; }
.tm-add-admin select, .tm-send-field select { min-width: 0; max-width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--tm-field-line); border-radius: 8px; background: var(--bg-white); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.tm-card-head-actions { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; }
.tm-confirm.tm-send { margin: 4px 0 8px; border-color: var(--tm-card-line); background: var(--tm-paper-soft); }
.tm-send-fields { display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px 14px; }
.tm-send-field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 220px; min-width: 0; }
.tm-page .tm-doc-send { display: inline-flex; flex-direction: row; align-items: center; gap: 5px; margin-left: 16px; padding: 0; border: 0; background: none; color: var(--blue); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.tm-page .tm-doc-send:hover { text-decoration-color: currentColor; }
.tm-subs li > .tm-confirm { flex: 1 1 100%; }
/* The confirm list sits inside a subscription row, so it drops the row's own layout. */
.tm-subs .tm-confirm li { display: list-item; padding: 0; border-top: 0; }
@media (max-width: 600px) {
  .tm-plat { margin-bottom: 22px; }
  /* Room for the companies beside All teams: no count (All teams shows it) and shorter fades. */
  .tm-plat-all .tm-plat-n { display: none; }
  .tm-plat-row.is-more-left { --tm-fade-l: 20px; }
  .tm-plat-row.is-more-right { --tm-fade-r: 20px; }
  .tm-teams-search { max-width: none; flex-basis: 100%; }
  .tm-teams-tools { width: 100%; justify-content: space-between; }
  .tm-teams-tools .tm-sort > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tm-teamgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tm-tcard { min-height: 138px; padding: 14px 14px 12px; border-radius: 12px; }
  .tm-tmark-lg { width: 44px; height: 44px; border-radius: 10px; font-size: 14px; }
  img.tm-tmark-lg { height: 36px; }
  .tm-page .tm-doc-send { display: flex; justify-content: flex-end; margin: 6px 0 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .tm-tcard, .tm-tcard:hover, .tm-tcard:active { transform: none; transition: none; }
}

/* Referral tab: the faint purple box marks it in the tab row. Golden tickets are the one gold thing on the page. */
.tm-page .tm-tab.tm-tab-ref, .tm-page .tm-tab.tm-tab-ref:hover, .tm-page .tm-tab.tm-tab-ref[aria-current="page"] { color: #5B3FE0; font-weight: 600; }
.tm-stats-of { font-size: 16px; letter-spacing: -0.02em; color: var(--tm-muted); }
.tm-gts { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tm-gt-item { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
/* Golden ticket: Paper "04 Torn blue ticket" master (1460x770). --u is one design pixel at the rendered width. */
.tm-gt { position: relative; aspect-ratio: 1460 / 770; container-type: inline-size; }
.tm-gt > div { --u: calc(100cqw / 1460); position: absolute; height: calc(690 * var(--u)); transform: rotate(-1deg); transform-origin: 0 0; background-position: center; background-size: 100% 100%; background-repeat: no-repeat; }
.tm-gt-paper { left: 0; top: calc(35 * var(--u)); width: calc(1080 * var(--u)); background-image: url('/assets/img/team/ticket-paper.svg'); color: #1A1816; }
.tm-gt-stub { left: calc(1010 * var(--u)); top: calc(17.37 * var(--u)); width: calc(374 * var(--u)); background-image: url('/assets/img/team/ticket-stub.svg'); color: #fff; }
.tm-gt-paper > *, .tm-gt-stub > * { position: absolute; }
.tm-gt-top { left: calc(92 * var(--u)); top: calc(84 * var(--u)); width: calc(824 * var(--u)); display: flex; flex-direction: row; justify-content: space-between; align-items: center; }
.tm-gt-logo { width: calc(280 * var(--u)); height: calc(40 * var(--u)); background: url('/assets/img/team/ticket-logo.svg') center / 100% 100% no-repeat; }
.tm-gt-no, .tm-gt-label, .tm-gt-brand, .tm-gt-code { font-family: 'Space Mono', var(--font-mono), monospace; text-transform: uppercase; }
.tm-gt-no, .tm-gt-paper .tm-gt-label { font-size: calc(16 * var(--u)); line-height: calc(20 * var(--u)); letter-spacing: 0.05em; color: #696966; }
.tm-gt-marker { left: calc(62 * var(--u)); top: calc(211 * var(--u)); width: calc(620 * var(--u)); height: calc(255 * var(--u)); transform: rotate(-1deg); transform-origin: 0 0; }
.tm-gt-deal { left: calc(79 * var(--u)); top: calc(170 * var(--u)); display: flex; flex-direction: row; align-items: baseline; gap: calc(20 * var(--u)); font-family: 'Inter', system-ui, sans-serif; white-space: nowrap; }
.tm-gt-value { font-size: calc(260 * var(--u)); line-height: calc(296 * var(--u)); font-weight: 600; letter-spacing: -0.065em; }
.tm-gt-off { font-size: calc(80 * var(--u)); line-height: calc(102 * var(--u)); font-weight: 500; letter-spacing: -0.04em; }
.tm-gt-by { left: calc(98 * var(--u)); top: calc(497 * var(--u)); width: calc(814 * var(--u)); padding-top: calc(24 * var(--u)); border-top: max(1px, calc(1 * var(--u))) solid #CACAC7; display: flex; flex-direction: column; gap: calc(10 * var(--u)); }
.tm-gt-name { font-size: calc(36 * var(--u)); line-height: calc(44 * var(--u)); font-weight: 500; letter-spacing: -0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-gt-face { left: calc(41 * var(--u)); top: calc(86 * var(--u)); width: calc(288 * var(--u)); display: flex; flex-direction: column; align-items: center; gap: calc(32 * var(--u)); }
.tm-gt-brand { font-size: calc(17 * var(--u)); line-height: calc(22 * var(--u)); letter-spacing: 0.08em; }
.tm-gt-arrow { width: calc(176 * var(--u)); height: calc(176 * var(--u)); flex-shrink: 0; }
.tm-gt-hand { font-family: 'Caveat', cursive; font-size: calc(43 * var(--u)); line-height: calc(46 * var(--u)); font-weight: 500; text-align: center; transform: rotate(-3deg); }
.tm-gt-codebox { left: calc(45 * var(--u)); top: calc(518 * var(--u)); width: calc(280 * var(--u)); padding-top: calc(20 * var(--u)); border-top: max(1px, calc(1 * var(--u))) solid #FFFFFF66; display: flex; flex-direction: column; align-items: center; gap: calc(12 * var(--u)); }
.tm-gt-stub .tm-gt-label { font-size: calc(15 * var(--u)); line-height: calc(20 * var(--u)); letter-spacing: 0.08em; }
.tm-gt-code { font-size: calc(27 * var(--u)); line-height: calc(34 * var(--u)); font-weight: 700; letter-spacing: -0.035em; white-space: nowrap; }
/* Claimed: the same ticket, spent. The highlight comes off and the stub fades to grey. */
.tm-gt.is-used .tm-gt-marker { opacity: 0; }
.tm-gt.is-used .tm-gt-value, .tm-gt.is-used .tm-gt-off { color: #9C9A95; text-decoration: line-through; text-decoration-thickness: 0.04em; }
.tm-gt.is-used .tm-gt-stub { filter: grayscale(1) opacity(0.55); }
.tm-gt.is-refunded .tm-gt-paper { opacity: 0.7; }
.tm-gt-actions { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; }
.tm-gt-actions .tm-btn { margin-top: 0; }
.tm-gt-note { margin: 0; display: flex; flex-direction: row; align-items: center; gap: 8px; font-size: 13px; }
.tm-card.tm-gt-pay { gap: 16px; }
.tm-gt-pay-head { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 20px; }
.tm-gt-steps { margin: 0; padding-left: 22px; list-style: decimal outside; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.5; color: var(--ink); }
.tm-gt-steps strong { font-weight: 500; }
.tm-card.tm-gt-pay p { margin: 4px 0 0; }
.tm-card.tm-gt-pay .tm-btn { align-self: center; flex: 0 0 auto; margin-top: 0; }
@media (max-width: 900px) { .tm-gts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .tm-gts { grid-template-columns: minmax(0, 1fr); }
  .tm-gt-pay-head { flex-direction: column; align-items: stretch; }
  .tm-card.tm-gt-pay .tm-btn { width: 100%; }
}
.tm-stats-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 560px; }
.tm-dhead-text .tm-dsub + .tm-dsub { margin-top: 10px; }
.tm-gt-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 32px; align-items: start; margin-bottom: 28px; }
.tm-gt-intro .tm-dsub { max-width: 46ch; }
.tm-gt-how { padding: 18px 20px; background: var(--bg-white); border: 1px solid var(--tm-card-line); border-radius: 14px; }
.tm-gt-how ul { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.tm-gt-how li { display: flex; flex-direction: row; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.tm-star { flex: 0 0 auto; margin-top: 1px; }
.tm-gt-how mark { background: #FFE76A; color: inherit; padding: 0 3px; border-radius: 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
@media (max-width: 900px) { .tm-gt-head { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
.tm-gt-intro .tm-stats-2 { margin: 20px 0 0; }
.tm-gt-head { margin-bottom: 24px; }

/* Referrals (AI With Remy admin): the members table, reusing tm-table, tm-seg and the All teams bar. */
.tm-refs-card { padding: 0; overflow: hidden; }
.tm-refs-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tm-refs { min-width: 1080px; }
.tm-refs th, .tm-refs td { padding-left: 12px; padding-right: 12px; white-space: nowrap; }
.tm-refs > thead th { padding-top: 14px; }
.tm-refs-sort { font: inherit; color: inherit; cursor: pointer; padding: 0; }
.tm-refs-sort:hover, .tm-refs th[aria-sort="ascending"] .tm-refs-sort, .tm-refs th[aria-sort="descending"] .tm-refs-sort { color: var(--ink); }
.tm-refs-who { display: flex; flex-direction: row; align-items: flex-start; gap: 8px; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.tm-refs-caret { width: 12px; color: var(--tm-muted); }
.tm-refs-sub { display: block; font-size: 12px; color: var(--tm-muted); }
.tm-refs-row.is-open > td { border-bottom-color: transparent; background: var(--tm-paper-soft); }
.tm-refs-detail > td { background: var(--tm-paper-soft); padding: 4px 12px 16px 32px; white-space: normal; }
.tm-refs-actions { margin: 0 0 8px; }
.tm-refs-tickets { font-size: 13px; }
.tm-refs-tickets td, .tm-refs-tickets th { padding-left: 0; padding-right: 16px; }
.tm-refs-code { font-family: 'Space Mono', var(--font-mono), monospace; }
.tm-refs-seg { flex-wrap: wrap; border-radius: 18px; }
@media (max-width: 600px) { .tm-refs-seg { width: 100%; } .tm-refs-seg button { flex: 1 1 auto; } }
.tm-gt-steps li { display: list-item; padding-left: 4px; }
.tm-gt-steps li::marker { color: var(--tm-muted); font-variant-numeric: tabular-nums; }
.tm-page a.tm-tile-ref { display: flex; flex-direction: row; align-items: center; gap: 18px; margin-top: 20px; padding: 18px 22px; text-decoration: none; color: inherit; }
.tm-tile-ref .tm-tile-icon { width: 96px; height: 64px; margin: 0; flex: 0 0 auto; }
.tm-tile-ref-text { flex: 1 1 auto; min-width: 0; }
.tm-tile-ref .tm-tile-title { margin: 0; }
.tm-tile-ref .tm-tile-copy { margin: 4px 0 0; }
.tm-tile-ref mark { background: #FFE76A; color: inherit; padding: 0 3px; border-radius: 2px; }
.tm-tile-ref .tm-btn { flex: 0 0 auto; margin: 0; }
.tm-page a.tm-tile-ref:hover .tm-btn { border-color: var(--tm-ink-2); }
@media (max-width: 640px) { .tm-page a.tm-tile-ref { flex-wrap: wrap; } .tm-tile-ref .tm-btn { width: 100%; } }
