.academy-menu-toggle {
  display: none;
}
@media (max-width: 700px) {
  .teacher-portal-nav.portal-common,
  body.student-mode .student-portal-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 72px;
    padding: 12px 20px;
    background: #171b24;
  }
  .teacher-portal-nav.portal-common .brand,
  body.student-mode .student-portal-brand {
    flex: 1;
    min-width: 0;
    gap: 8px;
  }
  .teacher-portal-nav.portal-common .brand b,
  body.student-mode .student-portal-brand b {
    font-size: 12px;
  }
  .teacher-portal-nav.portal-common .brand .mark,
  body.student-mode .student-portal-brand .mark {
    width: 24px;
    height: 30px;
    flex-basis: 24px;
  }
  .teacher-portal-nav.portal-common .teacher-portal-tools,
  body.student-mode .student-portal-tools {
    width: auto;
    margin: 0;
    gap: 6px;
    justify-content: flex-end;
    order: 0;
  }
  .teacher-portal-nav.portal-common :is(.student-theme-button, .teacher-logout),
  body.student-mode .student-portal-tools > button {
    min-height: 36px;
    padding: 7px 9px;
  }
  .teacher-portal-nav.portal-common .learner-name {
    display: none;
  }
  body.student-mode .student-portal-brand {
    flex-basis: calc(100% - 60px);
  }
  body.student-mode .student-portal-tools {
    order: 2;
    width: 100%;
    justify-content: flex-end;
  }
  body.student-mode .student-portal-tools .student-profile-button {
    width: auto;
  }
  body.student-mode .student-profile-button > div {
    display: none;
  }
  .teacher-portal-nav.portal-common .academy-menu-toggle,
  body.student-mode .student-portal-nav .academy-menu-toggle {
    display: grid;
    place-items: center;
    flex: none;
    width: 36px;
    height: 36px;
    padding: 7px;
    border: 1px solid #ffffff30;
    background: transparent;
    color: #f3f2ed;
    border-radius: 6px;
  }
  .academy-menu-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
  }
  .teacher-portal-nav.portal-common .role-switch,
  body.student-mode .student-portal-nav .student-tabs {
    display: none;
  }
  .teacher-portal-nav.portal-common.academy-menu-open .role-switch,
  body.student-mode .student-portal-nav.academy-menu-open .student-tabs {
    position: absolute;
    inset: 100% 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    height: calc(100dvh - 72px);
    max-width: none;
    padding: 24px 20px;
    gap: 8px;
    overflow: auto;
    background: #171b24;
    border-top: 1px solid #ffffff20;
    z-index: 51;
  }
  .teacher-portal-nav.portal-common.academy-menu-open .role-btn,
  body.student-mode .student-portal-nav.academy-menu-open .student-tab {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex: none;
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    font-size: 16px;
    color: #f3f2ed;
  }
}
