/* Opt-in mobile reading layout. Site navigation and lesson behavior remain native. */
.sgc-guide-mobile .sgc-mobile-nav-hint {
  display: none;
}

@media screen and (max-width: 700px) {
  html:has(.sgc-guide-mobile) {
    scroll-padding-top: calc(var(--sgc-top) + .75rem);
  }

  .sgc-guide-mobile.sgc-themed :is(.hero, .guide-hero, .cars-hero, .sgc-layout-banner) {
    min-height: 0;
    padding: clamp(.9rem, 4.2vw, 1.6rem);
  }

  .sgc-guide-mobile.sgc-themed :is(.hero, .guide-hero, .cars-hero, .sgc-layout-banner) h1 {
    font-size: clamp(1.72rem, 6.25vw, 2.65rem);
    line-height: 1.06;
    letter-spacing: -.052em;
    margin-bottom: .85rem;
    overflow-wrap: anywhere;
  }

  .sgc-guide-mobile :is(.hero, .guide-hero) :is(.hero-sub, .lead) {
    font-size: 1.0625rem;
    line-height: 1.48;
  }

  .sgc-guide-mobile :is(.hero, .guide-hero) :is(.hero-actions, .actions) {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1rem;
    margin-top: .85rem;
  }

  .sgc-guide-mobile :is(.hero, .guide-hero) :is(.hero-actions, .actions) a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    max-width: 100%;
  }

  .sgc-guide-mobile > main#main {
    margin-top: .6rem;
  }

  .sgc-guide-mobile :is(.topic, .challenge, .page-intro, .page-header, .guide-section) {
    scroll-margin-top: .5rem;
  }

  .sgc-guide-mobile .local-nav {
    gap: .4rem .85rem;
    margin-block: 1rem 1.45rem;
    font-size: .9rem;
  }

  .sgc-guide-mobile .local-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    text-underline-offset: .2em;
  }

  .sgc-guide-mobile > :is(.main-nav, .nav-shell),
  .sgc-guide-mobile.sgc-case .layout > .sidebar {
    position: static;
    padding: .45rem .55rem .25rem;
  }

  .sgc-guide-mobile > :is(.main-nav, .nav-shell),
  .sgc-guide-mobile .site-shell > .contents {
    margin-top: .55rem;
  }

  .sgc-guide-mobile.sgc-lab :is(.topbar, .shell > .sidebar),
  .sgc-guide-mobile .site-shell > .contents {
    position: static;
  }

  .sgc-guide-mobile .sgc-mobile-nav-hint {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    padding: 0 .3rem .15rem;
    color: #e7f2fe;
    font: 740 .875rem/1.4 var(--sgd-font);
  }

  .sgc-guide-mobile .sgc-mobile-nav-hint span {
    color: #c4daec;
    font-weight: 500;
    text-align: right;
  }

  .sgc-guide-mobile :is(.shell > .sidebar, .site-shell > .contents) > .sgc-mobile-nav-hint {
    color: #273a52;
  }

  .sgc-guide-mobile.sgc-case .layout > .sidebar > .sgc-mobile-nav-hint {
    color: #e7f2fe;
  }

  .sgc-guide-mobile :is(.shell > .sidebar, .site-shell > .contents) > .sgc-mobile-nav-hint span {
    color: #465a72;
  }

  .sgc-guide-mobile :is(.nav-shell > #main-nav, .main-nav > .nav-inner, .layout > .sidebar > .nav-list,
    .shell > .sidebar > nav[aria-label="Study activities"], .site-shell > .contents > nav) {
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    align-items: stretch;
    gap: .3rem;
    padding: .1rem .1rem .25rem;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .sgc-guide-mobile :is(.nav-shell > #main-nav, .main-nav > .nav-inner, .layout > .sidebar > .nav-list,
    .shell > .sidebar > nav[aria-label="Study activities"], .site-shell > .contents > nav) > a {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 44px;
    padding: .3rem .6rem;
    border: 0;
    border-radius: .2rem;
    white-space: nowrap;
  }

  .sgc-guide-mobile :is(.nav-shell > #main-nav, .main-nav > .nav-inner, .layout > .sidebar > .nav-list) > a {
    background: #223952;
  }

  .sgc-guide-mobile :is(.nav-shell > #main-nav, .main-nav > .nav-inner, .layout > .sidebar > .nav-list) > a[aria-current] {
    box-shadow: inset 0 -2px #f0c477;
  }

  .sgc-guide-mobile.sgc-lab .sidebar nav a b {
    display: none;
  }

  .sgc-guide-mobile.sgc-lab #prompt > .view-heading {
    padding: clamp(.9rem, 4.2vw, 1.6rem);
    margin-bottom: 1rem;
  }

  .sgc-guide-mobile.sgc-lab #prompt > .view-heading h1 {
    font-size: clamp(1.72rem, 6.25vw, 2.65rem);
    line-height: 1.06;
    overflow-wrap: anywhere;
  }
}
