/* The team pages: layout only. Type, colour, buttons and fields come from
   the shell (/shell/shell.css). */
.tm {
  box-sizing: border-box;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-4xl) var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}
.tm-head { display: flex; flex-direction: column; gap: var(--space-md); }
.tm-row { display: flex; flex-wrap: wrap; gap: var(--space-md); align-items: center; }
.tm-stack { display: flex; flex-direction: column; gap: var(--space-md); align-items: flex-start; }
.tm-stack .field { text-align: left; }
.tm-note { color: var(--ink-3); }
.tm-error { color: var(--scent); }

/* The agreement: read in full before the Sign step opens. */
.tm-doc {
  max-height: 52vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}
.tm-block { display: flex; flex-direction: column; gap: var(--space-xs); }
.tm-block p { margin: 0; white-space: pre-wrap; }
.tm-end { height: 1px; }

/* The signature pad: a fixed 1000 by 400 drawing at any width. */
.tm-pad {
  display: block;
  width: 100%;
  aspect-ratio: 1000 / 400;
  border: 1px solid var(--line-2);
  color: var(--ink);
  touch-action: none;
  cursor: crosshair;
}
.tm-pad-wrap { display: flex; flex-direction: column; gap: var(--space-sm); width: 100%; }

.tm-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-sm); }
.tm-list li { display: flex; justify-content: space-between; gap: var(--space-lg); border-bottom: 1px solid var(--line); padding-bottom: var(--space-sm); }

.tm-sign-img { width: 100%; max-width: 420px; border: 1px solid var(--line); background: var(--white); }

@media (max-width: 767px) {
  .tm { padding: var(--space-2xl) var(--space-lg); }
}

/* A hidden step stays hidden whatever its layout says. */
.tm [hidden] { display: none !important; }
/* Buttons sit at the start of their row, not centred. */
.tm .btn { margin: 0; }
/* Fingerprints are long unbroken strings: they wrap on a phone. */
.tm { overflow-wrap: anywhere; }
