.topbar-nav #topTeams { text-decoration: none; }

@media (max-width: 720px) {
  .topbar .topbar-nav { display: flex; flex: 0 0 auto; overflow: visible; }
  .topbar-nav > :not(#topTeams, #topProjects) { display: none; }
  .topbar-nav :is(#topTeams, #topProjects) {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #385169;
    border-radius: 9px;
    background: #253b54;
  }
  .topbar-nav :is(#topTeams, #topProjects).active { border-color: #ffa45d; }
  .topbar-nav :is(#topTeams, #topProjects) span { display: none; }
}

.team-page {
  display: grid;
  gap: 16px;
  max-width: 1040px;
  margin-inline: auto;
}

.team-page .panel { min-width: 0; margin: 0; }
.team-page h1 { color: var(--title); font-size: clamp(1.85rem, 4vw, 2.7rem); font-weight: 800; }
.team-page h2 { color: var(--title); font-size: 1.15rem; font-weight: 750; }
.team-page p { color: var(--soft); }
.team-heading p:last-child { margin-bottom: 0; }

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

.team-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.team-form label,
.team-invite {
  display: grid;
  gap: 8px;
}

.team-form > button { margin-top: auto; }
.team-form label,
.team-invite { color: var(--title); font-weight: 650; }

.team-heading .team-actions,
.team-page details + .team-actions { margin-top: 10px; }
.team-file-tabs { padding: 9px 12px; background: var(--surface-2); }
.team-file-tabs button { max-width: 100%; overflow-wrap: anywhere; }
.team-editor textarea { min-height: 285px; }
.team-editor .panel-head { overflow-wrap: anywhere; }
.team-page .course-back, .team-links a { color: var(--blue); }

.team-history {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.team-history li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 2px 10px;
  padding-block: 7px;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.team-history small { grid-column: 2; color: var(--soft); }
.team-page summary { cursor: pointer; }
.team-page details pre { margin-top: 10px; border-radius: 8px; }
.team-git-help ul { margin-bottom: 0; }
.team-git-help code { color: var(--blue); overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .team-grid { grid-template-columns: 1fr; }
  .team-editor textarea { min-height: 240px; }
}
