.gts-global-nav,
.gts-compact-nav {
  display: none;
}

@media (max-width: 900px) {
  .gts-global-nav__desktop,
  .gts-compact-nav__desktop {
    display: none !important;
  }

  nav:has(> .gts-global-nav),
  div:has(> .gts-global-nav) {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
  }

  .gts-global-nav,
  .gts-compact-nav {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    color: #1e293b;
    font: 500 16px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif;
  }

  .gts-global-nav__summary,
  .gts-compact-nav > summary {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    min-height: 48px;
    width: 100%;
    gap: 10px;
    padding: 10px 13px;
    cursor: pointer;
    list-style: none;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #1e293b;
    box-shadow: 0 1px 2px rgb(15 23 42 / 6%);
    -webkit-tap-highlight-color: transparent;
  }

  .gts-global-nav__summary::-webkit-details-marker,
  .gts-compact-nav > summary::-webkit-details-marker,
  .gts-global-nav__group > summary::-webkit-details-marker {
    display: none;
  }

  .gts-global-nav__summary:focus-visible,
  .gts-compact-nav > summary:focus-visible,
  .gts-global-nav__group > summary:focus-visible,
  .gts-global-nav a:focus-visible,
  .gts-compact-nav a:focus-visible,
  .gts-compact-nav button:focus-visible {
    outline: 3px solid rgb(37 99 235 / 28%);
    outline-offset: 2px;
  }

  .gts-global-nav__summary-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-weight: 750;
  }

  .gts-global-nav__menu-icon {
    display: grid;
    flex: 0 0 20px;
    gap: 4px;
    width: 20px;
  }

  .gts-global-nav__menu-icon i {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
  }

  .gts-global-nav__context {
    min-width: 0;
    margin-left: auto;
    overflow: hidden;
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .gts-global-nav__chevron,
  .gts-compact-nav__chevron {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 19px;
    line-height: 1;
    transition: transform 160ms ease;
  }

  .gts-global-nav[open] > summary .gts-global-nav__chevron,
  .gts-compact-nav[open] > summary .gts-compact-nav__chevron {
    transform: rotate(180deg);
  }

  .gts-global-nav__panel,
  .gts-compact-nav__panel {
    box-sizing: border-box;
    width: 100%;
    max-height: min(72vh, 650px);
    margin-top: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 45px rgb(15 23 42 / 16%);
  }

  .gts-global-nav__panel {
    padding: 10px;
  }

  .gts-global-nav__quick {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding-bottom: 10px;
  }

  .gts-global-nav__quick a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 14px;
    font-weight: 750;
    text-align: center;
    text-decoration: none;
    white-space: normal !important;
  }

  .gts-global-nav__group {
    border-top: 1px solid #e2e8f0;
  }

  .gts-global-nav__group > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    gap: 12px;
    padding: 10px 6px;
    cursor: pointer;
    list-style: none;
    color: #1e293b;
  }

  .gts-global-nav__group > summary > span:first-child {
    display: grid;
    min-width: 0;
    gap: 2px;
  }

  .gts-global-nav__group > summary b {
    font-size: 15px;
  }

  .gts-global-nav__group > summary small {
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
  }

  .gts-global-nav__group > summary > span:last-child {
    flex: 0 0 28px;
    color: #64748b;
    font-size: 23px;
    line-height: 1;
    text-align: center;
    transition: transform 160ms ease;
  }

  .gts-global-nav__group[open] > summary > span:last-child {
    transform: rotate(45deg);
  }

  .gts-global-nav__links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 0 0 10px;
  }

  .gts-global-nav__links a,
  .gts-compact-nav__panel a,
  .gts-compact-nav__panel button {
    box-sizing: border-box;
    display: flex !important;
    align-items: center;
    min-height: 44px;
    min-width: 0;
    padding: 9px 10px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
    color: #334155 !important;
    font: 650 13px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif !important;
    overflow-wrap: anywhere;
    text-align: left;
    text-decoration: none !important;
    white-space: normal !important;
  }

  .gts-global-nav__links a[aria-current="page"],
  .gts-global-nav__quick a[aria-current="page"],
  .gts-compact-nav__panel a[aria-current="page"] {
    border-color: #818cf8 !important;
    background: #eef2ff !important;
    color: #3730a3 !important;
  }

  .gts-global-nav__links .school-new-badge {
    flex: 0 0 auto;
    margin-left: auto !important;
  }

  .gts-compact-nav {
    flex: 1 1 100%;
  }

  header:has(> .gts-compact-nav),
  div:has(> .gts-compact-nav) {
    flex-wrap: wrap;
  }

  .gts-compact-nav > summary {
    justify-content: space-between;
    font-weight: 750;
  }

  .gts-compact-nav > .gts-compact-nav__panel {
    display: grid;
    gap: 7px;
    padding: 10px;
  }

  .gts-compact-nav__panel form {
    display: grid;
    margin: 0;
  }

  .gts-compact-nav__identity {
    display: block;
    padding: 5px 7px 2px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
  }

  .pagination {
    max-width: 100%;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 4px 2px 10px;
    scrollbar-width: thin;
  }

  .pagination a {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    min-width: 44px;
    min-height: 44px;
    padding: 6px 10px;
  }

  @media (max-width: 390px) {
    .gts-global-nav__links {
      grid-template-columns: 1fr;
    }

    .gts-global-nav__context {
      max-width: 88px;
    }
  }
}

@media (min-width: 901px) {
  .gts-global-nav__desktop--contents {
    display: contents;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gts-global-nav__chevron,
  .gts-compact-nav__chevron,
  .gts-global-nav__group > summary > span:last-child {
    transition: none;
  }
}
