.team-details {
  padding-top: 3rem;
}

.team-details > .br-shell > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.team-details header h2,
.team-history h2 {
  margin: 0.2rem 0 0.45rem;
}

.team-details header p,
.team-history p {
  margin: 0;
}

.team-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.team-kpis article {
  display: grid;
  gap: 0.3rem;
  min-height: 8.5rem;
  padding: 1.25rem;
  border: 1px solid var(--br-line, rgba(16, 23, 20, 0.12));
  border-radius: 1rem;
  background: var(--br-paper, #fff);
}

.team-kpis span,
.team-kpis small {
  color: var(--br-muted, #64716b);
}

.team-kpis strong {
  align-self: end;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

.team-history {
  padding: 1.5rem;
  border-radius: 1rem;
  background: var(--br-soft, #f2f5f2);
}

.team-history > p:last-of-type {
  margin-bottom: 1rem;
}

.team-history td,
.team-history th {
  white-space: nowrap;
}

.movement {
  font-weight: 700;
}

.movement.up {
  color: #147a3d;
}

.movement.down {
  color: #b3261e;
}

.team-page-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.team-page-nav a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--br-line, rgba(16, 23, 20, 0.12));
  border-radius: 0.85rem;
  text-decoration: none;
}

.team-page-nav a:nth-child(2) {
  justify-content: center;
  text-align: center;
}

.team-page-nav a:last-child {
  justify-content: flex-end;
  text-align: right;
}

@media (max-width: 800px) {
  .team-details > .br-shell > header {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .team-page-nav a:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 520px) {
  .team-kpis,
  .team-page-nav {
    grid-template-columns: 1fr;
  }

  .team-page-nav a:nth-child(2) {
    grid-column: auto;
    grid-row: auto;
  }

  .team-page-nav a,
  .team-page-nav a:last-child {
    justify-content: flex-start;
    text-align: left;
  }
}
