.team-finder-shell {
  max-width: 1240px;
  --team-card-height: 506px;
  display: grid;
  gap: 16px;
}

.team-finder-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.team-finder-utility-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.team-finder-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.team-finder-brand-mark {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px solid rgba(77, 141, 248, 0.16);
  background: linear-gradient(145deg, #ffffff, #e0eaff);
  box-shadow: 0 10px 24px rgba(77, 141, 248, 0.14);
}

.team-finder-brand-mark img {
  width: 28px;
  height: 28px;
}

.team-finder-brand-copy {
  display: grid;
  gap: 2px;
}

.team-finder-brand-copy strong {
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.team-finder-brand-copy span {
  color: var(--ui-muted);
  font-size: 14px;
  font-weight: 700;
}

.team-finder-exit-btn {
  flex: 0 0 auto;
}

.team-search-shell {
  padding: 16px;
}

.team-search-grid {
  display: grid;
  gap: 12px;
}

.team-search-field {
  display: block;
}

.team-search-shell input,
.team-search-shell select {
  min-height: 56px;
  border-radius: 18px;
  border-color: rgba(23, 48, 94, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.team-search-shell input::placeholder {
  color: rgba(96, 112, 134, 0.86);
}

.team-filter-tabs-shell {
  margin-top: -2px;
}

.team-filter-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: none;
}

.team-filter-tabs::-webkit-scrollbar {
  display: none;
}

.team-filter-tab {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--ui-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ui-muted);
  font-weight: 800;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.team-filter-tab:hover,
.team-filter-tab:focus-visible {
  color: var(--ui-text);
  border-color: var(--ui-border-strong);
  box-shadow: 0 0 0 4px rgba(77, 141, 248, 0.1);
  outline: none;
}

.team-filter-tab.is-active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--ui-primary), #6ba6ff);
  box-shadow: 0 10px 22px rgba(77, 141, 248, 0.22);
}

.team-directory-section {
  display: grid;
  gap: 16px;
}

.team-directory-summary {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.team-directory-summary-copy {
  display: grid;
  gap: 6px;
}

.team-directory-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(77, 141, 248, 0.12);
  color: var(--ui-primary-strong);
  font-size: 12px;
  font-weight: 800;
}

#teamFinderResultHeading {
  margin: 0;
  font-size: clamp(24px, 5vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.team-directory-meta {
  margin: 0;
  color: var(--ui-muted);
  font-weight: 700;
  text-align: right;
  line-height: 1.6;
}

.team-directory-grid {
  display: grid;
  gap: 14px;
  grid-auto-rows: var(--team-card-height);
  align-items: stretch;
}

.team-directory-grid > .surface-card,
.team-directory-grid > .surface-card + .surface-card {
  margin-top: 0;
}

.team-directory-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  height: 100%;
  padding: 20px;
  align-self: stretch;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.team-directory-card:hover,
.team-directory-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(77, 141, 248, 0.2);
  box-shadow: 0 20px 36px rgba(23, 48, 94, 0.1);
  outline: none;
}

.team-card-header {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: flex-start;
  min-height: 154px;
}

.team-card-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
  align-content: start;
}

.team-logo-slot {
  width: 72px;
  min-width: 72px;
  min-height: 72px;
  justify-self: start;
  border-radius: 22px;
  background:
    radial-gradient(circle at 30% 24%, rgba(107, 166, 255, 0.18), transparent 48%),
    rgba(255, 255, 255, 0.97);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.team-logo-slot img {
  object-fit: contain;
  padding: 10px;
}

.team-logo-slot .image-slot-fallback {
  gap: 6px;
  padding: 10px;
  text-align: center;
  color: var(--ui-muted);
  font-size: 13px;
  font-weight: 700;
}

.team-logo-slot .image-slot-fallback img {
  width: 28px;
  height: 28px;
}

.team-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 30px;
  align-items: flex-start;
}

.team-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.team-status-badge--recommended {
  background: rgba(77, 141, 248, 0.12);
  color: var(--ui-primary-strong);
}

.team-status-badge--new {
  background: rgba(255, 184, 92, 0.22);
  color: var(--ui-warning);
}

.team-status-badge--active {
  background: rgba(47, 140, 77, 0.14);
  color: var(--ui-success);
}

.team-status-badge--competitive {
  background: rgba(23, 48, 94, 0.1);
  color: var(--ui-text);
}

.team-status-badge--recruiting {
  background: rgba(255, 159, 67, 0.18);
  color: #b86600;
}

.team-name,
.team-one-liner {
  margin: 0;
}

.team-name {
  font-size: clamp(22px, 3.5vw, 30px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  word-break: keep-all;
  min-height: calc(1.08em * 2);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.team-one-liner {
  min-height: calc(1.6em * 2);
  color: var(--ui-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.team-card-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}

.team-card-meta {
  min-height: 84px;
  padding: 13px 14px;
  border-radius: 18px;
  border: 1px solid rgba(23, 48, 94, 0.08);
  background: rgba(247, 249, 253, 0.92);
  display: grid;
  gap: 8px;
  align-content: start;
}

.team-card-meta-label {
  color: var(--ui-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.team-card-meta:not(.team-card-meta--leader) strong {
  display: block;
  font-size: 16px;
  line-height: 1.35;
  word-break: keep-all;
  min-height: calc(1.35em * 2);
  max-height: calc(1.35em * 2);
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.team-card-meta--activity strong {
  color: var(--ui-primary-strong);
}

.team-card-meta-leader {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.team-representative-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(23, 48, 94, 0.08);
  color: var(--ui-text);
  font-size: 12px;
  font-weight: 800;
}

.team-card-meta--leader strong {
  font-size: 16px;
  line-height: 1.35;
  word-break: keep-all;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-card-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-self: end;
}

.team-card-footer .ui-btn {
  width: 100%;
  min-height: 48px;
  white-space: nowrap;
}

.team-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.team-page-btn {
  min-width: 46px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--ui-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ui-text);
  font-weight: 800;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.team-page-btn:hover,
.team-page-btn:focus-visible {
  border-color: var(--ui-border-strong);
  box-shadow: 0 0 0 4px rgba(77, 141, 248, 0.1);
  outline: none;
}

.team-page-btn[aria-current='page'] {
  border-color: transparent;
  background: var(--ui-text);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(23, 48, 94, 0.18);
}

.team-page-btn[disabled] {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.team-directory-grid .empty-state {
  grid-column: 1 / -1;
}

.team-card-skeleton {
  cursor: default;
  pointer-events: none;
}

.team-card-skeleton:hover,
.team-card-skeleton:focus-visible {
  transform: none;
  border-color: var(--ui-border);
  box-shadow: var(--ui-shadow);
}

.team-logo-slot--skeleton,
.team-skeleton-line,
.team-skeleton-chip,
.team-skeleton-button {
  background:
    linear-gradient(90deg, rgba(23, 48, 94, 0.06) 0%, rgba(77, 141, 248, 0.14) 50%, rgba(23, 48, 94, 0.06) 100%);
  background-size: 220% 100%;
  animation: team-skeleton-pulse 1.4s ease infinite;
}

.team-logo-slot--skeleton {
  border-radius: 22px;
}

.team-skeleton-badges {
  display: flex;
  gap: 8px;
}

.team-skeleton-chip {
  width: 72px;
  height: 30px;
  border-radius: 999px;
}

.team-skeleton-chip--short {
  width: 56px;
}

.team-skeleton-line {
  height: 14px;
  border-radius: 999px;
}

.team-skeleton-line--title {
  height: 24px;
  width: 86%;
}

.team-skeleton-line--short {
  width: 58%;
}

.team-skeleton-line--mini {
  width: 44%;
}

.team-skeleton-button {
  width: 100%;
  min-height: 52px;
  border-radius: 999px;
}

@keyframes team-skeleton-pulse {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@media (min-width: 760px) {
  .team-search-grid {
    grid-template-columns: minmax(0, 1.6fr) 260px;
  }

  .team-directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .team-finder-shell {
    --team-card-height: 518px;
  }

  .team-directory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 759px) {
  .team-finder-shell {
    --team-card-height: 520px;
  }

  .team-directory-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .team-directory-meta {
    text-align: left;
  }

  .team-finder-brand-copy strong {
    font-size: 20px;
  }
}

@media (max-width: 540px) {
  .team-finder-shell {
    --team-card-height: 552px;
  }

  .team-search-shell,
  .team-directory-card {
    padding: 16px;
  }

  .team-finder-utility-bar {
    flex-wrap: wrap;
  }

  .team-finder-exit-btn {
    width: 100%;
    justify-content: center;
  }

  .team-card-header {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    min-height: 164px;
  }

  .team-logo-slot {
    width: 64px;
    min-width: 64px;
    min-height: 64px;
  }

  .team-card-meta {
    min-height: 76px;
    padding: 12px;
  }

  .team-card-meta strong {
    font-size: 15px;
  }

}
