.team-section {
  min-height: calc(100vh - 74px);
  background: var(--surface);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.team-org-overview {
  display: grid;
  gap: 14px;
}

.team-card-director {
  max-width: 620px;
  width: 100%;
  min-height: 210px;
  justify-self: center;
}

.team-org-drop {
  position: relative;
  width: 2px;
  height: 32px;
  justify-self: center;
  background: linear-gradient(180deg, var(--teal), rgba(10, 168, 150, 0.08));
}

.team-org-drop::before,
.team-org-drop::after {
  position: absolute;
  top: 100%;
  width: 38vw;
  max-width: 430px;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, rgba(10, 168, 150, 0.08), rgba(10, 168, 150, 0.46), rgba(56, 170, 184, 0.28));
}

.team-org-drop::before {
  right: 0;
}

.team-org-drop::after {
  left: 0;
}

.team-structure-head {
  width: min(100%, 760px);
  justify-self: center;
  text-align: center;
}

.team-structure-head h2 {
  margin: 8px 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.team-structure-head p {
  margin: 0;
  color: var(--muted);
}

.team-management-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 14px;
  align-items: start;
  padding-top: 22px;
}

.team-management-grid::before {
  position: absolute;
  top: 0;
  left: 6%;
  right: 6%;
  height: 2px;
  content: "";
  background:
    linear-gradient(90deg, transparent, rgba(10, 168, 150, 0.52), rgba(56, 170, 184, 0.42), rgba(216, 166, 58, 0.28), transparent);
  opacity: 0.7;
  box-shadow: 0 0 18px rgba(10, 168, 150, 0.12);
}

.team-manager-column {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(10, 168, 150, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(10, 168, 150, 0.08), rgba(52, 95, 116, 0.08)),
    rgba(255, 255, 255, 0.68);
  box-shadow: 0 18px 36px rgba(20, 33, 38, 0.08);
}

.team-manager-column::before {
  position: absolute;
  left: 50%;
  top: -22px;
  width: 2px;
  height: 22px;
  content: "";
  background: linear-gradient(180deg, rgba(10, 168, 150, 0.08), var(--team-color));
  transform: translateX(-50%);
}

.team-manager-column::after {
  position: absolute;
  left: 50%;
  top: -5px;
  width: 10px;
  height: 10px;
  content: "";
  border-radius: 50%;
  background: var(--team-color);
  box-shadow: 0 0 0 6px rgba(10, 168, 150, 0.08), 0 0 18px rgba(10, 168, 150, 0.22);
  transform: translateX(-50%);
}

.team-manager-head {
  position: relative;
  display: grid;
  z-index: 1;
}

.team-report-branch {
  position: relative;
  width: 2px;
  height: 12px;
  justify-self: center;
  background: linear-gradient(180deg, var(--teal), rgba(10, 168, 150, 0.08));
}

.team-report-branch::after {
  display: none;
}

.team-report-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-top: 8px;
}

.team-report-grid.has-reports::before {
  display: none;
}

.team-report-grid.report-count-1::before {
  left: 50%;
  right: 50%;
}

.team-report-node {
  position: relative;
  display: grid;
  min-width: 0;
}

.team-report-node::before {
  position: absolute;
  left: 50%;
  top: -8px;
  width: 2px;
  height: 8px;
  content: "";
  background: linear-gradient(180deg, rgba(56, 170, 184, 0.56), var(--team-color));
  transform: translateX(-50%);
  z-index: 0;
}

.team-report-node::after {
  display: none;
}

.team-report-node .team-card {
  z-index: 1;
}

.team-card-manager {
  min-height: 172px;
}

.team-card-specialist {
  min-height: 142px;
  padding: 14px;
}

.team-card-specialist .team-photo-wrap,
.team-card-specialist .team-photo {
  width: 74px;
  height: 74px;
}

.team-card-specialist .team-mark {
  width: 34px;
  height: 34px;
  font-size: 0.68rem;
}

.team-report-empty,
.member-org-empty {
  margin: 0;
  padding: 14px;
  color: var(--muted);
  border: 1px dashed rgba(10, 168, 150, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.64);
  font-weight: 700;
}

.team-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  color: #ffffff;
  background: linear-gradient(145deg, var(--team-color), #111819);
  border-radius: 22px;
  box-shadow: 0 16px 34px rgba(20, 33, 38, 0.14);
}

.team-card {
  color: #ffffff;
}

.team-card-profile {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  color: inherit;
}

.team-card-profile:hover,
.team-card-profile:focus-visible {
  color: inherit;
}

.team-card::after {
  position: absolute;
  right: -32px;
  bottom: -42px;
  width: 150px;
  height: 150px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  pointer-events: none;
}

.team-photo-wrap {
  position: relative;
  z-index: 1;
  width: 96px;
  height: 96px;
}

.team-photo {
  width: 96px;
  height: 96px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.92);
  border: 4px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
}

.team-mark {
  position: absolute;
  right: -4px;
  bottom: 2px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--team-color);
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 900;
}

.team-card-copy {
  position: relative;
  z-index: 1;
}

.team-department {
  display: inline-flex;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.team-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.team-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.team-card.team-card-manager {
  min-height: 172px;
}

.team-card.team-card-director {
  min-height: 210px;
  padding: 22px;
}

.team-card.team-card-director .team-card-profile {
  grid-template-columns: 124px minmax(0, 1fr);
}

.team-card.team-card-director .team-photo-wrap,
.team-card.team-card-director .team-photo {
  width: 124px;
  height: 124px;
}

.team-card.team-card-director .team-mark {
  width: 48px;
  height: 48px;
  font-size: 0.86rem;
}

.team-card.team-card-director h3 {
  font-size: 1.38rem;
}

.team-card.team-card-specialist {
  min-height: 142px;
  padding: 14px;
}

.team-card-action {
  display: inline-flex;
  margin-top: 14px;
  font-size: 0.86rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.94);
}

.team-card-links {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.team-social-link,
.member-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: currentColor;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.team-social-link svg,
.member-social-link svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.team-social-link {
  width: 38px;
  height: 38px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

.team-social-link span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.team-social-link:hover,
.team-social-link:focus-visible {
  color: var(--team-color);
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.64);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
  transform: translateY(-2px);
}

.team-unit-stack {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.team-unit-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: center;
  margin-top: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(10, 168, 150, 0.09), rgba(52, 95, 116, 0.09)),
    var(--surface);
  box-shadow: var(--shadow);
}

.team-unit-panel-automation {
  background:
    linear-gradient(135deg, rgba(154, 122, 48, 0.12), rgba(78, 120, 144, 0.1)),
    var(--surface);
}

.team-unit-panel-bms {
  background:
    linear-gradient(135deg, rgba(78, 120, 144, 0.14), rgba(10, 168, 150, 0.08)),
    var(--surface);
}

.team-unit-panel-audio {
  background:
    linear-gradient(135deg, rgba(56, 170, 184, 0.14), rgba(52, 95, 116, 0.1)),
    var(--surface);
}

.team-unit-panel h2 {
  margin: 8px 0 8px;
  font-size: 1.45rem;
}

.team-unit-panel p {
  margin: 0;
  color: var(--muted);
}

.team-unit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.team-unit-link {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 72px;
  padding: 10px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.team-unit-link:hover,
.team-unit-link:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.team-unit-link span {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  color: #ffffff;
  border-radius: 18px;
  background: var(--team-color);
  font-size: 0.78rem;
  font-weight: 900;
}

.team-unit-link strong {
  line-height: 1.22;
}

@media (max-width: 1020px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .team-unit-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .team-grid {
    grid-template-columns: 1fr;
  }

  .team-org-drop {
    display: none;
  }

  .team-management-grid,
  .team-report-grid {
    grid-template-columns: 1fr;
  }

  .team-management-grid {
    padding-top: 18px;
  }

  .team-management-grid::before {
    display: none;
  }

  .team-manager-column {
    padding: 10px;
    border-radius: var(--radius);
  }

  .team-manager-column::before {
    top: -18px;
    height: 18px;
  }

  .team-report-branch::after,
  .team-report-grid.has-reports::before {
    display: none;
  }

  .team-report-grid {
    padding-top: 8px;
  }

  .team-report-node::before {
    top: -8px;
    height: 8px;
  }

  .team-unit-grid {
    grid-template-columns: 1fr;
  }

  .team-card {
    min-height: auto;
    padding: 14px;
    border-radius: 20px;
  }

  .team-card-profile,
  .team-card.team-card-director .team-card-profile {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
  }

  .team-card.team-card-manager,
  .team-card.team-card-specialist,
  .team-card.team-card-director {
    min-height: auto;
    padding: 14px;
  }

  .team-photo-wrap,
  .team-photo,
  .team-card.team-card-director .team-photo-wrap,
  .team-card.team-card-director .team-photo,
  .team-card-specialist .team-photo-wrap,
  .team-card-specialist .team-photo {
    width: 70px;
    height: 70px;
  }

  .team-mark,
  .team-card.team-card-director .team-mark,
  .team-card-specialist .team-mark {
    width: 32px;
    height: 32px;
    font-size: 0.64rem;
  }

  .team-card h3,
  .team-card.team-card-director h3 {
    font-size: 1.06rem;
    line-height: 1.22;
    overflow-wrap: anywhere;
  }

  .team-card p {
    font-size: 0.9rem;
  }

  .team-card-action {
    margin-top: 10px;
  }

  .team-card-links {
    margin-top: 10px;
    padding-top: 10px;
  }
}

.team-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 245, 238, 0.66)),
    var(--surface);
}

.team-card {
  transition: transform 220ms ease, box-shadow 220ms ease;
  touch-action: manipulation;
}

.team-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(125deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  pointer-events: none;
  transform: translateX(-130%);
  transition: transform 520ms ease;
}

.team-card:hover,
.team-card:active,
.team-card:focus-within,
.team-card:focus-visible {
  box-shadow: var(--shadow-strong);
  transform: translateY(-7px);
}

.team-card:hover::before,
.team-card:active::before,
.team-card:focus-within::before,
.team-card:focus-visible::before {
  transform: translateX(130%);
}

.team-card:hover .team-photo,
.team-card:active .team-photo,
.team-card:focus-within .team-photo,
.team-card:focus-visible .team-photo {
  transform: scale(1.04);
}

.team-photo {
  transition: transform 220ms ease;
}

.team-member-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 245, 238, 0.7)),
    var(--surface);
}

.team-member-grid {
  display: grid;
  grid-template-columns: minmax(290px, 0.95fr) minmax(0, 1.45fr);
  gap: 18px;
  align-items: start;
}

.member-profile-card {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
  padding: 22px;
  color: #ffffff;
  background: linear-gradient(145deg, var(--team-color), #121a20);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.member-back {
  display: inline-flex;
  width: fit-content;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9rem;
  font-weight: 700;
}

.member-photo-wrap {
  position: relative;
  width: 146px;
  height: 146px;
}

.member-photo {
  width: 146px;
  height: 146px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.92);
}

.member-accent {
  position: absolute;
  right: -6px;
  bottom: 4px;
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.86);
  background: var(--team-color);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 900;
}

.member-name {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.2;
}

.member-role {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

.member-meta {
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
}

.member-meta strong {
  color: rgba(255, 255, 255, 0.96);
}

.member-social-block h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.member-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-social-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.94);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.84rem;
  font-weight: 700;
}

.member-social-links a:hover,
.member-social-links a:focus-visible {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.member-content {
  display: grid;
  gap: 14px;
}

.member-info-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 28px rgba(16, 20, 23, 0.08);
}

.member-info-card h2 {
  margin: 0 0 14px;
  font-size: 1.24rem;
}

.member-work-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.member-work-list li {
  color: var(--ink-soft);
}

.member-cert-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.member-cert-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.member-cert-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.member-cert-card figcaption {
  padding: 10px;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 700;
}

.member-work-gallery-card {
  background:
    linear-gradient(135deg, rgba(10, 168, 150, 0.08), rgba(52, 95, 116, 0.08)),
    var(--surface);
}

.member-work-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.member-work-photo {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.member-work-photo img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.member-work-photo figcaption {
  padding: 10px;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 800;
}

.member-org-card {
  overflow: hidden;
}

.member-org-head h2 {
  margin: 6px 0 0;
}

.member-org-chart {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.member-org-director,
.member-org-node {
  position: relative;
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
  border-radius: var(--radius);
}

.member-org-director {
  min-width: 220px;
  padding: 16px 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--team-color), #142126);
  box-shadow: var(--shadow);
}

.member-org-director span,
.member-org-node span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 18px;
  color: #ffffff;
  background: var(--team-color);
  font-size: 0.78rem;
  font-weight: 900;
}

.member-org-line {
  width: 2px;
  height: 34px;
  background: linear-gradient(180deg, var(--teal), rgba(10, 168, 150, 0.08));
}

.member-org-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.member-org-groups {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  padding-top: 20px;
}

.member-org-group {
  position: relative;
  display: grid;
  gap: 10px;
}

.member-org-groups::before {
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(10, 168, 150, 0.48), rgba(56, 170, 184, 0.36), transparent);
}

.member-org-group::before {
  position: absolute;
  top: -20px;
  left: 50%;
  width: 2px;
  height: 20px;
  content: "";
  background: linear-gradient(180deg, rgba(10, 168, 150, 0.14), var(--team-color));
  transform: translateX(-50%);
}

.member-org-manager {
  color: #ffffff;
  background: linear-gradient(135deg, var(--team-color), #142126);
  border-color: rgba(255, 255, 255, 0.16);
}

.member-org-manager small {
  color: rgba(255, 255, 255, 0.72);
}

.member-org-child-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 14px;
}

.member-org-child-grid::before {
  position: absolute;
  top: 0;
  left: 14%;
  right: 14%;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, rgba(10, 168, 150, 0.08), rgba(56, 170, 184, 0.42), rgba(10, 168, 150, 0.08));
}

.member-org-child-grid .member-org-node::before {
  position: absolute;
  top: -14px;
  left: 50%;
  width: 2px;
  height: 14px;
  content: "";
  background: linear-gradient(180deg, rgba(56, 170, 184, 0.42), var(--team-color));
  transform: translateX(-50%);
}

.member-org-node {
  min-height: 138px;
  padding: 14px 10px;
  color: var(--ink);
  background: var(--surface-warm);
  border: 1px solid var(--line);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.member-org-node:hover,
.member-org-node:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.member-org-node strong {
  line-height: 1.22;
}

.member-org-node small {
  color: var(--muted);
  font-weight: 800;
}

.member-org-node.member-org-manager {
  color: #ffffff;
  background: linear-gradient(135deg, var(--team-color), #142126);
  border-color: rgba(255, 255, 255, 0.16);
}

.member-org-node.member-org-manager small {
  color: rgba(255, 255, 255, 0.72);
}

.member-it-card {
  background:
    linear-gradient(135deg, rgba(52, 95, 116, 0.09), rgba(10, 168, 150, 0.08)),
    var(--surface);
}

.member-it-card h2 {
  margin: 6px 0 0;
}

.member-it-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.member-it-flow span {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 92px;
  align-content: center;
  padding: 12px;
  color: var(--ink);
  border: 1px solid rgba(10, 168, 150, 0.2);
  border-radius: var(--radius);
  background: rgba(10, 168, 150, 0.07);
  font-weight: 800;
}

.member-it-flow strong {
  color: var(--teal-dark);
  font-size: 0.78rem;
}

@media (max-width: 980px) {
  .team-member-grid {
    grid-template-columns: 1fr;
  }

  .member-profile-card {
    position: static;
  }
}

@media (max-width: 620px) {
  .member-cert-grid,
  .member-work-gallery {
    grid-template-columns: 1fr;
  }

  .member-org-grid,
  .member-org-groups,
  .member-org-child-grid,
  .member-it-flow {
    grid-template-columns: 1fr;
  }

  .member-org-groups::before,
  .member-org-child-grid::before {
    left: 50%;
    right: auto;
    width: 2px;
    height: 100%;
    opacity: 0.34;
    transform: translateX(-50%);
  }

  .member-profile-card {
    padding: 16px;
  }

  .member-photo-wrap,
  .member-photo {
    width: 120px;
    height: 120px;
  }

  .member-accent {
    width: 44px;
    height: 44px;
    font-size: 0.74rem;
  }

  .member-name {
    font-size: 1.28rem;
    overflow-wrap: anywhere;
  }

  .member-info-card {
    padding: 16px;
  }
}

body.ui-theme-dark .team-section,
body.ui-theme-dark .team-member-section {
  background:
    linear-gradient(180deg, rgba(18, 30, 36, 0.96), rgba(16, 26, 33, 0.78)),
    var(--surface);
}

body.ui-theme-dark .team-manager-column {
  background:
    linear-gradient(145deg, rgba(82, 205, 191, 0.1), rgba(120, 164, 182, 0.08)),
    rgba(18, 30, 36, 0.82);
}

body.ui-theme-dark .team-report-empty,
body.ui-theme-dark .member-org-empty {
  background: rgba(255, 255, 255, 0.05);
}

/* Final team board polish: compact groups, no stretched empty columns. */
.team-org-overview {
  gap: 20px;
}

.team-management-grid {
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: 18px;
  align-items: start;
  padding-top: 24px;
}

.team-management-grid::before {
  left: 4%;
  right: 4%;
  opacity: 0.48;
}

.team-manager-column {
  display: flex;
  flex-direction: column;
  align-self: start;
  justify-content: flex-start;
  gap: 12px;
  height: fit-content;
  min-height: 0;
  padding: 12px;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(237, 244, 242, 0.72)),
    rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 42px rgba(20, 33, 38, 0.1);
}

.team-manager-column::before {
  top: -24px;
  height: 24px;
  opacity: 0.74;
}

.team-manager-column::after {
  top: -6px;
  width: 9px;
  height: 9px;
}

.team-manager-head,
.team-report-node {
  display: block;
}

.team-report-branch {
  height: 8px;
  opacity: 0.75;
}

.team-report-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 0;
}

.team-report-node::before {
  top: -10px;
  height: 10px;
  opacity: 0.72;
}

.team-card {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto;
  gap: 10px;
  padding: 16px;
  border-radius: 24px;
}

.team-card::after {
  right: -46px;
  bottom: -52px;
  width: 132px;
  height: 132px;
  opacity: 0.72;
}

.team-card-profile {
  min-height: 0;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.team-card-copy {
  min-width: 0;
  padding-right: 2px;
}

.team-photo-wrap,
.team-photo {
  width: 82px;
  height: 82px;
}

.team-mark {
  width: 34px;
  height: 34px;
  font-size: 0.66rem;
}

.team-card h3 {
  margin-bottom: 7px;
  font-size: 1.05rem;
}

.team-card p {
  font-size: 0.9rem;
  line-height: 1.38;
  -webkit-line-clamp: 2;
}

.team-card-action {
  display: none;
}

.team-card-links {
  gap: 6px;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.team-social-link {
  width: 32px;
  height: 32px;
  border-radius: 13px;
}

.team-social-link svg,
.member-social-link svg {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

.team-card.team-card-manager {
  min-height: 138px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02)),
    linear-gradient(140deg, var(--team-color), #112126 86%);
}

.team-card.team-card-specialist {
  min-height: 116px;
  padding: 14px;
  color: var(--ink);
  border: 1px solid rgba(10, 168, 150, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(237, 244, 242, 0.86));
  box-shadow: 0 12px 26px rgba(20, 33, 38, 0.08);
}

.team-card.team-card-specialist .team-card-profile {
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 12px;
}

.team-card.team-card-specialist .team-photo-wrap,
.team-card.team-card-specialist .team-photo {
  width: 66px;
  height: 66px;
}

.team-card.team-card-specialist .team-mark {
  width: 30px;
  height: 30px;
  border-width: 2px;
  font-size: 0.62rem;
}

.team-card.team-card-specialist .team-department {
  color: var(--teal-dark);
}

.team-card.team-card-specialist h3 {
  color: var(--ink);
  font-size: 0.98rem;
}

.team-card.team-card-specialist p {
  color: var(--muted);
}

.team-card.team-card-specialist .team-social-link {
  color: var(--teal-dark);
  border-color: rgba(10, 168, 150, 0.2);
  background: rgba(10, 168, 150, 0.08);
}

.team-report-empty {
  min-height: 116px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(237, 244, 242, 0.6));
}

.team-card.team-card-director {
  min-height: 190px;
  border-radius: 28px;
}

.team-card.team-card-director .team-card-profile {
  grid-template-columns: 116px minmax(0, 1fr);
}

.team-card.team-card-director .team-photo-wrap,
.team-card.team-card-director .team-photo {
  width: 116px;
  height: 116px;
}

.team-card.team-card-director h3 {
  font-size: 1.3rem;
}

body.ui-theme-dark .team-manager-column {
  background:
    linear-gradient(145deg, rgba(19, 35, 42, 0.94), rgba(16, 47, 47, 0.76)),
    rgba(18, 30, 36, 0.88);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
}

body.ui-theme-dark .team-card.team-card-specialist {
  color: #ffffff;
  border-color: rgba(82, 205, 191, 0.16);
  background:
    linear-gradient(135deg, rgba(18, 30, 36, 0.98), rgba(23, 45, 50, 0.9));
}

body.ui-theme-dark .team-card.team-card-specialist h3 {
  color: #ffffff;
}

body.ui-theme-dark .team-card.team-card-specialist p {
  color: rgba(255, 255, 255, 0.72);
}

body.ui-theme-dark .team-card.team-card-specialist .team-department,
body.ui-theme-dark .team-card.team-card-specialist .team-social-link {
  color: var(--cyan);
}

body.ui-theme-dark .team-report-empty {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(82, 205, 191, 0.05));
}

@media (max-width: 920px) {
  .team-management-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .team-management-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-top: 10px;
  }

  .team-management-grid::before,
  .team-manager-column::before,
  .team-manager-column::after {
    display: none;
  }

  .team-manager-column {
    padding: 10px;
    border-radius: 22px;
  }

  .team-card,
  .team-card.team-card-manager,
  .team-card.team-card-specialist,
  .team-card.team-card-director {
    min-height: 0;
    padding: 14px;
    border-radius: 20px;
  }

  .team-card-profile,
  .team-card.team-card-director .team-card-profile,
  .team-card.team-card-specialist .team-card-profile {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
  }

  .team-photo-wrap,
  .team-photo,
  .team-card.team-card-director .team-photo-wrap,
  .team-card.team-card-director .team-photo,
  .team-card.team-card-specialist .team-photo-wrap,
  .team-card.team-card-specialist .team-photo {
    width: 64px;
    height: 64px;
  }

  .team-card h3,
  .team-card.team-card-director h3,
  .team-card.team-card-specialist h3 {
    font-size: 1rem;
  }

  .team-card-links {
    display: none;
  }
}

/* Restored simple team grid. */
.team-org-drop,
.team-people-grid::before {
  display: none;
}

.team-org-overview {
  gap: 24px;
}

.team-people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 18px;
  align-items: stretch;
  padding-top: 0;
}

.team-card.team-card-featured {
  max-width: 760px;
  min-height: 230px;
  justify-self: center;
  padding: 26px;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.02)),
    linear-gradient(138deg, var(--team-color), #13242a 86%);
}

.team-card.team-card-featured .team-card-profile {
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 22px;
}

.team-card.team-card-featured .team-photo-wrap,
.team-card.team-card-featured .team-photo {
  width: 132px;
  height: 132px;
}

.team-card.team-card-featured .team-mark {
  width: 50px;
  height: 50px;
  font-size: 0.86rem;
}

.team-card.team-card-featured h3 {
  font-size: 1.45rem;
}

.team-card.team-card-person {
  min-height: 270px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02)),
    linear-gradient(145deg, var(--team-color), #111819 88%);
  box-shadow: 0 18px 42px rgba(20, 33, 38, 0.14);
}

.team-card.team-card-person.team-card-lead {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03)),
    linear-gradient(145deg, var(--team-color), #102529 88%);
}

.team-card.team-card-person .team-card-profile {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.team-card.team-card-person .team-photo-wrap,
.team-card.team-card-person .team-photo {
  width: 112px;
  height: 112px;
}

.team-card.team-card-person .team-mark {
  width: 42px;
  height: 42px;
  border-width: 3px;
  font-size: 0.76rem;
}

.team-card.team-card-person .team-department {
  color: rgba(255, 255, 255, 0.74);
}

.team-card.team-card-person h3 {
  color: #ffffff;
  font-size: 1.18rem;
}

.team-card.team-card-person p {
  color: rgba(255, 255, 255, 0.78);
  -webkit-line-clamp: 3;
}

.team-card.team-card-person .team-card-action,
.team-card.team-card-featured .team-card-action {
  display: inline-flex;
}

.team-card.team-card-person .team-card-links,
.team-card.team-card-featured .team-card-links {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.team-card.team-card-person .team-social-link,
.team-card.team-card-featured .team-social-link {
  width: 38px;
  height: 38px;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.24);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.12);
}

.team-card.team-card-person:hover,
.team-card.team-card-featured:hover {
  transform: translateY(-7px);
}

body.ui-theme-dark .team-card.team-card-person {
  border-color: rgba(82, 205, 191, 0.14);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    linear-gradient(145deg, var(--team-color), #0f1c22 88%);
}

@media (max-width: 760px) {
  .team-card.team-card-featured,
  .team-card.team-card-person {
    min-height: 0;
    padding: 18px;
    border-radius: 24px;
  }

  .team-card.team-card-featured .team-card-profile {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 14px;
  }

  .team-card.team-card-featured .team-photo-wrap,
  .team-card.team-card-featured .team-photo {
    width: 86px;
    height: 86px;
  }

  .team-card.team-card-featured .team-mark {
    width: 38px;
    height: 38px;
    font-size: 0.7rem;
  }

  .team-card.team-card-person .team-card-profile {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
  }

  .team-card.team-card-person .team-photo-wrap,
  .team-card.team-card-person .team-photo {
    width: 74px;
    height: 74px;
  }

  .team-card.team-card-person .team-mark {
    width: 32px;
    height: 32px;
    font-size: 0.64rem;
  }

  .team-card.team-card-person .team-card-links,
  .team-card.team-card-featured .team-card-links {
    display: flex;
  }
}

@media (max-width: 430px) {
  .team-card.team-card-featured .team-card-profile,
  .team-card.team-card-person .team-card-profile {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .team-card.team-card-featured .team-photo-wrap,
  .team-card.team-card-featured .team-photo,
  .team-card.team-card-person .team-photo-wrap,
  .team-card.team-card-person .team-photo {
    width: 62px;
    height: 62px;
  }

  .team-card.team-card-featured h3,
  .team-card.team-card-person h3 {
    font-size: 1rem;
  }
}

/* Hierarchical team layout: director -> managers -> specialists. */
.team-hierarchy {
  position: relative;
  display: grid;
  gap: 24px;
}

.team-hierarchy .team-card {
  z-index: 1;
}

.team-hierarchy .team-card.team-card-featured {
  width: min(100%, 720px);
  min-height: 218px;
  justify-self: center;
  padding: 26px;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.03)),
    linear-gradient(135deg, #13a698, #0f403b 78%);
}

.team-hierarchy .team-card.team-card-featured .team-card-profile {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.team-hierarchy .team-card.team-card-featured .team-photo-wrap,
.team-hierarchy .team-card.team-card-featured .team-photo {
  width: 132px;
  height: 132px;
}

.team-hierarchy .team-card.team-card-featured .team-card-copy {
  min-width: 0;
}

.team-tree-connector {
  position: relative;
  height: 78px;
  margin: -2px 0 -2px;
}

.team-tree-connector::before,
.team-tree-connector::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.team-tree-connector::before {
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, rgba(82, 205, 191, 0.9), rgba(56, 170, 184, 0.2));
  transform: translateX(-50%);
}

.team-tree-connector::after {
  left: 9%;
  right: 9%;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(10, 168, 150, 0.78), rgba(56, 170, 184, 0.54), transparent);
  box-shadow: 0 0 24px rgba(10, 168, 150, 0.16);
}

.team-manager-grid,
.team-specialist-grid {
  position: relative;
  display: grid;
  gap: 18px;
  align-items: stretch;
}

.team-manager-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-top: 0;
}

.team-manager-grid::before {
  display: none;
}

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

.team-node {
  position: relative;
  min-width: 0;
}

.team-manager-node::before {
  position: absolute;
  left: 50%;
  top: -24px;
  width: 2px;
  height: 24px;
  content: "";
  background: linear-gradient(180deg, rgba(56, 170, 184, 0.28), var(--team-color));
  transform: translateX(-50%);
}

.team-manager-node::after {
  position: absolute;
  left: 50%;
  top: -7px;
  width: 9px;
  height: 9px;
  content: "";
  border-radius: 50%;
  background: var(--team-color);
  box-shadow: 0 0 0 5px rgba(10, 168, 150, 0.08);
  transform: translateX(-50%);
}

.team-hierarchy .team-card.team-card-person {
  min-height: 176px;
  display: grid;
  grid-template-rows: auto auto;
  gap: 12px;
  justify-content: stretch;
  padding: 20px;
  border-radius: 24px;
}

.team-hierarchy .team-card.team-card-person .team-card-profile {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.team-hierarchy .team-card.team-card-person .team-photo-wrap,
.team-hierarchy .team-card.team-card-person .team-photo {
  width: 92px;
  height: 92px;
}

.team-hierarchy .team-card.team-card-person .team-mark {
  width: 38px;
  height: 38px;
  font-size: 0.7rem;
}

.team-hierarchy .team-card.team-card-person h3 {
  font-size: 1.08rem;
  line-height: 1.18;
}

.team-hierarchy .team-card.team-card-person p {
  font-size: 0.9rem;
  line-height: 1.38;
  -webkit-line-clamp: 2;
}

.team-hierarchy .team-card.team-card-worker {
  min-height: 168px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    linear-gradient(145deg, #142227, #111819 86%);
}

.team-hierarchy .team-card.team-card-worker::before {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  content: "";
  background: linear-gradient(180deg, var(--team-color), rgba(56, 170, 184, 0.6));
  transform: none;
}

.team-hierarchy .team-card.team-card-person .team-card-links,
.team-hierarchy .team-card.team-card-featured .team-card-links {
  display: flex;
}

.team-hierarchy .team-card.team-card-person .team-card-action,
.team-hierarchy .team-card.team-card-featured .team-card-action {
  display: inline-flex;
}

@media (max-width: 1180px) {
  .team-manager-grid,
  .team-specialist-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-tree-connector::after {
    left: 16%;
    right: 16%;
  }
}

@media (max-width: 700px) {
  .team-hierarchy {
    gap: 14px;
  }

  .team-tree-connector {
    display: none;
  }

  .team-manager-grid,
  .team-specialist-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .team-manager-node::before,
  .team-manager-node::after {
    display: none;
  }

  .team-hierarchy .team-card.team-card-featured,
  .team-hierarchy .team-card.team-card-person {
    min-height: 0;
    padding: 15px;
    border-radius: 22px;
  }

  .team-hierarchy .team-card.team-card-featured .team-card-profile,
  .team-hierarchy .team-card.team-card-person .team-card-profile {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
  }

  .team-hierarchy .team-card.team-card-featured .team-photo-wrap,
  .team-hierarchy .team-card.team-card-featured .team-photo,
  .team-hierarchy .team-card.team-card-person .team-photo-wrap,
  .team-hierarchy .team-card.team-card-person .team-photo {
    width: 70px;
    height: 70px;
  }

  .team-hierarchy .team-card.team-card-featured .team-mark,
  .team-hierarchy .team-card.team-card-person .team-mark {
    width: 32px;
    height: 32px;
    font-size: 0.62rem;
  }
}

/* Compact manager row fix. */
.team-hierarchy .team-manager-grid {
  align-items: start;
  gap: 16px;
}

.team-hierarchy .team-manager-node {
  align-self: start;
}

.team-hierarchy .team-manager-node .team-card.team-card-lead {
  min-height: 156px !important;
  height: auto !important;
  display: grid !important;
  grid-template-rows: auto;
  align-content: center;
  gap: 0;
  padding: 18px;
  border-radius: 24px;
}

.team-hierarchy .team-manager-node .team-card.team-card-lead::after {
  right: -42px;
  bottom: -48px;
  width: 118px;
  height: 118px;
  opacity: 0.55;
  pointer-events: none;
}

.team-hierarchy .team-manager-node .team-card.team-card-lead .team-card-profile {
  display: grid !important;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 0;
  height: auto;
  flex: none;
}

.team-hierarchy .team-manager-node .team-card.team-card-lead .team-photo-wrap,
.team-hierarchy .team-manager-node .team-card.team-card-lead .team-photo {
  width: 86px;
  height: 86px;
}

.team-hierarchy .team-manager-node .team-card.team-card-lead .team-mark {
  width: 36px;
  height: 36px;
  font-size: 0.68rem;
}

.team-hierarchy .team-manager-node .team-card.team-card-lead .team-card-copy {
  min-width: 0;
}

.team-hierarchy .team-manager-node .team-card.team-card-lead .team-department {
  margin-bottom: 6px;
}

.team-hierarchy .team-manager-node .team-card.team-card-lead h3 {
  margin-bottom: 7px;
  font-size: 1.05rem;
  line-height: 1.18;
}

.team-hierarchy .team-manager-node .team-card.team-card-lead p {
  font-size: 0.88rem;
  line-height: 1.35;
  -webkit-line-clamp: 2;
}

.team-hierarchy .team-manager-node .team-card.team-card-lead .team-card-action,
.team-hierarchy .team-manager-node .team-card.team-card-lead .team-card-links {
  display: none !important;
}

.team-hierarchy .team-specialist-grid {
  margin-top: 2px;
  align-items: start;
}

.team-hierarchy .team-specialist-node .team-card.team-card-worker {
  min-height: 152px;
  height: auto;
  align-content: center;
}

@media (max-width: 1180px) {
  .team-hierarchy .team-manager-node .team-card.team-card-lead {
    min-height: 146px !important;
  }
}

@media (max-width: 700px) {
  .team-hierarchy .team-manager-node .team-card.team-card-lead,
  .team-hierarchy .team-specialist-node .team-card.team-card-worker {
    min-height: 0 !important;
    padding: 14px;
  }

  .team-hierarchy .team-manager-node .team-card.team-card-lead .team-card-profile {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .team-hierarchy .team-manager-node .team-card.team-card-lead .team-photo-wrap,
  .team-hierarchy .team-manager-node .team-card.team-card-lead .team-photo {
    width: 68px;
    height: 68px;
  }
}

/* Small polished horizontal cards like the requested reference. */
.team-hierarchy .team-manager-grid {
  gap: 14px;
}

.team-hierarchy .team-manager-node .team-card.team-card-lead,
.team-hierarchy .team-specialist-node .team-card.team-card-worker {
  min-height: 182px !important;
  display: grid !important;
  align-content: center;
  padding: 18px 20px;
  border-radius: 22px;
}

.team-hierarchy .team-manager-node .team-card.team-card-lead .team-card-profile,
.team-hierarchy .team-specialist-node .team-card.team-card-worker .team-card-profile {
  display: grid !important;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.team-hierarchy .team-manager-node .team-card.team-card-lead .team-photo-wrap,
.team-hierarchy .team-manager-node .team-card.team-card-lead .team-photo,
.team-hierarchy .team-specialist-node .team-card.team-card-worker .team-photo-wrap,
.team-hierarchy .team-specialist-node .team-card.team-card-worker .team-photo {
  width: 104px;
  height: 104px;
}

.team-hierarchy .team-manager-node .team-card.team-card-lead .team-mark,
.team-hierarchy .team-specialist-node .team-card.team-card-worker .team-mark {
  width: 40px;
  height: 40px;
  font-size: 0.72rem;
}

.team-hierarchy .team-manager-node .team-card.team-card-lead h3,
.team-hierarchy .team-specialist-node .team-card.team-card-worker h3 {
  max-width: 12rem;
  margin-bottom: 8px;
  font-size: 1.12rem;
  line-height: 1.18;
}

.team-hierarchy .team-manager-node .team-card.team-card-lead p,
.team-hierarchy .team-specialist-node .team-card.team-card-worker p {
  max-width: 14rem;
  font-size: 0.92rem;
  line-height: 1.36;
  -webkit-line-clamp: 2;
}

.team-hierarchy .team-manager-node .team-card.team-card-lead .team-card-action,
.team-hierarchy .team-manager-node .team-card.team-card-lead .team-card-links,
.team-hierarchy .team-specialist-node .team-card.team-card-worker .team-card-action,
.team-hierarchy .team-specialist-node .team-card.team-card-worker .team-card-links {
  display: none !important;
}

@media (max-width: 1180px) {
  .team-hierarchy .team-manager-node .team-card.team-card-lead,
  .team-hierarchy .team-specialist-node .team-card.team-card-worker {
    min-height: 170px !important;
    padding: 16px;
  }

  .team-hierarchy .team-manager-node .team-card.team-card-lead .team-card-profile,
  .team-hierarchy .team-specialist-node .team-card.team-card-worker .team-card-profile {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 14px;
  }

  .team-hierarchy .team-manager-node .team-card.team-card-lead .team-photo-wrap,
  .team-hierarchy .team-manager-node .team-card.team-card-lead .team-photo,
  .team-hierarchy .team-specialist-node .team-card.team-card-worker .team-photo-wrap,
  .team-hierarchy .team-specialist-node .team-card.team-card-worker .team-photo {
    width: 88px;
    height: 88px;
  }
}

@media (max-width: 700px) {
  .team-hierarchy .team-manager-node .team-card.team-card-lead,
  .team-hierarchy .team-specialist-node .team-card.team-card-worker {
    min-height: 0 !important;
    padding: 14px;
  }

  .team-hierarchy .team-manager-node .team-card.team-card-lead .team-card-profile,
  .team-hierarchy .team-specialist-node .team-card.team-card-worker .team-card-profile {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
  }

  .team-hierarchy .team-manager-node .team-card.team-card-lead .team-photo-wrap,
  .team-hierarchy .team-manager-node .team-card.team-card-lead .team-photo,
  .team-hierarchy .team-specialist-node .team-card.team-card-worker .team-photo-wrap,
  .team-hierarchy .team-specialist-node .team-card.team-card-worker .team-photo {
    width: 68px;
    height: 68px;
  }

  .team-hierarchy .team-manager-node .team-card.team-card-lead h3,
  .team-hierarchy .team-specialist-node .team-card.team-card-worker h3 {
    max-width: none;
    font-size: 1rem;
  }

  .team-hierarchy .team-manager-node .team-card.team-card-lead p,
  .team-hierarchy .team-specialist-node .team-card.team-card-worker p {
    max-width: none;
    font-size: 0.86rem;
  }
}

/* One-line animated team rail. */
.team-carousel {
  gap: 28px;
}

.team-carousel .team-tree-connector,
.team-carousel .team-manager-grid,
.team-carousel .team-specialist-grid {
  display: none;
}

.team-carousel-shell {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 8px 0 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.team-carousel-shell::before,
.team-carousel-shell::after {
  position: absolute;
  top: 0;
  bottom: 10px;
  z-index: 3;
  width: 64px;
  content: "";
  pointer-events: none;
}

.team-carousel-shell::before {
  left: 0;
  background: linear-gradient(90deg, var(--surface), transparent);
}

.team-carousel-shell::after {
  right: 0;
  background: linear-gradient(270deg, var(--surface), transparent);
}

.team-carousel-track {
  display: flex;
  width: max-content;
  gap: 0;
  will-change: transform;
  animation: teamRailScroll 46s linear infinite;
}

.team-carousel-shell:hover .team-carousel-track,
.team-carousel-shell:focus-within .team-carousel-track {
  animation-play-state: paused;
}

.team-carousel-set {
  display: flex;
  flex: 0 0 auto;
  gap: 16px;
  padding-right: 16px;
}

.team-rail-node {
  flex: 0 0 330px;
  min-width: 0;
}

.team-carousel .team-card.team-card-person {
  width: 100%;
  min-height: 178px !important;
  height: 178px;
  display: grid !important;
  align-content: center;
  padding: 18px;
  border-radius: 24px;
  transform: translateZ(0);
}

.team-carousel .team-card.team-card-lead {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.02)),
    linear-gradient(145deg, var(--team-color), #102529 88%);
}

.team-carousel .team-card.team-card-worker {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    linear-gradient(145deg, #142227, #111819 86%);
}

.team-carousel .team-card.team-card-worker::before {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  content: "";
  background: linear-gradient(180deg, var(--team-color), rgba(56, 170, 184, 0.58));
  transform: none;
}

.team-carousel .team-card.team-card-person .team-card-profile {
  display: grid !important;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 15px;
  align-items: center;
}

.team-carousel .team-card.team-card-person .team-photo-wrap,
.team-carousel .team-card.team-card-person .team-photo {
  width: 94px;
  height: 94px;
}

.team-carousel .team-card.team-card-person .team-mark {
  width: 38px;
  height: 38px;
  font-size: 0.7rem;
}

.team-carousel .team-card.team-card-person .team-department {
  margin-bottom: 6px;
}

.team-carousel .team-card.team-card-person h3 {
  max-width: 12rem;
  margin-bottom: 8px;
  font-size: 1.1rem;
  line-height: 1.18;
}

.team-carousel .team-card.team-card-person p {
  max-width: 14rem;
  font-size: 0.9rem;
  line-height: 1.36;
  -webkit-line-clamp: 2;
}

.team-carousel .team-card.team-card-person .team-card-action,
.team-carousel .team-card.team-card-person .team-card-links {
  display: none !important;
}

.team-carousel .team-card.team-card-person:hover {
  transform: translateY(-6px) translateZ(0);
}

@keyframes teamRailScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@media (max-width: 900px) {
  .team-carousel-shell {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 14px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .team-carousel-shell::-webkit-scrollbar {
    display: none;
  }

  .team-carousel-shell::before,
  .team-carousel-shell::after {
    display: none;
  }

  .team-carousel-track {
    animation: none;
  }

  .team-carousel-set[aria-hidden="true"] {
    display: none;
  }

  .team-rail-node {
    flex-basis: min(84vw, 330px);
    scroll-snap-align: center;
  }
}

@media (max-width: 520px) {
  .team-carousel {
    gap: 18px;
  }

  .team-carousel-set {
    gap: 12px;
    padding-right: 12px;
  }

  .team-carousel .team-card.team-card-person {
    height: auto;
    min-height: 152px !important;
    padding: 14px;
    border-radius: 22px;
  }

  .team-carousel .team-card.team-card-person .team-card-profile {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
  }

  .team-carousel .team-card.team-card-person .team-photo-wrap,
  .team-carousel .team-card.team-card-person .team-photo {
    width: 72px;
    height: 72px;
  }

  .team-carousel .team-card.team-card-person .team-mark {
    width: 32px;
    height: 32px;
    font-size: 0.62rem;
  }

  .team-carousel .team-card.team-card-person h3 {
    max-width: none;
    font-size: 1rem;
  }

  .team-carousel .team-card.team-card-person p {
    max-width: none;
    font-size: 0.86rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-carousel-track {
    animation: none;
  }
}

/* Final compact card overrides (applies to both hierarchy and carousel modes). */
.team-hierarchy .team-card.team-card-person {
  min-height: 148px !important;
  padding: 14px 16px !important;
  border-radius: 20px !important;
}

.team-hierarchy .team-card.team-card-person .team-card-profile {
  grid-template-columns: 74px minmax(0, 1fr) !important;
  gap: 12px !important;
}

.team-hierarchy .team-card.team-card-person .team-photo-wrap,
.team-hierarchy .team-card.team-card-person .team-photo {
  width: 74px !important;
  height: 74px !important;
}

.team-hierarchy .team-card.team-card-person .team-mark {
  width: 32px !important;
  height: 32px !important;
  font-size: 0.62rem !important;
}

.team-hierarchy .team-card.team-card-person .team-department {
  margin-bottom: 4px !important;
  font-size: 0.7rem;
}

.team-hierarchy .team-card.team-card-person h3 {
  margin-bottom: 6px !important;
  font-size: 1rem !important;
  line-height: 1.16 !important;
}

.team-hierarchy .team-card.team-card-person p {
  font-size: 0.84rem !important;
  line-height: 1.32 !important;
  -webkit-line-clamp: 2;
}

.team-hierarchy .team-card.team-card-person .team-card-action,
.team-hierarchy .team-card.team-card-person .team-card-links {
  display: none !important;
}

.team-hierarchy .team-manager-node .team-card.team-card-lead,
.team-hierarchy .team-specialist-node .team-card.team-card-worker {
  min-height: 148px !important;
}

.team-carousel-shell {
  padding: 6px 0 14px;
}

.team-carousel-set {
  gap: 12px;
  padding-right: 12px;
}

.team-rail-node {
  flex-basis: 282px;
}

.team-carousel .team-card.team-card-person {
  min-height: 148px !important;
  height: 148px;
  padding: 14px 16px !important;
  border-radius: 20px !important;
}

.team-carousel .team-card.team-card-person .team-card-profile {
  grid-template-columns: 74px minmax(0, 1fr) !important;
  gap: 12px !important;
}

.team-carousel .team-card.team-card-person .team-photo-wrap,
.team-carousel .team-card.team-card-person .team-photo {
  width: 74px !important;
  height: 74px !important;
}

.team-carousel .team-card.team-card-person .team-mark {
  width: 32px !important;
  height: 32px !important;
  font-size: 0.62rem !important;
}

.team-carousel .team-card.team-card-person h3 {
  font-size: 1rem !important;
}

.team-carousel .team-card.team-card-person p {
  font-size: 0.84rem !important;
}

@media (max-width: 900px) {
  .team-rail-node {
    flex-basis: min(84vw, 290px);
  }
}

@media (max-width: 520px) {
  .team-hierarchy .team-card.team-card-person,
  .team-carousel .team-card.team-card-person {
    min-height: 136px !important;
    height: auto;
    padding: 12px 13px !important;
  }

  .team-hierarchy .team-card.team-card-person .team-card-profile,
  .team-carousel .team-card.team-card-person .team-card-profile {
    grid-template-columns: 66px minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  .team-hierarchy .team-card.team-card-person .team-photo-wrap,
  .team-hierarchy .team-card.team-card-person .team-photo,
  .team-carousel .team-card.team-card-person .team-photo-wrap,
  .team-carousel .team-card.team-card-person .team-photo {
    width: 66px !important;
    height: 66px !important;
  }

  .team-hierarchy .team-card.team-card-person h3,
  .team-carousel .team-card.team-card-person h3 {
    font-size: 0.94rem !important;
  }

  .team-hierarchy .team-card.team-card-person p,
  .team-carousel .team-card.team-card-person p {
    font-size: 0.8rem !important;
  }
}

/* Team rail hard-fix: keep cards readable and aligned on one row. */
.team-section .team-card h3,
.team-section .team-card p {
  overflow-wrap: break-word;
  word-break: normal;
}

.team-section .team-carousel-shell {
  overflow: hidden;
}

.team-section .team-carousel-track {
  display: flex;
  align-items: stretch;
}

.team-section .team-carousel-set {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 14px;
  padding-right: 14px;
}

.team-section .team-rail-node {
  flex: 0 0 clamp(300px, 24vw, 340px);
  min-width: 300px;
  max-width: 340px;
  align-self: stretch;
}

.team-section .team-carousel .team-card.team-card-person {
  min-height: 176px !important;
  height: auto !important;
  padding: 16px 18px !important;
  border-radius: 22px !important;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

.team-section .team-carousel .team-card.team-card-person .team-card-profile {
  display: grid !important;
  grid-template-columns: 86px minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: center;
}

.team-section .team-carousel .team-card.team-card-person .team-photo-wrap,
.team-section .team-carousel .team-card.team-card-person .team-photo {
  width: 86px !important;
  height: 86px !important;
}

.team-section .team-carousel .team-card.team-card-person .team-mark {
  width: 34px !important;
  height: 34px !important;
  font-size: 0.66rem !important;
}

.team-section .team-carousel .team-card.team-card-person h3 {
  max-width: none;
  margin-bottom: 7px;
  font-size: 1.08rem !important;
  line-height: 1.2;
}

.team-section .team-carousel .team-card.team-card-person p {
  max-width: none;
  line-height: 1.34;
  font-size: 0.9rem !important;
  -webkit-line-clamp: 2;
}

@media (max-width: 900px) {
  .team-section .team-rail-node {
    flex-basis: min(86vw, 320px);
    min-width: min(86vw, 320px);
    max-width: min(86vw, 320px);
  }
}

@media (max-width: 520px) {
  .team-section .team-carousel .team-card.team-card-person {
    min-height: 138px !important;
    padding: 12px 13px !important;
  }

  .team-section .team-carousel .team-card.team-card-person .team-card-profile {
    grid-template-columns: 66px minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  .team-section .team-carousel .team-card.team-card-person .team-photo-wrap,
  .team-section .team-carousel .team-card.team-card-person .team-photo {
    width: 66px !important;
    height: 66px !important;
  }

  .team-section .team-carousel .team-card.team-card-person h3 {
    font-size: 0.94rem !important;
  }

  .team-section .team-carousel .team-card.team-card-person p {
    font-size: 0.8rem !important;
  }
}

/* Non-director staff stays visibly round across team views. */
.team-card.team-card-person:not(.team-card-director),
.team-card.team-card-specialist:not(.team-card-director) {
  border-radius: 24px !important;
}

.team-card.team-card-person:not(.team-card-director) .team-photo-wrap,
.team-card.team-card-specialist:not(.team-card-director) .team-photo-wrap,
.member-profile-card.member-profile-person .member-photo-wrap {
  aspect-ratio: 1 / 1;
  border: 3px solid rgba(255, 255, 255, 0.78);
  border-radius: 50% !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.78)),
    var(--team-color);
  box-shadow: 0 14px 28px rgba(6, 32, 38, 0.22);
}

.team-card.team-card-person:not(.team-card-director) .team-photo,
.team-card.team-card-specialist:not(.team-card-director) .team-photo,
.member-profile-card.member-profile-person .member-photo {
  display: block;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  border-radius: 50% !important;
  object-fit: cover;
}

.team-card.team-card-person:not(.team-card-director) .team-mark,
.team-card.team-card-specialist:not(.team-card-director) .team-mark,
.member-profile-card.member-profile-person .member-accent {
  border-radius: 50% !important;
  box-shadow: 0 8px 18px rgba(6, 32, 38, 0.22);
}
