@layer mobileHeaderPreview {
  @media (max-width: 743px) {
    html {
      --masthead-row: max(58px, 19vw);
      --masthead-gutter: 4vw;
      --header-side: calc(.375vw + .9925 * (var(--masthead-gutter) + var(--controls-lift)));
      --controls-row: 44px;
      --controls-gap: 3px;
      --menu-font-size: clamp(22px, 5.5vw, 32px);
      /* Compare visible ink, since the wordmark and controls have taller line boxes. */
      --wordmark-ink-bottom: 15.25vw;
      --controls-ink-half-height: max(11.5px, calc(var(--menu-font-size) * .45));
      --controls-lift: calc((var(--masthead-row) + var(--controls-row) / 2 - var(--controls-ink-half-height) - var(--wordmark-ink-bottom) - var(--masthead-gutter)) / 2);
      /* Align the visible Junicode capitals and the bottom of the toggle to the side inset. */
      --wordmark-ink-top: calc(3.45vw + (var(--masthead-row) - 19vw) / 2);
      --masthead-top: calc(4px + var(--header-side) - var(--wordmark-ink-top));
      --theme-track-height: 30px;
      --masthead-bottom: calc(var(--header-side) - var(--controls-lift) - (var(--controls-row) - var(--theme-track-height)) / 2);
      --test-header-height: calc(var(--masthead-top) + var(--masthead-row) + var(--controls-row) + var(--controls-gap) + var(--masthead-bottom));
    }
    html #site-home .ribbon { padding-top: calc(var(--test-header-height) + 4px) !important; }
    html .header-wrapper-2026 #mobile-overlay { padding-top: calc(var(--test-header-height) + 16px) !important; }
    html:not(:has(.liquid-menu-surface)) .header-wrapper-2026 #mobile-overlay {
      inset: var(--test-header-height) 0 0 !important;
      height: calc(100dvh - var(--test-header-height)) !important;
      padding-top: 16px !important;
    }
    /* The hero reserves the masthead's space; let both travel with the document. */
    html .header-wrapper-2026:not(:has(.is-menu-open)),
    html #site-header:not(.is-menu-open) {
      position: absolute !important;
      top: 0 !important;
    }
    html #site-header, html #site-header .header-inner {
      height: var(--test-header-height) !important;
      min-height: var(--test-header-height) !important;
      background: var(--ribbon-paper) !important;
      color: var(--ribbon-ink) !important;
    }
    html #site-header .header-inner {
      display: grid !important;
      grid-template: var(--masthead-row) var(--controls-row) / repeat(3,minmax(0,1fr)) !important;
      align-items: center !important;
      box-sizing: border-box !important;
      padding: var(--masthead-top) var(--header-side) var(--masthead-bottom) !important;
      box-shadow: inset 0 -1px color-mix(in srgb,currentColor 12%,transparent) !important;
      gap: var(--controls-gap) 0 !important;
    }
    html #site-header .header-logo {
      grid-area: 1 / 1 / 2 / 4 !important;
      justify-self: center !important;
      justify-items: center !important;
      width: max-content !important;
      height: auto !important;
    }
    html #site-header .header-logo-text {
      opacity: 1 !important; color: var(--ribbon-ink) !important;
      text-transform: uppercase !important;
      font: 500 16.32vw/1 "Ribbon Junicode", Georgia, serif !important;
      letter-spacing: -.045em !important;
      -webkit-text-stroke: 1px currentColor !important;
      scale: 1 !important;
      transform-origin: left center !important;
      transform: translate(var(--wordmark-offset, 0px), .096em) scaleX(var(--wordmark-scale, 1)) !important;
      white-space: nowrap !important;
    }
    html #site-header .header-actions { display: contents !important; }
    html #site-header :is(#header-lang-btn,#header-theme-btn,#mobile-menu-btn) {
      grid-row: 2 !important;
      translate: 0 calc(0px - var(--controls-lift)) !important;
      display: grid !important;
      place-items: center !important;
      box-sizing: border-box !important;
      justify-self: stretch !important;
      width: 100% !important;
      min-width: 0 !important;
      height: 44px !important;
      min-height: 44px !important;
      max-width: none !important;
      margin: 0 !important;
      padding: 0 !important;
      border: 0 !important;
      border-radius: 0 !important;
      mask: none !important;
      box-shadow: none !important;
      color: var(--ribbon-ink) !important;
      background: transparent !important;
    }
    html #site-header #header-lang-btn { grid-column: 1 !important; }
    html #site-header #header-theme-btn { grid-column: 3 !important; }
    html #site-header #mobile-menu-btn { grid-column: 2 !important; }
    html #site-header #header-lang-btn { justify-items: start !important; }
    html #site-header #header-lang-btn .header-flag-icon { transform-origin: left center !important; }
    html #site-header #header-theme-btn { justify-items: end !important; }
    html #site-header #mobile-menu-btn .hamburger-label {
      font: 700 var(--menu-font-size)/1 "Google Sans",Arial,sans-serif !important;
      letter-spacing:-.04em !important;
      text-transform:uppercase !important;
    }
    html:not([data-masthead-sticky]) #site-header #mobile-menu-btn .hamburger-label {
      display: inline-grid !important;
      grid-template-columns: .45em max-content .45em !important;
      align-items: center !important;
      justify-self: center !important;
      gap: 5px !important;
    }
    html:not([data-masthead-sticky]) #site-header #mobile-menu-btn .hamburger-label::before,
    html:not([data-masthead-sticky]) #site-header #mobile-menu-btn .hamburger-label::after {
      content: "" !important;
      position: static !important;
      display: block !important;
      width: .45em !important;
      height: 1.5px !important;
      background: currentColor !important;
      border-radius: 0 !important;
    }
    html #site-header #header-lang-btn {
      display: flex !important;
      align-items: center !important;
      justify-content: flex-start !important;
      gap: 0 !important;
    }
    html #site-header #header-lang-btn .header-flag-icon {
      display: block !important;
      flex: 0 0 36px !important;
      width: 36px !important; height: 26px !important;
      transform: none !important; scale: none !important;
      border-radius: 0 !important; box-shadow: none !important;
      background: transparent url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2236%22%20height%3D%2226%22%20viewBox%3D%221%202%2036%2026.3333333333%22%3E%3Csvg%20x%3D%221%22%20y%3D%222%22%20width%3D%2229%22%20height%3D%2219.333333333333332%22%20viewBox%3D%220%200%2027%2018%22%20preserveAspectRatio%3D%22xMidYMid%20slice%22%20style%3D%22border-radius%3A0px%3Boverflow%3Ahidden%22%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%2227%22%20height%3D%2218%22%20rx%3D%220%22%20fill%3D%22%231757a1%22%3E%3C%2Frect%3E%3Cpath%20d%3D%22M0%203H27%20M0%207H27%20M0%2011H27%20M0%2015H27%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C%2Fpath%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%2210%22%20height%3D%2210%22%20rx%3D%220%22%20fill%3D%22%231757a1%22%3E%3C%2Frect%3E%3Crect%20x%3D%224%22%20y%3D%220%22%20width%3D%222%22%20height%3D%2210%22%20rx%3D%220%22%20fill%3D%22white%22%3E%3C%2Frect%3E%3Crect%20x%3D%220%22%20y%3D%224%22%20width%3D%2210%22%20height%3D%222%22%20rx%3D%220%22%20fill%3D%22white%22%3E%3C%2Frect%3E%3C%2Fsvg%3E%3Csvg%20x%3D%228%22%20y%3D%229%22%20width%3D%2229%22%20height%3D%2219.333333333333332%22%20viewBox%3D%220%200%2027%2018%22%20preserveAspectRatio%3D%22xMidYMid%20slice%22%20style%3D%22border-radius%3A0px%3Boverflow%3Ahidden%22%3E%3Crect%20width%3D%2227%22%20height%3D%2218%22%20fill%3D%22%2321468b%22%3E%3C%2Frect%3E%3Cpath%20d%3D%22M0%200L27%2018M27%200L0%2018%22%20stroke%3D%22white%22%20stroke-width%3D%225%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M0%200L27%2018M27%200L0%2018%22%20stroke%3D%22%23cf142b%22%20stroke-width%3D%222%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M13.5%200V18M0%209H27%22%20stroke%3D%22white%22%20stroke-width%3D%226%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M13.5%200V18M0%209H27%22%20stroke%3D%22%23cf142b%22%20stroke-width%3D%223.5%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E%3C%2Fsvg%3E") left center / contain no-repeat !important;
    }
    html:lang(el) #site-header #header-lang-btn .header-flag-icon {
      background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2236%22%20height%3D%2226%22%20viewBox%3D%221%202%2036%2026.3333333333%22%3E%3Csvg%20x%3D%221%22%20y%3D%222%22%20width%3D%2229%22%20height%3D%2219.333333333333332%22%20viewBox%3D%220%200%2027%2018%22%20preserveAspectRatio%3D%22xMidYMid%20slice%22%20style%3D%22border-radius%3A0px%3Boverflow%3Ahidden%22%3E%3Crect%20width%3D%2227%22%20height%3D%2218%22%20fill%3D%22%2321468b%22%3E%3C%2Frect%3E%3Cpath%20d%3D%22M0%200L27%2018M27%200L0%2018%22%20stroke%3D%22white%22%20stroke-width%3D%225%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M0%200L27%2018M27%200L0%2018%22%20stroke%3D%22%23cf142b%22%20stroke-width%3D%222%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M13.5%200V18M0%209H27%22%20stroke%3D%22white%22%20stroke-width%3D%226%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M13.5%200V18M0%209H27%22%20stroke%3D%22%23cf142b%22%20stroke-width%3D%223.5%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E%3Csvg%20x%3D%228%22%20y%3D%229%22%20width%3D%2229%22%20height%3D%2219.333333333333332%22%20viewBox%3D%220%200%2027%2018%22%20preserveAspectRatio%3D%22xMidYMid%20slice%22%20style%3D%22border-radius%3A0px%3Boverflow%3Ahidden%22%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%2227%22%20height%3D%2218%22%20rx%3D%220%22%20fill%3D%22%231757a1%22%3E%3C%2Frect%3E%3Cpath%20d%3D%22M0%203H27%20M0%207H27%20M0%2011H27%20M0%2015H27%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C%2Fpath%3E%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%2210%22%20height%3D%2210%22%20rx%3D%220%22%20fill%3D%22%231757a1%22%3E%3C%2Frect%3E%3Crect%20x%3D%224%22%20y%3D%220%22%20width%3D%222%22%20height%3D%2210%22%20rx%3D%220%22%20fill%3D%22white%22%3E%3C%2Frect%3E%3Crect%20x%3D%220%22%20y%3D%224%22%20width%3D%2210%22%20height%3D%222%22%20rx%3D%220%22%20fill%3D%22white%22%3E%3C%2Frect%3E%3C%2Fsvg%3E%3C%2Fsvg%3E") !important;
    }
    html #site-header #header-lang-btn .header-flag-icon svg { display: none !important; }
    html #site-header #header-lang-btn::after { content: none !important; }
    html #site-header #header-theme-btn .hero-theme-switch-thumb {
      position: relative !important;
      inset: auto !important;
      display: block !important;
      width: 30px !important;
      height: 30px !important;
      box-sizing: border-box !important;
      padding: 0 !important;
      border: 0 !important;
      border-radius: 50% !important;
      background: linear-gradient(90deg,#171717 50%,#fff 50%) !important;
      box-shadow: inset 0 0 0 1.5px var(--ribbon-ink) !important;
      scale: none !important;
      translate: none !important;
      transform: rotate(30deg) !important;
      transition: transform 220ms ease !important;
    }
    html #site-header #header-theme-btn .hero-theme-switch-thumb::before { content: none !important; }
    html[data-hero-theme=dark] #site-header #header-theme-btn .hero-theme-switch-thumb {
      transform: rotate(210deg) !important;
    }
    @media (prefers-reduced-motion: reduce) {
      html #site-header #header-theme-btn .hero-theme-switch-thumb { transition: none !important; }
    }
    html #site-header #header-theme-btn .hero-theme-switch-icon { display: none !important; }
    html #site-header, html #site-header .header-inner {
      transition: background-color 280ms ease, box-shadow 280ms ease !important;
    }
    html #site-header :is(.header-logo,#header-lang-btn,#header-theme-btn) {
      transition: opacity 220ms ease !important;
    }
    /* The in-header control scrolls with its row. Only its docked state is fixed. */
    html #site-header #mobile-menu-btn {
      position: static !important;
      transition: none !important;
    }
    html[data-masthead-sticky] :is(.header-wrapper-2026,#site-header,#site-header .header-inner) {
      pointer-events: none !important;
    }
    html[data-masthead-sticky] #site-header :is(#header-lang-btn,#header-theme-btn) {
      opacity: 0 !important;
      pointer-events: none !important;
    }
    html[data-masthead-sticky] #site-header #mobile-menu-btn {
      pointer-events: auto !important;
      width: 60px !important;
      height: 38px !important;
      min-height: 38px !important;
      position: fixed !important;
      inset: 13px max(16px,env(safe-area-inset-right)) auto auto !important;
      translate: none !important;
      background-color: #131314 !important;
      color: white !important;
      border-radius: 16px !important;
    }
    html[data-masthead-sticky][data-hero-theme=dark] #site-header #mobile-menu-btn {
      background-color: white !important;
      color: #131314 !important;
    }
    html[data-masthead-sticky] #site-header #mobile-menu-btn .hamburger-label {
      font-size: 13px !important;
      font-weight: 600 !important;
      letter-spacing: normal !important;
      text-transform: none !important;
    }
    html[data-masthead-sticky] #site-header #mobile-menu-btn .hamburger-label::before { content: none !important; }
    html[data-masthead-sticky] #site-header #mobile-menu-btn .hamburger-label::after {
      content: "" !important; position: absolute !important;
      background: #ff495f !important;
    }
    @media (prefers-reduced-motion: reduce) {
      html #site-header, html #site-header :is(.header-inner,.header-logo,#header-lang-btn,#header-theme-btn,#mobile-menu-btn),
      html #site-header #mobile-menu-btn .hamburger-label { transition: none !important; }
    }
    html #site-header :is(#header-theme-btn,#header-lang-btn,#mobile-menu-btn):focus-visible { outline: 2px solid currentColor !important; outline-offset: -4px !important; }
  }
}

@layer mobileHeaderPreview {
  @media (max-width: 743px) {
    html #site-home .ribbon[data-wheel-study=aligned] {
      padding-top: var(--test-header-height) !important;
      height: 100vh !important;
      height: var(--hero-stable-height, 100svh) !important;
      /* Mobile Simulator reserves its emulated bottom inset outside the page iframe. */
      padding-bottom: var(--hero-stable-bottom, max(4px, calc(env(safe-area-inset-bottom, 0px) - var(--mobile-first-safe-area-bottom, 0px)))) !important;
      min-height: calc(var(--test-header-height) + 77vw + 175px) !important;
      grid-template-rows: minmax(0, 1fr) auto auto 44px !important;
    }
    /* Keep fractional scroll pixels at the section boundary on the same surface. */
    html #site-home { background-color: var(--ribbon-paper) !important; }
    html #site-home #grow-your-business.gallery-study {
      margin-top: -1px !important;
      background-color: var(--ribbon-paper) !important;
      border-top: 0 !important;
    }
    html #site-home #grow-your-business > .gallery-study__inner { padding-top: 101px !important; }
    .ribbon > .masthead-footprint {
      position: absolute; inset: 0 auto auto 0; width: 1px;
      height: var(--test-header-height); pointer-events: none;
    }
    .ribbon[data-wheel-overview] .ribbon-stage { touch-action: none !important; }
    .ribbon-stage { grid-row: 1 !important; }
    .ribbon-controls { grid-row: 4 !important; translate: none !important; }
    .ribbon-copy { grid-row: 2 !important; display:block !important; padding-block:clamp(19.6px,5.6vw,33.6px) 6px !important; }
    .ribbon-copy #ribbon-heading { position:static !important; gap:0 !important; }
    .ribbon-copy #ribbon-heading > span:first-child { text-align: center !important; }
    .ribbon-copy #ribbon-heading > span:nth-child(2) { display:none !important; }
    .ribbon-subtext { grid-row: 3 !important; }
    /* Anchor the CMP outside the document layout. Its own banner and dialog
       retain their positioning, scrolling, focus management and hit targets. */
    body.proothisis-home #wpconsent-root {
      position: fixed !important;
      inset: auto 0 0 !important;
      height: 0 !important;
      overflow: visible !important;
      z-index: 2147483647 !important;
    }
    .ribbon > .proothisis-consent-launcher { grid-area: 1 / 1 !important; }
  }
}

@layer mobileHeaderPreview {
  @media (max-width: 743px) {
    body.admin-bar {
      --home-toolbar-height: var(--wp-admin--admin-bar--height, 46px);
      --home-toolbar-visible: var(--home-toolbar-height);
    }
    /* WordPress offsets the page flow; only the absolute masthead needs to follow. */
    html body.admin-bar .header-wrapper-2026:not(:has(.is-menu-open)) {
      top: var(--home-toolbar-height) !important;
    }
    html body.admin-bar #site-home .ribbon[data-wheel-study=aligned] {
      height: calc(var(--hero-stable-height, 100svh) - var(--home-toolbar-height)) !important;
      min-height: calc(var(--test-header-height) + 77vw + 175px - var(--home-toolbar-height)) !important;
    }
    html body.admin-bar .header-wrapper-2026:has(#site-header.is-menu-open),
    html body.admin-bar #site-header.is-menu-open {
      top: var(--home-toolbar-visible) !important;
    }
    html body.admin-bar .header-wrapper-2026:has(.is-menu-open) #mobile-overlay {
      top: var(--home-toolbar-visible) !important;
      height: calc(100dvh - var(--home-toolbar-visible)) !important;
      padding-top: calc(var(--test-header-height) + 16px) !important;
    }
  }
  /* At these widths WordPress keeps the toolbar fixed while the page scrolls. */
  @media (min-width: 600.01px) and (max-width: 743px) {
    html[data-masthead-sticky] body.admin-bar #site-header #mobile-menu-btn {
      top: calc(var(--home-toolbar-height) + 13px) !important;
    }
  }
}
