/* Shared by the multi-page examples. Each example supplies its own colour palette. */
[data-sp-menu-bar] > details[data-sp-mobile-menu],
[data-sp-menu-hero-mobile],
[data-sp-hero-contact] {
  display: none !important;
}

@media (max-width: 830px) {
  header [data-sp-menu-bar][class],
  .rw .sitehead .mast[data-sp-menu-bar] {
    position: relative;
    z-index: 4;
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    min-height: 3.75rem;
    padding-block: .5rem;
  }

  [data-sp-menu-bar] > [data-sp-menu-desktop],
  [data-sp-menu-hero-desktop],
  [data-sp-hero-desktop] {
    display: none !important;
  }
  [data-sp-menu-hero-mobile] { display: flex !important; }
  a[data-sp-menu-hero-mobile],
  a[data-sp-hero-contact] { display: inline-flex !important; }

  [data-sp-menu-bar] > [data-sp-menu-brand] {
    min-width: 0;
    max-width: 100%;
    margin-inline: 0;
  }

  [data-sp-menu-bar] > details[data-sp-mobile-menu] {
    display: block !important;
    position: static;
    flex: 0 0 auto;
    order: 5;
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
    color: inherit;
  }

  [data-sp-mobile-menu] > summary {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 44px;
    padding: .42rem .8rem;
    border: 1px solid currentColor;
    border-radius: 3px;
    color: inherit;
    background: transparent;
    font-family: inherit;
    font-size: .93rem;
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: normal;
    list-style: none;
    white-space: nowrap;
    cursor: pointer;
    touch-action: manipulation;
  }
  [data-sp-mobile-menu] > summary::marker { content: ""; }
  [data-sp-mobile-menu] > summary::-webkit-details-marker { display: none; }

  [data-sp-menu-icon] {
    position: relative;
    display: inline-block;
    flex: 0 0 1.05rem;
    width: 1.05rem;
    height: 2px;
    background: currentColor;
  }
  [data-sp-menu-icon]::before,
  [data-sp-menu-icon]::after {
    position: absolute;
    inset: 0;
    content: "";
    background: currentColor;
  }
  [data-sp-menu-icon]::before { transform: translateY(-5px); }
  [data-sp-menu-icon]::after { transform: translateY(5px); }
  [data-sp-mobile-menu][open] [data-sp-menu-icon] { background: transparent; }
  [data-sp-mobile-menu][open] [data-sp-menu-icon]::before { transform: rotate(45deg); }
  [data-sp-mobile-menu][open] [data-sp-menu-icon]::after { transform: rotate(-45deg); }

  /* Anchor the panel to the header row so that it sits below the brand. */
  header [data-sp-menu-bar] > details[data-sp-mobile-menu][open] > nav {
    box-sizing: border-box;
    position: absolute;
    z-index: 1;
    top: 100%;
    right: 0;
    bottom: auto;
    left: auto;
    display: grid;
    align-items: stretch;
    justify-content: stretch;
    gap: 0;
    width: min(20rem, 100%);
    max-height: 60vh;
    max-height: 60dvh;
    margin: 0;
    padding: .35rem .8rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    background-color: var(--paper, #fff);
    color: var(--ink, #252a25);
    border: 1px solid var(--rule, var(--line, #b8b8b0));
    border-radius: 0 0 3px 3px;
    box-shadow: 0 .55rem 1.15rem rgb(20 27 21 / 16%);
  }

  header [data-sp-menu-bar] > [data-sp-mobile-menu] > nav a {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    min-height: 44px;
    margin: 0;
    padding: .55rem .35rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-size: .95rem;
    font-style: normal;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: normal;
    white-space: normal;
    text-align: start;
    text-decoration: none;
  }
  header [data-sp-menu-bar] > [data-sp-mobile-menu] > nav a + a {
    border-top: 1px solid var(--rule, var(--line, #c8c8bc));
  }
  header [data-sp-menu-bar] > [data-sp-mobile-menu] > nav a:is([aria-current="page"], [aria-current="location"], :hover) {
    text-decoration: underline;
    text-decoration-color: currentColor;
    text-underline-offset: .2em;
  }
  [data-sp-mobile-menu] > summary:focus-visible,
  header [data-sp-menu-bar] > [data-sp-mobile-menu] > nav a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
  }
}
