@media (max-width: 1024px) {
  .home-primary-nav .home-nav-item:last-child .home-nav-dropdown {
    right: 0;
    left: auto;
  }

  .site-nav a {
    min-width: 0;
    flex: 1;
    padding-inline: 10px;
    font-size: 14px;
  }

  .home-intro,
  .ranking-area,
  .content-with-sidebar {
    grid-template-columns: 1fr;
  }

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

  .four-column-grid,
  .ad-row,
  .resource-grid,
  .friend-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  .header-tools,
  .header-tools__inner {
    min-height: 64px;
  }

  .site-logo img {
    width: 146px;
    height: auto;
  }

  .tool-links {
    display: none;
  }

  .mobile-menu-button {
    display: block;
  }

  .site-nav {
    display: none;
    height: auto;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav__inner {
    display: grid;
    height: auto;
    padding: 8px 0;
  }

  .site-nav a {
    min-height: 44px;
  }

  .promo-strip,
  .promo-strip img {
    height: 76px;
  }

  .headline-panel,
  .notice-grid,
  .ranking-grid,
  .guide-grid,
  .ranking-side,
  .three-column-grid,
  .school-card {
    grid-template-columns: 1fr;
  }

  .headline-panel,
  .article-list-item {
    grid-template-columns: 1fr;
  }

  .headline-image,
  .headline-image img,
  .article-list-item__image {
    width: 100%;
  }

  .four-column-grid,
  .ad-row,
  .resource-grid,
  .friend-links {
    grid-template-columns: 1fr;
  }

  .data-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .article-page {
    padding: 22px 18px 36px;
  }

  .article-page__header h1 {
    font-size: 24px;
  }

  .floating-service {
    right: 16px;
    bottom: 22px;
  }
}

@media (max-width: 1500px) {

  .home-qr,
  .home-social {
    display: none;
  }
}

/* Keep the side promotions visible on common laptop displays without
   covering the 1214px desktop content canvas. */
@media (min-width: 1360px) and (max-width: 1599px) {
  .home-social .social-qr-dialog {
    right: 24px;
    left: auto;
  }
}

@media (min-width: 1501px) and (max-width: 1599px) {
  .home-qr {
    left: calc(50% - 731px);
    transform: scale(0.82);
    transform-origin: top left;
  }

  .home-social {
    right: calc(50% - 731px);
    left: auto;
    transform: scale(0.82);
    transform-origin: top right;
  }
}

@media (min-width: 1401px) and (max-width: 1500px) {

  .home-qr,
  .home-social {
    display: block;
  }

  .home-qr {
    left: max(8px, calc(50% - 710px));
    transform: scale(0.72);
    transform-origin: top left;
  }

  .home-social {
    right: max(8px, calc(50% - 710px));
    left: auto;
    transform: scale(0.72);
    transform-origin: top right;
  }
}

@media (min-width: 1360px) and (max-width: 1400px) {

  .home-qr,
  .home-social {
    display: block;
  }

  .home-qr {
    left: 4px;
    transform: scale(0.55);
    transform-origin: top left;
  }

  .home-social {
    right: 4px;
    left: auto;
    transform: scale(0.55);
    transform-origin: top right;
  }
}

@media (max-width: 1024px) {
  .home-channel-nav {
    min-width: 0;
  }

  .home-channel-nav ul {
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .home-section,
  .home-lead,
  .home-news-grid,
  .home-banner-row,
  .home-school-express,
  .home-topic-section,
  .home-content-grid,
  .home-content-grid--featured,
  .home-sponsor-strip,
  .home-knowledge,
  .home-friend-section {
    height: auto;
    overflow: visible;
  }

  .home-lead {
    grid-template-columns: 1fr;
  }

  .home-lead-panel,
  .home-quick-panel {
    height: 322px;
  }

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

  .home-banner-row,
  .home-topic-banners {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-banner-row {
    row-gap: 12px;
  }

  .home-topic-banners {
    height: auto;
    row-gap: 12px;
  }

  .home-topic-banners a,
  .home-topic-banners img {
    height: 110px;
  }

  .home-school-layout {
    height: auto;
    grid-template-columns: 1fr;
  }

  .home-school-heading {
    width: 100%;
  }

  .home-school-ads {
    height: auto;
    margin-top: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: 100px;
    gap: 12px;
  }

  .home-school-ads a,
  .home-school-ads img {
    height: 100px;
  }

  .home-content-grid,
  .home-content-grid--featured {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-content-grid .home-list-panel,
  .home-content-grid--featured .home-list-panel {
    height: 250px;
  }

  .home-content-grid--featured .home-list-panel {
    height: auto;
  }

  .home-sponsor-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 8px;
  }

  .home-knowledge-grid {
    height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: auto;
  }

  .home-knowledge-card {
    height: auto;
    min-height: 124px;
  }

  .home-mini-ads {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .home-friend-links {
    height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-footer {
    height: auto;
    min-height: 188px;
  }
}

@media (max-width: 768px) {
  .home-body {
    font-size: 14px;
  }

  .home-site-header .header-tools,
  .home-site-header .header-tools__inner {
    min-height: 64px;
  }

  .home-brand {
    min-width: 0;
  }

  .home-brand .site-logo {
    flex-basis: min(220px, calc(100vw - 190px));
    width: min(220px, calc(100vw - 190px));
    height: 32px;
  }

  .home-search {
    width: min(42vw, 210px);
  }

  .home-primary-nav,
  .home-nav-list {
    height: auto;
  }

  .home-nav-list {
    width: 100%;
    grid-template-columns: 1fr;
    padding: 8px 16px;
  }

  .home-primary-nav .home-nav-item>a,
  .home-primary-nav .home-nav-item>button {
    min-height: 44px;
    height: 44px;
    justify-content: start;
    padding: 0 14px;
    font-size: 15px;
  }

  .home-nav-dropdown {
    position: static;
    width: 100%;
    max-height: 0;
    padding: 0;
    overflow: hidden;
    box-shadow: none;
    transform: none;
    transition: max-height 180ms ease, opacity 180ms ease, visibility 180ms;
  }

  .home-nav-item--submenu.is-submenu-open .home-nav-dropdown {
    max-height: 240px;
  }

  .home-primary-nav .home-nav-dropdown a,
  .home-primary-nav .home-nav-placeholder {
    height: 44px;
    padding: 0 14px;
  }

  .home-promo,
  .home-promo__inner {
    height: 124px;
  }

  .home-promo__inner {
    width: 100%;
    grid-template-rows: 88px 36px;
  }

  .home-promo__carousel,
  .home-promo__slides {
    height: 88px;
  }

  .home-promo__banner,
  .home-promo__banner img {
    height: 80px;
  }

  .home-promo__banner {
    inset: 8px 0 0;
  }

  .home-promo__banner img {
    object-position: center;
  }

  .home-channel-nav ul {
    padding: 0 16px;
  }

  .home-page {
    padding-top: 12px;
  }

  .home-section+.home-section {
    margin-top: 16px;
  }

  .home-lead-panel {
    height: auto;
    min-height: 350px;
  }

  .home-lead-news {
    grid-template-rows: repeat(3, minmax(0, 1fr));
  }

  .home-mini-ads {
    gap: 4px;
  }

  .home-quick-panel {
    height: auto;
    grid-template-rows: auto auto;
  }

  .home-quick-ads {
    grid-template-rows: repeat(2, 72px);
  }

  .home-quick-ads a,
  .home-quick-ads img {
    height: 72px;
  }

  .home-quick-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: 46px;
  }

  .home-news-grid,
  .home-content-grid,
  .home-content-grid--featured {
    grid-template-columns: 1fr;
  }

  .home-news-grid {
    gap: 14px;
  }

  .home-news-grid .home-list-panel {
    height: 219px;
  }

  .home-banner-row,
  .home-topic-banners {
    grid-template-columns: 1fr;
  }

  .home-banner-row a,
  .home-banner-row img,
  .home-topic-banners a,
  .home-topic-banners img {
    height: 84px;
  }

  .home-school-heading {
    height: auto;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .home-school-tabs {
    overflow-x: auto;
    white-space: nowrap;
  }

  .home-school-search {
    width: 100%;
    height: 34px;
    border-radius: 2px;
  }

  .home-school-search input,
  .home-school-search button {
    height: 34px;
    font-size: 12px;
    line-height: 34px;
  }

  .home-school-directory {
    height: auto;
    padding: 12px 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
  }

  .home-school-ads {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 84px);
  }

  .home-school-ads a,
  .home-school-ads img {
    height: 84px;
  }

  .home-content-grid,
  .home-content-grid--featured {
    gap: 14px;
  }

  .home-sponsor-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-knowledge-grid,
  .home-friend-links {
    grid-template-columns: 1fr;
  }

  .home-footer {
    margin-top: 20px;
    padding: 36px 16px;
  }
}

@media (max-width: 480px) {
  .home-search {
    display: none;
  }

  .home-mini-ads {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    height: auto;
  }

  .home-mini-ads a,
  .home-mini-ads img {
    height: 38px;
  }

  .home-lead-panel {
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .home-school-directory {
    grid-template-columns: 1fr;
  }
}
