/* ==================================================================================================
   People — auth, onboarding, invitations, settings, people directory, teams. Owner: people agent.
   Scoped under page roots: .people-auth (body of auth pages), .people-settings, .people-page,
   .person-page, .teams-page, .team-page, plus modal bodies (.invite-form, .delete-confirm,
   .team-fields, .people-picker). Tokens only; decorative motion under no-preference.
   ================================================================================================== */

/* -- Shared bits ----------------------------------------------------------------------------------- */
.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  opacity: 0;
}
.file-input:focus-visible + label {
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.segmented__count {
  margin-left: 2px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* -- Auth pages ------------------------------------------------------------------------------------ */
.people-auth .auth-card__subtitle {
  text-wrap: balance;
}
.people-auth--wide .auth-card {
  max-width: 560px;
}
.people-auth .inline-form {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 6px;
}
.people-auth .inline-form .link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}
.auth-invite {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: calc(var(--space-2) * -1) 0 var(--space-5);
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  background: var(--fill-1);
}
.auth-invite__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}
.auth-invite__text strong {
  font-weight: var(--fw-semibold);
}
.auth-invite__text span {
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.auth-note {
  color: var(--text-2);
  font-size: var(--fs-sm);
  text-align: center;
  text-wrap: balance;
}

/* Status cards (reset sent / done / expired) */
.auth-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
}
.auth-status__art {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-top: calc(var(--space-2) * -1);
  border-radius: 22px;
  background: var(--tone-soft);
  color: var(--tone-ink);
}
.auth-status__text {
  color: var(--text);
  font-size: var(--fs-lg);
  line-height: var(--lh-normal);
  text-wrap: pretty;
}
.auth-status__text strong {
  font-weight: var(--fw-semibold);
  overflow-wrap: anywhere;
}
.auth-status__hint {
  color: var(--text-2);
  font-size: var(--fs-sm);
  text-wrap: balance;
}
.auth-status__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
  margin-top: var(--space-3);
}
@media (prefers-reduced-motion: no-preference) {
  .auth-status__art--pop {
    animation: people-pop 520ms var(--ease-spring) 180ms both;
  }
}
@keyframes people-pop {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
}

/* Password strength meter */
.pw-meter {
  display: grid;
  gap: 6px;
  margin-top: 2px;
}
.pw-meter__bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.pw-meter__bars span {
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--fill-2);
  transition: background-color var(--dur-2) ease;
}
.pw-meter__label {
  color: var(--text-2);
  font-size: var(--fs-xs);
}
.pw-meter[data-score="0"] .pw-meter__bars span:nth-child(-n + 1),
.pw-meter[data-score="1"] .pw-meter__bars span:nth-child(-n + 1) {
  background: var(--danger);
}
.pw-meter[data-score="2"] .pw-meter__bars span:nth-child(-n + 2) {
  background: var(--warning);
}
.pw-meter[data-score="3"] .pw-meter__bars span:nth-child(-n + 3),
.pw-meter[data-score="4"] .pw-meter__bars span {
  background: var(--success);
}
.pw-meter[data-score="0"] .pw-meter__label,
.pw-meter[data-score="1"] .pw-meter__label {
  color: var(--danger-ink);
}
.pw-meter[data-score="3"] .pw-meter__label,
.pw-meter[data-score="4"] .pw-meter__label {
  color: var(--success-ink);
}

/* Invitation card (accept page) */
.invite-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  padding: var(--space-5) var(--space-4) var(--space-4);
  border-radius: var(--radius-xl);
  background: var(--fill-1);
  text-align: center;
}
.invite-card__tile {
  --size: 64px;
  box-shadow: var(--shadow-md);
}
.invite-card__name {
  max-width: 100%;
  margin-top: var(--space-1);
  overflow-wrap: anywhere;
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-snug);
}
.invite-card__people {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: var(--fs-sm);
  --avatar-ring: var(--surface);
}
.invite-card__facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin: var(--space-2) 0 0;
}
.invite-card__facts > div {
  display: flex;
  flex-direction: column;
  min-width: 88px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--card-ring);
}
.invite-card__facts dt {
  color: var(--text-3);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.invite-card__facts dd {
  margin: 0;
  font-weight: var(--fw-semibold);
}
.invite-card__help {
  max-width: 34ch;
  color: var(--text-2);
  font-size: var(--fs-sm);
  text-wrap: balance;
}

/* -- Workspace identity (name + color + logo with live tile) ------------------------------------------ */
.ws-identity {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.ws-identity__preview {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: var(--surface-sunken);
}
.ws-identity__tile {
  --size: 52px;
  position: relative;
  border-radius: 15px;
  box-shadow: var(--shadow-sm);
  transition: background var(--dur-3) var(--ease-out);
}
.ws-identity__tile img {
  position: absolute;
  inset: 0;
}
.ws-identity__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ws-identity__name {
  overflow: hidden;
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-snug);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ws-identity__name:empty::before {
  content: "\2014";
  color: var(--text-3);
}
.ws-identity__sub {
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.ws-identity__logo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}
.ws-identity .swatches {
  gap: 4px;
}

/* -- Onboarding ------------------------------------------------------------------------------------- */
.ob-invites {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}
.ob-invites__title {
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}
.ob-invite {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--card-ring), var(--shadow-xs);
  color: inherit;
  transition: box-shadow var(--dur-2) ease, transform var(--dur-2) var(--ease-out);
}
.ob-invite:hover {
  box-shadow: 0 0 0 1px var(--card-ring), var(--shadow-md);
}
.ob-invite__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.ob-invite__text strong {
  font-weight: var(--fw-semibold);
}
.ob-invite__text span {
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.ob-invites .divider {
  margin-top: var(--space-3);
}

.onboarding {
  --dir: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.onboarding.is-back {
  --dir: -1;
}
.ob-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.ob-progress__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  color: var(--text-3);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
}
.ob-progress__item::before {
  content: "";
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--fill-2);
  transition: background-color var(--dur-3) var(--ease-out);
}
.ob-progress__item.is-current,
.ob-progress__item.is-done {
  color: var(--text);
}
.ob-progress__item.is-current::before,
.ob-progress__item.is-done::before {
  background: var(--accent);
}
.ob-progress__dot {
  display: none;
}
.ob-progress__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Without JS every step is visible; the progress bar is meaningless there. */
html:not(.js) .ob-progress {
  display: none;
}

.ob-step {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.ob-step__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ob-step__title {
  font-size: var(--fs-title-3);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-tight);
}
.ob-step__text {
  color: var(--text-2);
  text-wrap: pretty;
}
.ob-nav {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.ob-nav .btn--lg.btn--secondary {
  flex: none;
  width: var(--control-h-lg);
  padding: 0;
}
.ob-nav .grow {
  flex: 1;
}
html:not(.js) .ob-nav,
html:not(.js) .ob-add {
  display: none;
}
.ob-nojs-submit {
  display: none;
}
html:not(.js) .ob-nojs-submit {
  display: block;
}
html:not(.js) .ob-step + .ob-step {
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}
/* Before Alpine starts, show only the initial step (no flash of the whole flow). */
.js .onboarding:not(.is-ready)[data-initial-step="1"] .ob-step:not([data-step="1"]),
.js .onboarding:not(.is-ready)[data-initial-step="2"] .ob-step:not([data-step="2"]),
.js .onboarding:not(.is-ready)[data-initial-step="3"] .ob-step:not([data-step="3"]) {
  display: none;
}
.ob-emails {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ob-add {
  align-self: flex-start;
  margin-top: 2px;
}
.ob-templates {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}
@media (min-width: 560px) {
  .ob-templates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ob-templates legend {
    grid-column: 1 / -1;
  }
}
.ob-template {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-strong);
  cursor: pointer;
  transition: box-shadow var(--dur-2) ease, background-color var(--dur-2) ease;
}
.ob-template:hover {
  background: var(--surface-2);
}
.ob-template input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ob-template:has(input:checked) {
  background: var(--accent-softer);
  box-shadow: 0 0 0 2px var(--accent);
}
.ob-template:has(input:focus-visible) {
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 5px var(--focus-ring);
}
.ob-template__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.ob-template__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ob-template__name {
  font-weight: var(--fw-semibold);
}
.ob-template__desc {
  color: var(--text-2);
  font-size: var(--fs-xs);
  line-height: var(--lh-snug);
}
.ob-template__check {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  color: transparent;
  transition: background-color var(--dur-2) ease, color var(--dur-2) ease;
}
.ob-template:has(input:checked) .ob-template__check {
  background: var(--accent);
  box-shadow: none;
  color: var(--text-on-accent);
}
.ob-template__columns {
  display: flex;
  gap: 4px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, black 85%, transparent);
  mask-image: linear-gradient(to right, black 85%, transparent);
}
.ob-template__column {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  border-radius: var(--radius-full);
  background: var(--tone-softer);
  color: var(--text-2);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  white-space: nowrap;
}
.ob-template__column i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tone);
}
@media (prefers-reduced-motion: no-preference) {
  .ob-enter {
    transition:
      opacity var(--dur-3) var(--ease-out),
      transform var(--dur-3) var(--ease-out);
  }
  .ob-enter-start {
    opacity: 0;
    transform: translateX(calc(var(--dir) * 28px));
  }
  .ob-enter-end {
    opacity: 1;
    transform: none;
  }
}

/* -- Settings (account + workspace) ----------------------------------------------------------------- */
.settings-nav__label--group {
  margin-top: var(--space-4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.people-settings {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.settings-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.settings-head__title {
  font-family: var(--font-display);
  font-size: var(--fs-title-1);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
}
.settings-head__subtitle {
  color: var(--text-2);
  font-size: var(--fs-lg);
  text-wrap: pretty;
}
.settings-head__subtitle:empty {
  display: none;
}
.settings-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}
.settings-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.01em;
}
.settings-section__foot {
  padding: 0 4px;
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.settings-section .list-item__subtitle,
.notif-subtitle,
.danger-zone__text {
  white-space: normal;
}
.settings-props {
  margin: var(--space-1) 0 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}
.settings-props dd {
  min-width: 0;
  overflow-wrap: anywhere;
}
.settings-props code {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
}

/* Avatar / logo editor */
.image-editor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-5);
}
.image-editor__preview {
  position: relative;
  font-size: 34px;
}
.image-editor__preview img {
  position: absolute;
  inset: 0;
}
.image-editor__preview img:not([src]),
.image-editor__preview img[src=""] {
  display: none;
}
.image-editor__body {
  display: flex;
  flex: 1 1 240px;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.image-editor__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
}
.image-editor__hint {
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.image-editor__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-1);
}
@media (max-width: 479px) {
  .image-editor {
    flex-direction: column;
    text-align: center;
  }
  .image-editor__body {
    flex-basis: auto;
    align-items: center;
  }
  .image-editor__actions {
    justify-content: center;
  }
}
.image-editor__pending {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-ink);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}

/* Appearance picker */
.theme-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}
.theme-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 0;
  cursor: pointer;
}
.theme-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.theme-option__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  text-align: center;
}
.theme-option:has(input:checked) .theme-option__label {
  color: var(--text);
  font-weight: var(--fw-semibold);
}
.theme-art {
  position: relative;
  display: flex;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 1px var(--line-strong);
  transition: box-shadow var(--dur-2) ease, transform var(--dur-2) var(--ease-out);
}
.theme-option:hover .theme-art {
  transform: translateY(-1px);
}
.theme-option:has(input:checked) .theme-art {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent);
}
.theme-option:has(input:focus-visible) .theme-art {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent), 0 0 0 7px var(--focus-ring);
}
.theme-art--light,
.theme-art__half--light {
  color-scheme: light;
}
.theme-art--dark,
.theme-art__half--dark {
  color-scheme: dark;
}
.theme-art__half {
  display: flex;
  flex: 1 0 100%;
  overflow: hidden;
}
.theme-art--system .theme-art__half--dark {
  position: absolute;
  inset: 0;
  clip-path: polygon(62% 0, 100% 0, 100% 100%, 38% 100%);
}
.theme-art__window {
  display: flex;
  flex: 1;
  background: var(--bg);
}
.theme-art__sidebar {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 28%;
  padding: 10% 6%;
  background: var(--bg-sidebar);
  box-shadow: 1px 0 0 var(--line);
}
.theme-art__sidebar i {
  height: 4px;
  border-radius: 2px;
  background: var(--fill-3);
}
.theme-art__sidebar i:first-child {
  background: var(--accent);
  opacity: 0.85;
}
.theme-art__main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6%;
  padding: 9% 8%;
}
.theme-art__title {
  width: 55%;
  height: 6px;
  border-radius: 3px;
  background: var(--text);
  opacity: 0.85;
}
.theme-art__card {
  flex: 1;
  border-radius: 5px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--card-ring), var(--shadow-xs);
}
.theme-art__card--accent {
  flex: 0.6;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface) 70%);
}
@media (max-width: 420px) {
  .theme-picker {
    gap: var(--space-2);
  }
  .theme-option__label .icon {
    display: none;
  }
}

/* Language list */
.lang-option {
  gap: 14px;
}
.lang-option__code {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--fill-1);
  color: var(--text-2);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
}
.lang-option[aria-pressed="true"] .lang-option__code {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.lang-option__check {
  color: var(--accent);
}

/* Time zone */
.tz-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.tz-card__row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.tz-card__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.tz-card__label {
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.tz-card__now {
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--tracking-snug);
}
.tz-picker__button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.tz-picker__city {
  overflow: hidden;
  font-weight: var(--fw-medium);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tz-picker__region {
  flex: 1;
  overflow: hidden;
  color: var(--text-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tz-picker__chevron {
  flex-shrink: 0;
  color: var(--text-3);
}
.tz-picker__panel {
  display: flex;
  flex-direction: column;
  width: min(380px, calc(100vw - 24px));
  max-height: min(440px, 70vh);
  padding: 8px;
}
.tz-picker__panel:not(:popover-open):not(.is-open) {
  display: none;
}
.tz-picker__search {
  margin-bottom: 6px;
}
.tz-picker__list {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.tz-option {
  flex-shrink: 0;
  gap: 10px;
  min-height: 36px;
}
.tz-option .menu__text {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.tz-option__city {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tz-option__region {
  overflow: hidden;
  color: var(--text-3);
  font-size: var(--fs-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tz-option__offset {
  flex-shrink: 0;
  color: var(--text-2);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
}
.tz-picker__empty {
  padding: 16px;
  color: var(--text-2);
  font-size: var(--fs-sm);
  text-align: center;
}
.tz-suggest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--accent-softer);
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.tz-suggest > span {
  flex: 1 1 180px;
}
.tz-suggest strong {
  color: var(--text);
}

/* Danger zone */
.danger-zone .settings-section__title {
  color: var(--danger-ink);
}

/* Members */
.members-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}
.members-toolbar__search {
  flex: 1 1 220px;
  min-width: 0;
}
.members-toolbar__invite {
  margin-left: auto;
}
@media (max-width: 639px) {
  .members-toolbar .segmented {
    order: 3;
    width: 100%;
  }
  .members-toolbar .segmented__item {
    flex: 1 1 0;
  }
  .members-toolbar__invite {
    margin-left: 0;
  }
}
@media (max-width: 479px) {
  .members-toolbar__invite .btn__label {
    display: none;
  }
  .members-toolbar__invite {
    width: var(--control-h);
    padding: 0;
  }
}
.member-list {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--card-ring), var(--shadow-xs);
}
.member-list__head {
  display: none;
}
.member-list__empty {
  padding: var(--space-6) var(--space-4);
  color: var(--text-2);
  text-align: center;
}
.member-row {
  display: grid;
  grid-template-areas:
    "person person actions"
    "teams role role";
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 12px 12px 16px;
  border-top: 1px solid var(--line);
  transition: background-color var(--dur-1) ease, opacity var(--dur-2) ease;
}
.member-row:first-of-type,
.member-list__head + .member-row {
  border-top: 0;
}
.member-row[hidden] {
  display: none;
}
.member-row.htmx-swapping {
  opacity: 0;
}
.member-row__person {
  display: flex;
  grid-area: person;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
}
.member-row__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.member-row__name {
  overflow: hidden;
  font-weight: var(--fw-medium);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-row__person:hover .member-row__name {
  color: var(--accent-ink);
}
.member-row__email {
  overflow: hidden;
  color: var(--text-2);
  font-size: var(--fs-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-row__teams {
  display: flex;
  grid-area: teams;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  padding-left: 44px;
}
.member-row__teams .chip {
  flex-shrink: 1;
  min-width: 0;
  max-width: 140px;
}
.member-row__teams .chip--neutral {
  flex-shrink: 0;
}
.member-row__none {
  color: var(--text-3);
}
.member-row__role {
  display: flex;
  grid-area: role;
  justify-content: flex-end;
  gap: 6px;
}
.member-row__role .input {
  width: auto;
  min-width: 112px;
}
.member-row__joined {
  display: none;
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.member-row__actions {
  grid-area: actions;
}
@media (min-width: 768px) {
  .member-list__head,
  .member-row {
    grid-template-areas: none;
    grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.6fr) 132px 96px 32px;
    gap: 12px;
  }
  .member-list__head {
    display: grid;
    align-items: center;
    height: 36px;
    padding: 0 12px 0 16px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text-2);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
  }
  .member-row {
    padding: 10px 12px 10px 16px;
  }
  .member-row:hover {
    background: var(--fill-1);
  }
  .member-row__person,
  .member-row__teams,
  .member-row__role,
  .member-row__actions {
    grid-area: auto;
  }
  .member-row__teams {
    flex-wrap: nowrap;
    overflow: hidden;
    padding-left: 0;
  }
  .member-row__role {
    justify-content: flex-start;
  }
  .member-row__role .input {
    width: 100%;
    min-width: 0;
  }
  .member-row__joined {
    display: block;
  }
}
.invite-row__icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--fill-1);
  color: var(--text-2);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}
.invite-row .list-item__subtitle {
  white-space: normal;
}
.invite-row.is-expired .list-item__title {
  color: var(--text-2);
}
.invite-row__expired {
  color: var(--warning-ink);
  font-weight: var(--fw-medium);
}
.invite-row .list-item__trail {
  gap: 2px;
}

/* Invite modal */
.invite-form textarea {
  min-height: 84px;
}
.invite-form__count {
  min-height: 1.3em;
}
.invite-form__invalid {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--warning-ink);
}
.role-picker {
  margin: 0;
  padding: 0;
  border: 0;
}
.role-picker__options {
  display: grid;
  gap: 6px;
}
.role-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  box-shadow: 0 0 0 1px var(--line-strong);
  cursor: pointer;
  transition: box-shadow var(--dur-1) ease, background-color var(--dur-1) ease;
}
.role-option:hover {
  background: var(--fill-1);
}
.role-option input {
  margin-top: 2px;
}
.role-option:has(input:checked) {
  background: var(--accent-softer);
  box-shadow: 0 0 0 1.5px var(--accent);
}
.role-option__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.role-option__name {
  font-weight: var(--fw-semibold);
}
.role-option__help {
  color: var(--text-2);
  font-size: var(--fs-sm);
}

/* Delete workspace */
.delete-confirm__art {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--tone-soft);
  color: var(--tone-ink);
}
.delete-confirm__text {
  color: var(--text-2);
  text-wrap: pretty;
}
.delete-confirm__text strong,
.delete-confirm .field__label strong {
  color: var(--text);
  font-weight: var(--fw-semibold);
  overflow-wrap: anywhere;
}

/* Labels */
.label-create__row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.label-create__row > .input {
  flex: 1;
  min-width: 0;
}
.label-create__swatch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: var(--control-h);
  padding: 0 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--fill-1);
  color: var(--text-2);
  cursor: pointer;
}
.label-create__swatch:hover {
  background: var(--fill-2);
}
.label-create__dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(150deg, color-mix(in oklab, var(--tone) 80%, white), var(--tone));
  box-shadow: inset 0 0 0 0.5px var(--line-strong);
}
.label-color-panel {
  width: min(248px, calc(100vw - 24px));
  padding: 10px;
}
@media (max-width: 479px) {
  .label-create .btn__label {
    display: none;
  }
  .label-create .btn--primary {
    width: var(--control-h);
    padding: 0;
  }
}
.label-row {
  position: relative;
  transition: opacity var(--dur-2) ease;
}
.label-row.htmx-swapping {
  opacity: 0;
}
li + .label-row > .list-item::before,
li + .label-row > .label-row__form::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 16px;
  height: 1px;
  background: var(--line);
}
.label-row__view {
  gap: 10px;
}
.label-row__view .chip {
  max-width: min(60%, 320px);
}
.label-row__count {
  flex-shrink: 0;
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
.label-row__actions {
  gap: 0;
}
.label-row__delete:hover {
  color: var(--danger-ink);
}
.label-row__form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface-2);
}
.label-row__form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.label-row.is-new .label-row__view {
  animation: people-flash 1.6s var(--ease-out);
}
@keyframes people-flash {
  from {
    background: var(--accent-soft);
  }
}

/* -- People directory ----------------------------------------------------------------------------- */
.people-page,
.person-page,
.teams-page,
.team-page {
  max-width: var(--content-max);
  margin-inline: auto;
}
.people-toolbar {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.people-toolbar__search {
  max-width: 420px;
}
.people-toolbar__teams {
  display: flex;
  gap: 6px;
  margin-inline: calc(var(--page-pad-x) * -1);
  padding: 2px var(--page-pad-x);
  overflow-x: auto;
  scrollbar-width: none;
}
.people-toolbar__teams::-webkit-scrollbar {
  display: none;
}
.people-filter {
  flex-shrink: 0;
  border: 0;
  background: var(--fill-1);
  color: var(--text);
  cursor: pointer;
  transition: background-color var(--dur-1) ease, color var(--dur-1) ease;
}
.people-filter:hover {
  background: var(--fill-2);
}
.people-filter.is-active {
  background: var(--surface-inverse);
  color: var(--text-inverse);
}
.people-grid {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.person-card {
  display: grid;
  grid-template-areas:
    "avatar text role"
    "avatar teams teams"
    "avatar stats stats";
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 14px;
  height: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--card-ring), var(--shadow-xs);
  color: inherit;
  transition:
    transform var(--dur-3) var(--ease-out),
    box-shadow var(--dur-3) var(--ease-out);
}
.person-card > .avatar {
  grid-area: avatar;
  align-self: start;
}
@media (max-width: 639px) {
  .person-card > .avatar {
    --size: 48px;
    font-size: 18px;
  }
}
.person-card__text {
  display: flex;
  grid-area: text;
  flex-direction: column;
  min-width: 0;
}
.person-card__name {
  overflow: hidden;
  font-weight: var(--fw-semibold);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.person-card__title {
  overflow: hidden;
  color: var(--text-2);
  font-size: var(--fs-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.person-card__role {
  grid-area: role;
  align-self: start;
}
.person-card__teams {
  display: flex;
  grid-area: teams;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}
.person-card__teams:empty {
  display: none;
}
.person-card__teams .chip {
  max-width: 100%;
}
.person-card__stats {
  display: flex;
  grid-area: stats;
  gap: 12px;
  color: var(--text-2);
  font-size: var(--fs-xs);
}
.person-card__stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.person-card__stat.is-overdue {
  color: var(--danger-ink);
  font-weight: var(--fw-medium);
}
@media (hover: hover) {
  .person-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px var(--card-ring), var(--shadow-md);
  }
}
.person-card:active {
  transform: scale(0.99);
}
@media (min-width: 640px) {
  .people-toolbar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .people-toolbar__search {
    flex: 0 1 320px;
  }
  .people-toolbar__teams {
    flex: 1 1 0;
    min-width: 0;
    margin-inline: 0;
    padding-inline: 0;
  }
  .people-grid {
    grid-template-columns: repeat(auto-fill, minmax(216px, 1fr));
    gap: var(--space-4);
  }
  .person-card {
    position: relative;
    grid-template-areas: none;
    grid-template-columns: none;
    justify-items: center;
    align-content: start;
    gap: 6px;
    padding: 24px 16px 18px;
    text-align: center;
  }
  .person-card > .avatar,
  .person-card__text,
  .person-card__teams,
  .person-card__stats {
    grid-area: auto;
    align-self: auto;
  }
  .person-card > .avatar {
    margin-bottom: 6px;
  }
  .person-card__text {
    align-items: center;
    max-width: 100%;
  }
  .person-card__role {
    position: absolute;
    top: 12px;
    right: 12px;
    grid-area: auto;
  }
  .person-card__teams {
    justify-content: center;
    min-height: 20px;
    margin-top: 4px;
  }
  .person-card__teams .chip {
    max-width: 150px;
  }
  .person-card__stats {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    width: 100%;
    justify-content: center;
  }
}

/* -- Person page --------------------------------------------------------------------------------- */
.person-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  text-align: center;
}
.person-hero > .avatar {
  box-shadow: 0 0 0 4px var(--surface), var(--shadow-md);
}
.person-hero__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}
.person-hero__name {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: var(--fs-title-1);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
}
.person-hero__title {
  color: var(--text-2);
  font-size: var(--fs-lg);
}
.person-hero__facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: var(--space-2) 0 0;
  padding: 0;
  list-style: none;
}
.person-fact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  background: var(--fill-1);
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.person-fact span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
a.person-fact:hover {
  background: var(--fill-2);
  color: var(--text);
}
.person-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
@media (max-width: 479px) {
  .person-stats {
    gap: var(--space-2);
  }
  .person-stats .card {
    --card-pad: 12px;
  }
  .person-stats .stat__label {
    font-size: var(--fs-2xs);
  }
  .person-stats .stat__label .icon-tile {
    display: none;
  }
}
.person-layout,
.team-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
}
.person-layout > *,
.team-layout > * {
  min-width: 0;
}
.person-group + .person-group {
  margin-top: var(--space-3);
}
.person-group .task-row__meta > .avatar:last-child {
  display: none;
}
.person-group__head {
  justify-content: space-between;
}
.person-group__count {
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
.person-muted,
.person-more {
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.person-more {
  margin-top: var(--space-2);
  padding: 0 4px;
}
.person-aside__title {
  margin-bottom: var(--space-3);
}
@media (min-width: 1024px) {
  .person-hero {
    flex-direction: row;
    align-items: center;
    gap: var(--space-6);
    text-align: left;
  }
  .person-hero__text,
  .person-hero__name {
    align-items: flex-start;
    justify-content: flex-start;
  }
  .person-hero__facts {
    justify-content: flex-start;
  }
  .person-layout,
  .team-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }
}
.mini-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 -8px;
  padding: 0;
  list-style: none;
}
.mini-list__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 10px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  color: inherit;
}
.mini-list__item:hover {
  background: var(--fill-1);
}
.mini-list__text {
  overflow: hidden;
  font-weight: var(--fw-medium);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-list__value {
  color: var(--text-2);
  font-size: var(--fs-xs);
}
.mini-list__bar {
  grid-column: 2 / -1;
}

/* Activity feed */
.feed {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}
.feed__item {
  position: relative;
  display: flex;
  gap: 10px;
  padding-bottom: 14px;
}
.feed__item:last-child {
  padding-bottom: 0;
}
.feed__item:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 26px;
  bottom: 2px;
  left: 11px;
  width: 1.5px;
  border-radius: 1px;
  background: var(--line);
}
.feed__icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--fill-1);
  color: var(--text-2);
}
.feed__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding-top: 2px;
}
.feed__text {
  overflow-wrap: anywhere;
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
}
.feed__text strong {
  font-weight: var(--fw-semibold);
}
.feed__text a {
  color: var(--accent-ink);
}
.feed__details {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-2);
  font-size: var(--fs-xs);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.feed__time {
  color: var(--text-3);
  font-size: var(--fs-xs);
}
.feed__empty {
  color: var(--text-2);
  font-size: var(--fs-sm);
}

/* -- Teams --------------------------------------------------------------------------------------- */
.teams-filter {
  flex-shrink: 0;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.team-grid > li {
  min-width: 0;
}
.team-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  height: 100%;
  padding: 18px 18px 14px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--card-ring), var(--shadow-sm);
  transition:
    transform var(--dur-3) var(--ease-out),
    box-shadow var(--dur-3) var(--ease-out);
}
@media (hover: hover) {
  .team-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px var(--card-ring), var(--shadow-md);
  }
}
.team-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 64px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(to bottom, var(--tone-softer), transparent);
  pointer-events: none;
}
.team-card__link {
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: inherit;
}
.team-card__head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.team-card__titles {
  flex: 1;
  min-width: 0;
}
.team-card__name {
  overflow: hidden;
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-card__meta {
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.team-card__head .badge {
  gap: 3px;
}
.team-card__desc {
  display: -webkit-box;
  flex: 1;
  overflow: hidden;
  color: var(--text-2);
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.team-card__placeholder {
  color: var(--text-3);
  font-size: var(--fs-sm);
}
.team-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 32px;
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}
.team-card__action {
  position: relative;
  z-index: 2;
}
.team-card .avatar-stack > .avatar + .avatar,
.invite-card .avatar-stack > .avatar + .avatar,
.team-hero__people .avatar-stack > .avatar + .avatar {
  margin-left: -4px;
}

/* Team page */
.topbar-tile {
  margin-right: 2px;
}
.team-hero {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(120% 140% at 0% 0%, var(--tone-soft), transparent 60%),
    var(--surface);
  box-shadow: 0 0 0 1px var(--card-ring), var(--shadow-sm);
}
.team-hero > .icon-tile {
  box-shadow: var(--shadow-md);
}
.team-hero__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.team-hero__name {
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: var(--fs-title-2);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
}
.team-hero__desc {
  max-width: 65ch;
  color: var(--text-2);
  text-wrap: pretty;
}
.team-hero__people {
  display: none;
}
@media (min-width: 768px) {
  .team-hero__people {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    margin-left: auto;
    color: var(--text-2);
    font-size: var(--fs-sm);
    text-align: right;
    --avatar-ring: var(--surface);
  }
}
.team-hero__add-desc {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
}
.team-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 2px;
  color: var(--text-3);
  font-size: var(--fs-sm);
}
@media (max-width: 479px) {
  .team-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-4);
  }
}
.team-projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.team-project {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}
.team-project__head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.team-project__name {
  display: -webkit-box;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.team-project__head .status-pill {
  flex-shrink: 0;
  align-self: flex-start;
}
.team-project__progress {
  width: 100%;
}
.team-project__progress .progress {
  flex: 1;
}
.team-project__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
  font-size: var(--fs-xs);
}
.team-project__foot > :last-child:is(.avatar) {
  margin-left: auto;
}
.team-project__overdue {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--danger-ink);
  font-weight: var(--fw-medium);
}
.team-members .card__title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.team-member-list {
  margin: 0;
  padding: 6px;
  list-style: none;
}
.team-member {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 8px;
  border-radius: var(--radius-md);
  transition: background-color var(--dur-1) ease, opacity var(--dur-2) ease;
}
.team-member:hover {
  background: var(--fill-1);
}
.team-member.htmx-swapping {
  opacity: 0;
}
.team-member__person {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: inherit;
}
.team-member__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.team-member__name {
  overflow: hidden;
  font-weight: var(--fw-medium);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-member__you {
  color: var(--text-3);
  font-weight: var(--fw-regular);
}
.team-member__title {
  overflow: hidden;
  color: var(--text-2);
  font-size: var(--fs-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-members__empty {
  padding: var(--space-5);
  color: var(--text-2);
  font-size: var(--fs-sm);
  text-align: center;
}
@media (min-width: 1024px) {
  .team-layout {
    grid-template-areas:
      "projects aside"
      "activity aside";
    grid-template-rows: auto 1fr;
  }
  .team-layout__projects {
    grid-area: projects;
  }
  .team-layout__activity {
    grid-area: activity;
  }
  .team-aside {
    position: sticky;
    top: calc(var(--topbar-h) + var(--safe-top) + 16px);
    grid-area: aside;
    align-self: start;
  }
}

/* Team forms */
.team-form-page {
  max-width: 640px;
  margin-inline: auto;
}
.team-fields {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}
.team-fields__preview {
  flex-shrink: 0;
  padding-top: 26px;
}
.team-fields__preview .icon-tile {
  transition: background var(--dur-3) var(--ease-out);
}
.team-fields__main {
  flex: 1;
  min-width: 0;
}
@media (max-width: 479px) {
  .team-fields__preview {
    display: none;
  }
}
.team-delete-btn {
  margin-right: auto;
}
@media (max-width: 479px) {
  .team-delete-btn .btn__label {
    display: none;
  }
}
.people-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.people-picker__legend {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0;
}
.people-picker__count {
  color: var(--accent-ink);
  font-weight: var(--fw-semibold);
}
.people-picker__list {
  max-height: 232px;
  margin: 0;
  padding: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  list-style: none;
}
.people-picker__item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.people-picker__item:hover {
  background: var(--fill-1);
}
.people-picker__item:has(input:checked) {
  background: var(--accent-softer);
}
.people-picker__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.people-picker__name {
  overflow: hidden;
  font-weight: var(--fw-medium);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.people-picker__meta {
  overflow: hidden;
  color: var(--text-2);
  font-size: var(--fs-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.people-picker__empty {
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--fill-1);
  color: var(--text-2);
  font-size: var(--fs-sm);
}
