@media screen and (max-width: 1200px) {
  #headerwrap #menu-icon,
  #mobile-menu .search-button,
  #headerwrap .search-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px !important; height: 40px !important;\n  min-width: 40px !important; min-height: 40px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    color: #1a2744 !important;
    transition: background-color .15s ease, color .15s ease;
  }
  #headerwrap #menu-icon { margin: 0 !important; }
  #headerwrap #menu-icon:hover, #headerwrap #menu-icon:active,
  #mobile-menu .search-button:hover, #mobile-menu .search-button:active {
    background-color: rgba(0,87,168,.09) !important;
    color: #0057a8 !important;
  }

  /* Search: single-weight glyph, no doubled stroke, slightly smaller. */
  #mobile-menu .search-button svg,
  #headerwrap .search-button svg {
    width: 17px !important; height: 17px !important;
    fill: currentColor !important;
    stroke: none !important;
  }

  /* The slide-out menu already contains a real search field (#ccs-mob-bar), so the
     lone Themify magnifier sitting above it is a second, unlabelled way to do the
     same thing and reads as a stray glyph. Hidden only where that field exists,
     so no template is left without a way to search. */
  #mobile-menu .navbar-wrapper:has(#ccs-mob-bar) > .search-button { display: none !important; }

  /* The social widget in the slide-out menu renders an empty list, leaving a dead
     26px band under the close button. Collapsed only while it has no links. */
  #mobile-menu .social-widget:has(ul.social-links:empty) { display: none !important; }

  /* Sideways scroll in the slide-out menu: the panel is 300px with 25px padding,
     so its content box is 250px, but #ccs-mob-bar is width:100% with content-box
     sizing plus 20px side padding, rendering 290px. The input adds a further 15px
     right margin on top of its own width:100%. Both are corrected here, with
     overflow-x hidden on the panel as a backstop. */
  #mobile-menu { overflow-x: hidden !important; }
  #mobile-menu #ccs-mob-bar {
    box-sizing: border-box !important;
    max-width: 100% !important;
  }
  #mobile-menu #ccs-mob-inp {
    box-sizing: border-box !important;
    margin-right: 0 !important;
    max-width: 100% !important;
  }

  /* Hamburger: 19x13 instead of 22x18, so the three bars sit as one mark. */
  #headerwrap .menu-icon-inner {
    width: 19px !important;
    height: 13px !important;
    border-bottom-width: 2px !important;
  }
  #headerwrap .menu-icon-inner::before,
  #headerwrap .menu-icon-inner::after {
    border-top-width: 2px !important;
  }

  /* The header bar is 44px inside a 56px header, so its contents sat above the
     header's centre line. Centre the bar itself rather than nudging the logo. */
  #headerwrap #header {
    display: flex !important;
    align-items: center !important;
  }
  #headerwrap .header-bar { min-height: 0 !important; }
  /* The hamburger glyph is an absolutely positioned 2px bar whose sibling bars
     sit at -7px and +7px, and the sticky-header snippet pins it with
     '#menu-icon span.menu-icon-inner{top:7px!important}'. That left the glyph
     13px above the search icon. Centre it on the button; the outer bars stay
     symmetric, so the optical centre lands on the header's centre line.
     Selector needs two ids to outrank the sticky-header rule. */
  #headerwrap #menu-icon span.menu-icon-inner {
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;
  }
  /* --- Logo --- The theme wraps the <img> in an inline <a>, so the anchor
     collapsed to 29px while the image rendered 38px: the logo overflowed its
     own link, rode above the header's centre line and clipped at the top. */
  #headerwrap #site-logo,
  #headerwrap .header-bar {
    display: flex !important;
    align-items: center !important;
  }
  #headerwrap #site-logo a {
    display: flex !important;
    align-items: center !important;
    line-height: 0 !important;
  }
  #headerwrap .site-logo-image {
    display: block !important;
    max-height: 34px !important;
    width: auto !important;
    height: auto !important;
  }

  /* --- Search trigger --- It is position:fixed on <body> with a hard
     top:9px/13px, so it never lined up with the hamburger that sits in the
     header flow: the pill's centre was 41px above the menu icon's. Match the
     menu icon's 40x40 box and centre both on the 56px header. The label and
     the floating-chip styling go too, so the two controls read as one pair. */
  /* Moved into .header-icons by the script below, so it lays out beside the
     menu button instead of being pinned to the viewport. */
  #ccs-search-trigger {
    position: static !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    gap: 0 !important;
    justify-content: center !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }
  #headerwrap .header-icons {
    display: flex !important;
    align-items: center !important;
    gap: 2px;
  }
  /* Icon row is moved inside #header (script below) so the logo and icons share one line on tablet and mobile instead of the icons stacking above the logo. */
  #headerwrap #header { justify-content: space-between !important; flex-wrap: nowrap !important; }
  #headerwrap #header .header-icons { margin-left: auto; width: auto !important; flex: 0 0 auto; position: static !important; transform: none !important; top: auto !important; right: auto !important; }
  #ccs-search-trigger span { display: none !important; }
  /* The mobile header (hamburger) runs up to 1200px, but the search trigger used to show only up to 1100px, leaving a 100px band with no search. Match the hamburger breakpoint. */
  #ccs-search-trigger { display: inline-flex !important; }
  #ccs-search-trigger svg {
    width: 19px !important;
    height: 19px !important;
    stroke: #1a2744 !important;
    stroke-width: 2 !important;
  }

}