/* Consistent mobile reading gutters for editorial and page content. */
@media (max-width: 767px) {
  #main,
  #main *,
  #main *::before,
  #main *::after {
    box-sizing: border-box;
  }

  #main .aw-article-hero-copy,
  #main .aw-article-summary,
  #main .aw-article-layout,
  #main .aw-article-help,
  #main .aw-article-next,
  #main .entry-content,
  #main .wp-block-post-content,
  #main .page-content,
  #main .aw-page-content,
  #main .aw-content {
    min-width: 0;
    max-width: 100%;
    padding-inline: clamp(20px, 5.5vw, 26px);
  }

  #main .aw-article-content,
  #main .aw-prose,
  #main .entry-content,
  #main .wp-block-post-content,
  #main .page-content,
  #main .aw-page-content,
  #main .aw-content {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
  }

  #main .aw-prose p,
  #main .aw-prose li,
  #main .entry-content p,
  #main .entry-content li,
  #main .wp-block-post-content p,
  #main .wp-block-post-content li,
  #main .page-content p,
  #main .page-content li,
  #main .aw-page-content p,
  #main .aw-page-content li,
  #main .aw-content p,
  #main .aw-content li {
    max-width: 100%;
  }

  #main .aw-prose ul,
  #main .aw-prose ol,
  #main .entry-content ul,
  #main .entry-content ol,
  #main .wp-block-post-content ul,
  #main .wp-block-post-content ol,
  #main .page-content ul,
  #main .page-content ol,
  #main .aw-page-content ul,
  #main .aw-page-content ol,
  #main .aw-content ul,
  #main .aw-content ol {
    max-width: 100%;
    padding-inline-start: 1.25rem;
  }

  #main .aw-article-hero h1,
  #main .aw-article-hero-copy h1,
  #main .entry-content h1,
  #main .wp-block-post-content h1,
  #main .page-content h1,
  #main .aw-page-content h1,
  #main .aw-content h1 {
    max-width: 100%;
    overflow-wrap: break-word;
  }
}

/* Extra shop link: last entry in the mobile/tablet navigation only. */
@media (max-width: 1120px) {
  .aw-mock-header #aw-mobile-menu > .aw-mobile-shop-entry {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    min-height: 52px;
    margin: 22px 0 2px;
    padding: 14px 20px;
    border: 0;
    border-radius: 12px;
    background: #0d776d;
    color: #fff;
    font-family: "Avenir Next", Avenir, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    font-weight: 750;
    line-height: 1.4;
    text-decoration: none;
  }
  .aw-mock-header #aw-mobile-menu > .aw-mobile-shop-entry span {
    flex: none;
    font-size: 21px;
    line-height: 1;
  }
  .aw-mock-header #aw-mobile-menu > .aw-mobile-shop-entry:hover {
    background: #075e56;
    color: #fff;
  }
  .aw-mock-header #aw-mobile-menu > .aw-mobile-shop-entry:focus-visible {
    outline: 3px solid #0d776d;
    outline-offset: 3px;
  }
}

/* Animated opening and closing of the existing mobile navigation.
   Keep [hidden] authoritative, even when the compiled stylesheet says display:block. */
@media (max-width: 1120px) {
  .aw-mock-header #aw-mobile-menu[hidden] {
    display: none !important;
  }
  .aw-mock-header #aw-mobile-menu.aw-menu-animating {
    overflow: hidden;
    transition:
      height 330ms cubic-bezier(.22, 1, .36, 1),
      opacity 240ms ease,
      transform 330ms cubic-bezier(.22, 1, .36, 1);
    will-change: height, opacity, transform;
  }
  .aw-mock-header [data-aw-menu-toggle] svg path {
    transform-origin: 12px 12px;
    transition: transform 250ms cubic-bezier(.22, 1, .36, 1), opacity 150ms ease;
  }
  .aw-mock-header [data-aw-menu-toggle][aria-expanded="true"] .aw-menu-line-first {
    transform: translateY(5px) rotate(45deg);
  }
  .aw-mock-header [data-aw-menu-toggle][aria-expanded="true"] .aw-menu-line-middle {
    opacity: 0;
  }
  .aw-mock-header [data-aw-menu-toggle][aria-expanded="true"] .aw-menu-line-last {
    transform: translateY(-5px) rotate(-45deg);
  }

  .aw-mock-header #aw-mobile-menu.aw-menu-entering .aw-mobile-search,
  .aw-mock-header #aw-mobile-menu.aw-menu-entering nav li,
  .aw-mock-header #aw-mobile-menu.aw-menu-entering > .aw-mobile-shop-entry {
    animation: aw-mobile-menu-reveal 185ms ease-out both;
  }
  .aw-mock-header #aw-mobile-menu.aw-menu-entering .aw-mobile-search {
    animation-delay: 30ms;
  }
  .aw-mock-header #aw-mobile-menu.aw-menu-entering nav li:nth-child(1) { animation-delay: 40ms; }
  .aw-mock-header #aw-mobile-menu.aw-menu-entering nav li:nth-child(2) { animation-delay: 54ms; }
  .aw-mock-header #aw-mobile-menu.aw-menu-entering nav li:nth-child(3) { animation-delay: 68ms; }
  .aw-mock-header #aw-mobile-menu.aw-menu-entering nav li:nth-child(4) { animation-delay: 82ms; }
  .aw-mock-header #aw-mobile-menu.aw-menu-entering nav li:nth-child(5) { animation-delay: 96ms; }
  .aw-mock-header #aw-mobile-menu.aw-menu-entering nav li:nth-child(n+6) { animation-delay: 110ms; }
  .aw-mock-header #aw-mobile-menu.aw-menu-entering > .aw-mobile-shop-entry { animation-delay: 122ms; }

  @keyframes aw-mobile-menu-reveal {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .aw-mock-header #aw-mobile-menu.aw-menu-animating,
  .aw-mock-header [data-aw-menu-toggle] svg path {
    transition: none !important;
  }
  .aw-mock-header #aw-mobile-menu.aw-menu-entering .aw-mobile-search,
  .aw-mock-header #aw-mobile-menu.aw-menu-entering nav li,
  .aw-mock-header #aw-mobile-menu.aw-menu-entering > .aw-mobile-shop-entry {
    animation: none !important;
  }
}
