/* Reservision teams (CP3, mock page 10): the leader's team page and the join page, black (After Hours).
   Sits inside .hz (hosting.css sets the dark roles there). Tokens only (tokens.css); no green, no red but the error
   role, gold on money only; pill buttons, 6 px fields, nothing a thumb taps under 44 px (--tap), no shadows. */

.tm-head { display: flex; align-items: center; gap: var(--s3); }
.tm-emblem {
  flex: none; width: 52px; height: 52px; border-radius: var(--radius); object-fit: cover;
  border: var(--rule-width) solid var(--rule); background: var(--surface);
}
.tm-initial {
  display: inline-flex; align-items: center; justify-content: center; border: var(--outline-width) solid var(--text);
  font-family: var(--font-headline); font-size: 22px; line-height: 1;
}
.tm-who { min-width: 0; display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.tm-name { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.tm-tag {
  display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 4px; background: var(--raised);
  border: var(--rule-width) solid var(--rule); font-size: 11px; font-weight: 800; letter-spacing: 0.04em;
}

/* ---------- fields ---------- */
.tm-form { display: flex; flex-direction: column; gap: var(--s2); }
.tm-field { display: block; margin: 0; }
.tm-field > span { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px 2px; }
.tm-field > span i { font-style: normal; font-weight: 400; color: var(--muted); }
.tm-field input, .tm-field textarea {
  display: block; width: 100%; min-height: 52px; padding: 0 var(--s4); font: inherit; font-size: 16px;
  color: var(--text); background: var(--bg); border: var(--rule-width) solid var(--rule); border-radius: var(--radius); outline: none;
}
.tm-field textarea { padding: var(--s3) var(--s4); resize: vertical; line-height: 1.45; }
.tm-field input:focus, .tm-field textarea:focus { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.tm-field input::placeholder { color: var(--muted); opacity: 0.8; }
.tm-err { margin: 0; font-size: 13px; font-weight: 600; color: var(--alert); }
.tm-err:empty { display: none; }

/* ---------- requests, invites, the team list ---------- */
.tm-rows, .tm-list { list-style: none; margin: 0; padding: 0; }
.tm-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2); flex-wrap: wrap;
  min-height: var(--tap); padding: var(--s2) 0; border-top: var(--rule-width) solid var(--rule);
}
.tm-row:last-child { border-bottom: var(--rule-width) solid var(--rule); }
.tm-row-name { min-width: 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.tm-row-sub { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.tm-ig { font-weight: 400; color: var(--muted); }
.tm-row-act { display: flex; align-items: center; gap: var(--s3); }
.tm-link {
  display: flex; flex-direction: column; justify-content: center; min-height: var(--tap); padding: var(--s2) 0;
  border-top: var(--rule-width) solid var(--rule); color: var(--text); text-decoration: none;
}
.tm-list li:last-child .tm-link { border-bottom: var(--rule-width) solid var(--rule); }
.tm-link-name { font-size: 16px; font-weight: 700; }
.tm-link-sub { font-size: 13px; color: var(--muted); }

/* ---------- the members table: four short columns that fit 390 px ---------- */
.tm-table { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
.tm-table th {
  padding: 0 var(--s1) var(--s2) 0; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted);
  border-bottom: var(--rule-width) solid var(--rule); vertical-align: bottom;
}
.tm-table th:first-child { width: 40%; }
.tm-table td { padding: var(--s2) var(--s1) var(--s2) 0; border-bottom: var(--rule-width) solid var(--rule); vertical-align: top; }
.tm-table .n { text-align: right; font-variant-numeric: var(--num); }
.tm-cell-name { display: block; font-weight: 600; overflow-wrap: anywhere; }
.tm-remove { font-size: 13px; color: var(--muted); }

/* ---------- tag, emblem, pay ---------- */
.tm-upload { display: flex; flex-direction: column; gap: var(--s2); align-items: flex-start; }
.tm-file { min-height: var(--tap); padding: 0 var(--s4); }
.tm-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.tm-upload:focus-within .tm-file { outline: 2px solid var(--text); outline-offset: 2px; }
.tm-pay-line { margin: 0; font-size: 15px; line-height: 1.45; }
.tm-money { color: var(--money); font-weight: 700; }
.tm-asked { margin: 0; font-weight: 600; }

/* ---------- the join page ---------- */
.tm-join { gap: var(--s3); }
.tm-state { margin: 0; font-size: 18px; font-weight: 800; }
.tm-out-row { display: flex; justify-content: flex-start; }

@media (max-width: 400px) {
  .tm-table { font-size: 13px; }
  .tm-table th { font-size: 11px; }
}

/* Two-tap confirm (team.js armFirst): the armed Remove / Leave reads in full text colour, like hosting.css. */
.textlink.linkbtn.armed { color: var(--text); }

/* ---------- mock match (11-04, Team.dc.html): the page frame, the nav, two columns on a wide screen ---------- */
.tm-page { min-height: 100vh; background: var(--night); }
.tm-page .hz { --bg: var(--night); }
.tm-page .top {
  height: auto; max-width: 1280px; margin: 0 auto; padding: 20px 24px; justify-content: flex-start; flex-wrap: wrap;
  gap: var(--s5); border-bottom: var(--rule-width) solid var(--dark-rule);
}
.tm-page .lockup { gap: 10px; }
.tm-page .lockup .mascot-svg { width: 32px; height: 32px; }
.tm-nav { display: flex; flex-wrap: wrap; gap: var(--s5); font-size: 15px; font-weight: 600; }
.tm-nav a { color: var(--dark-text); text-decoration: none; display: inline-flex; align-items: center; min-height: var(--tap); }
.tm-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 3px; }
.tm-page .hz { max-width: 1280px; margin: 0 auto; width: 100%; padding: 32px 24px 64px; }
.tm-wide { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 32px; }
.tm-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.tm-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 700px) {
  .tm-page .top, .tm-page .hz { padding-left: var(--s4); padding-right: var(--s4); }
  .tm-main, .tm-side { flex-basis: 100%; }
}

/* the head: 72 px emblem, 36 px name, the org line under it, INVITE A HOST on the right */
.tm-head { gap: var(--s4); flex-wrap: wrap; }
.tm-head .tm-emblem { width: 72px; height: 72px; }
.tm-head .tm-initial { background: var(--off-white); color: var(--black); border: 0; font-size: 24px; }
.tm-who { flex-direction: column; align-items: flex-start; gap: 0; }
.tm-head .tm-name { font-size: 36px; }
.tm-sub { margin: 0; font-size: 15px; color: var(--muted); }
.tm-invite-btn { margin-left: auto; min-height: 48px; padding: 0 22px; font-size: 13px; letter-spacing: 0.04em; }

/* charcoal cards: Requests and invites, the invite panel, Team tag, Team pay */
.tm-card { background: var(--surface); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: var(--s3); }
.tm-card > h2 { margin: 0; font-size: 20px; font-weight: 800; }
.tm-side .tm-card > h2 { font-size: 18px; }
.tm-side .tm-card { gap: var(--s3); }
.tm-card .tm-field input, .tm-card .tm-field textarea { background: var(--night); min-height: 44px; font-size: 15px; }
.tm-card .tm-field > span { font-size: 14px; }
.tm-card .tm-rows .tm-row { border-top: 0; border-bottom: var(--rule-width) solid var(--rule); padding: 0 0 var(--s3); gap: var(--s3); }
.tm-card .tm-rows .tm-row:last-child { border-bottom: 0; padding-bottom: 0; }
.tm-rows { display: flex; flex-direction: column; gap: var(--s3); }
.tm-row-name { font-weight: 400; }
.tm-row-name b { font-weight: 700; }
.tm-row-act { gap: var(--s2); }
.tm-row-act .pill { font-size: 12px; padding: 0 var(--s4); }
.tm-row-note { font-size: 13px; color: var(--muted); }
.tm .pill.plain { text-transform: none; letter-spacing: 0; font-weight: 700; }
.tm .pill.tm-quiet { border-width: var(--rule-width); border-color: var(--rule); }

/* members: a header line and one charcoal row per host, 2fr 1fr 1fr 1fr */
.tm-grid { display: flex; flex-direction: column; gap: 10px; }
.tm-grid-head, .tm-grid-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--s2); align-items: center; }
.tm-grid-head { font-size: 13px; color: var(--muted); padding: 0 var(--s1); }
.tm-grid-row { background: var(--surface); border-radius: var(--radius); padding: var(--s3); font-size: 15px; }
.tm-grid-row .n { font-variant-numeric: var(--num); }
.tm-cell-host { min-width: 0; overflow-wrap: anywhere; }
.tm-cell-host .tm-remove { min-height: 0; font-size: 12px; margin-left: var(--s1); }
@media (max-width: 480px) {
  .tm-grid-head { font-size: 11px; }
  .tm-grid-row { font-size: 14px; }
}

/* the tag preview and the side buttons */
.tm-preview { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tm-badge {
  display: inline-flex; align-items: center; gap: 6px; background: var(--soot); border: var(--rule-width) solid var(--rule);
  border-radius: 4px; padding: 4px 8px; font-size: 13px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
}
.tm-badge-emblem { width: 16px; height: 16px; border-radius: 2px; object-fit: cover; }
.tm-hint { font-size: 13px; color: var(--muted); }
.tm-side .tm-upload { align-items: stretch; }
.tm-side .tm-file { width: 100%; min-height: 44px; font-size: 13px; }
.tm-side .pill.wide { min-height: 44px; font-size: 13px; }
.tm-side .tm-pay-line { font-size: 14px; line-height: 1.5; color: var(--muted); }

/* ---------- 1.5.0 Checkpoint 3 (mock page 23b): the team offer on /hosting's Home ----------
   A card like a pair invite, shown only to the person offered: the line, the org's note, ACCEPT / No, then the
   name + tag sheet in place of the two buttons. */
.tm-offers { margin-top: var(--s3); }
.tm-offer {
  display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4); border-radius: var(--radius);
  background: var(--surface); border: var(--rule-width) solid var(--rule);
}
.tm-offer p { margin: 0; }
.tm-offer-kicker { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tm-offer-line { font-size: 18px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.tm-offer-note { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.tm-offer-ask { font-size: 14px; color: var(--muted); }
.tm-offer-acts[hidden], .tm-offer-sheet[hidden] { display: none; }
